diff --git a/app/otbLSGRM.cxx b/app/otbLSGRM.cxx index d0fcf50da39e150ec3fd0fcab8eceada14fb4f16..7ba5b8de954b9e37f75e032e5e1adb5d08d8f274 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();