From 1c141212cea92016726cb991a72e1375c170dc58 Mon Sep 17 00:00:00 2001
From: Cyrille Valladeau <cyrille.valladeau@c-s.fr>
Date: Fri, 16 Sep 2011 18:45:24 +0200
Subject: [PATCH] ENH: commandline in progress

---
 Applications/Util/otbRescale.cxx                          | 2 ++
 Code/ApplicationEngine/otbWrapperOutputImageParameter.cxx | 3 ++-
 .../CommandLine/otbWrapperCommandLineLauncher.cxx         | 8 +++-----
 3 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/Applications/Util/otbRescale.cxx b/Applications/Util/otbRescale.cxx
index 1d103c2f6a..10ca7afbe6 100644
--- a/Applications/Util/otbRescale.cxx
+++ b/Applications/Util/otbRescale.cxx
@@ -71,6 +71,8 @@ private:
     SetParameterDescription( "outmin", "Minimum value of the output image." );
     SetParameterFloat("outmax", 255);
     SetParameterDescription( "outmax", "Maximum value of the output image." );
+
+    MandatoryOff("outmin");
   }
 
   void DoUpdateParameters()
diff --git a/Code/ApplicationEngine/otbWrapperOutputImageParameter.cxx b/Code/ApplicationEngine/otbWrapperOutputImageParameter.cxx
index 2f025c2bf5..95873b7418 100644
--- a/Code/ApplicationEngine/otbWrapperOutputImageParameter.cxx
+++ b/Code/ApplicationEngine/otbWrapperOutputImageParameter.cxx
@@ -17,7 +17,7 @@
 =========================================================================*/
 #include "otbWrapperOutputImageParameter.h"
 #include "itkCastImageFilter.h"
-
+#include "otbStandardFilterWatcher.h"
 namespace otb
 {
 namespace Wrapper
@@ -113,6 +113,7 @@ OutputImageParameter::Write( )
       {
       m_FloatWriter->SetFileName( this->GetFileName() );
       m_FloatWriter->SetInput(this->GetImage());
+      //StandardFilterWatcher watch(static_cast<itk::ProcessObject*>(m_FloatWriter), "oss.str()");
       m_FloatWriter->Update();
       }
       break;
diff --git a/Code/Wrappers/CommandLine/otbWrapperCommandLineLauncher.cxx b/Code/Wrappers/CommandLine/otbWrapperCommandLineLauncher.cxx
index 852ba28ec0..c3f6016436 100644
--- a/Code/Wrappers/CommandLine/otbWrapperCommandLineLauncher.cxx
+++ b/Code/Wrappers/CommandLine/otbWrapperCommandLineLauncher.cxx
@@ -334,7 +334,6 @@ CommandLineLauncher::LoadParameters()
 void
 CommandLineLauncher::LinkWatchers()
 {
-  /*
   m_FilterWatcherList.clear();
   m_WriterWatcherList.clear();
   // Link internall filters watcher
@@ -361,18 +360,17 @@ CommandLineLauncher::LinkWatchers()
 
            std::cout<<"----++++"<<std::endl;
            std::cout<<"----++++: "<<outputParam->GetWriter()<<std::endl;
-     std::cout<<"----++++"<<std::endl;
+           std::cout<<"----++++"<<std::endl;
            //typedef otb::StreamingImageFileWriter<FloatVectorImageType>  FloatWriterType;
            //StandardWriterWatcher watch(static_cast<FloatWriterType::Pointer>(static_cast<FloatWriterType *>(outputParam->GetWriter())), "write that");
            //StandardWriterWatcher watch(outputParam->GetWriter(), "write that");
            //m_WriterWatcherList.push_back( watch );
-     StandardFilterWatcher watch(outputParam->GetWriter(), oss.str());
-           m_FilterWatcherList.push_back( watch );
+           //StandardFilterWatcher watch(outputParam->GetWriter(), oss.str());
+           //m_FilterWatcherList.push_back( watch );
            
         }
     }
    std::cout<<"BRRRRRRRRRRRRRRR fin"<<std::endl;
-   */
 }
 
 void
-- 
GitLab