From 92b15894e57167fc5d518c6dc26be473361ecf88 Mon Sep 17 00:00:00 2001
From: Julien Michel <julien.michel@orfeo-toolbox.org>
Date: Tue, 29 May 2012 15:53:52 +0200
Subject: [PATCH] ENH: Setting new parameters in application

---
 Applications/Segmentation/otbLargeScaleSegmentation.cxx | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/Applications/Segmentation/otbLargeScaleSegmentation.cxx b/Applications/Segmentation/otbLargeScaleSegmentation.cxx
index 1902fa58c4..588615e6ff 100644
--- a/Applications/Segmentation/otbLargeScaleSegmentation.cxx
+++ b/Applications/Segmentation/otbLargeScaleSegmentation.cxx
@@ -409,15 +409,18 @@ namespace otb
 
             //segmentation parameters
             const unsigned int
-              spatialRadius = static_cast<unsigned int> (this->GetParameterInt("filter.meanshiftedison.spatialr"));
+            spatialRadius = static_cast<unsigned int> (this->GetParameterInt("filter.meanshift.spatialr"));
             const unsigned int
-              rangeRadius = static_cast<unsigned int> (this->GetParameterInt("filter.meanshiftedison.ranger"));
+            rangeRadius = static_cast<unsigned int> (this->GetParameterInt("filter.meanshift.ranger"));
             const unsigned int
-              minimumObjectSize = static_cast<unsigned int> (this->GetParameterInt("filter.meanshiftedison.minsize"));
+            minimumObjectSize = static_cast<unsigned int> (this->GetParameterInt("minsize"));
 
             meanShiftVectorizationFilter->GetSegmentationFilter()->SetSpatialBandwidth(spatialRadius);
             meanShiftVectorizationFilter->GetSegmentationFilter()->SetRangeBandwidth(rangeRadius);
 
+        meanShiftVectorizationFilter->GetSegmentationFilter()->SetMaxIterationNumber(1000);
+        meanShiftVectorizationFilter->GetSegmentationFilter()->SetThreshold(0.01);
+
             if (minSize > 1)
               {
                 otbAppLogINFO(<<"Object with size under "<<minSize<<" will be suppressed."<<std::endl);
-- 
GitLab