From ca078dc0310f1b25f7eb520aa0b015830058362a Mon Sep 17 00:00:00 2001
From: Otmane Lahlou <otmane.lahlou@c-s.fr>
Date: Tue, 27 Sep 2011 16:17:32 +0200
Subject: [PATCH] ENH: add a empty parameter to the application

---
 .../Util/otbMultiResolutionPyramid.cxx        | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/Applications/Util/otbMultiResolutionPyramid.cxx b/Applications/Util/otbMultiResolutionPyramid.cxx
index efafee29d2..3671cda391 100644
--- a/Applications/Util/otbMultiResolutionPyramid.cxx
+++ b/Applications/Util/otbMultiResolutionPyramid.cxx
@@ -89,12 +89,12 @@ private:
     SetParameterFloat("vfactor", 0.6);
 
     // Boolean Fast scheme
-    //     AddParameter(ParameterType_Empty, "fast", "Use Fast Scheme");
-    //     std::ostringstream desc;
-    //     desc<<"If used, this option allows to speed-up computation by iteratively"
-    //        <<" subsampling previous level of pyramid instead of processing the full input";
-    //     SetParameterDescription("fast", desc.str());
-    //     MandatoryOff("fast");
+    AddParameter(ParameterType_Empty, "fast", "Use Fast Scheme");
+    std::ostringstream desc;
+    desc<<"If used, this option allows to speed-up computation by iteratively"
+        <<" subsampling previous level of pyramid instead of processing the full input";
+    SetParameterDescription("fast", desc.str());
+    MandatoryOff("fast");
   }
 
   void DoUpdateParameters()
@@ -115,8 +115,7 @@ private:
     unsigned int shrinkFactor = GetParameterInt("sfactor");
     double varianceFactor     = GetParameterFloat("vfactor");
 
-    //bool fastScheme = parseResult->IsOptionPresent("FastScheme");
-    bool fastScheme = false;
+    bool fastScheme = IsParameterEnabled("fast");
 
     // Get the input image
     FloatVectorImageType::Pointer inImage = GetParameterImage("in");
@@ -159,6 +158,10 @@ private:
         {
         currentFactor *= shrinkFactor;
         }
+      else
+        {
+        std::cout <<"fast scheme enabled : not implemented for the moment " << std::endl;
+        }
 
       // Get the Output Parameter to change the current image filename
       Parameter* param = GetParameterByKey("out");
-- 
GitLab