From cf9a43e24394421b229bb8b6788ceebb28cd32bf Mon Sep 17 00:00:00 2001 From: remicres <remi.cresson@teledetection.fr> Date: Wed, 10 Aug 2016 08:40:02 +0000 Subject: [PATCH] ENH: begin to enrich module app command line interface --- app/otbLSGRM.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/otbLSGRM.cxx b/app/otbLSGRM.cxx index d0fcf50..7ba5b8d 100644 --- a/app/otbLSGRM.cxx +++ b/app/otbLSGRM.cxx @@ -54,8 +54,8 @@ private: AddParameter(ParameterType_Float, "threshold", "Threshold for the criterion"); - AddParameter(ParameterType_Int, "niter", "Number of iterations"); - SetDefaultParameterInt("niter", 0); + AddParameter(ParameterType_Int, "niter", "Maximum number of iterations"); + SetDefaultParameterInt("niter", 75); MandatoryOff("niter"); AddParameter(ParameterType_Int, "speed", "Activate it to boost the segmentation speed"); @@ -113,6 +113,7 @@ private: } else { + // User controller.SetTileWidth(GetParameterInt("tiling.user.sizex")); controller.SetTileHeight(GetParameterInt("tiling.user.sizey")); controller.SetNumberOfFirstIterations(GetParameterInt("tiling.user.nfirstiter")); @@ -134,6 +135,7 @@ private: controller.SetSpecificParameters(params); float thres = GetParameterFloat("threshold"); controller.SetThreshold(thres*thres); + controller.SetNumberOfIterations(GetParameterInt("niter")); // Run the segmentation controller.RunSegmentation(); -- GitLab