]> Creatis software - clitk.git/commitdiff
Add option for newStep
authorDavid Sarrut <david.sarrut@gmail.com>
Fri, 3 Feb 2012 06:57:12 +0000 (07:57 +0100)
committerDavid Sarrut <david.sarrut@creatis.insa-lyon.fr>
Thu, 31 Jan 2013 13:58:36 +0000 (14:58 +0100)
common/clitkFilterBase.cxx
common/clitkFilterBase.h

index 32dd9b4..f6bebad 100644 (file)
@@ -49,7 +49,7 @@ void clitk::FilterBase::SetWarning(std::string e)
 
 
 //--------------------------------------------------------------------
-void clitk::FilterBase::StartNewStep(std::string s) 
+void clitk::FilterBase::StartNewStep(std::string s, bool endl) 
 {
   if (Cancelled()) {
     throw clitk::ExceptionObject("Filter is canceled.");
@@ -69,7 +69,8 @@ void clitk::FilterBase::StartNewStep(std::string s)
 
   m_CurrentStepName = "Step "+GetCurrentStepId()+" -- "+s;
   if (GetVerboseStepFlag()) {
-    std::cout << m_CurrentStepName << std::endl;
+    std::cout << m_CurrentStepName;
+    if (endl) std::cout << std::endl;
     //"Step " << GetCurrentStepId() << " -- " << s << std::endl;
   }
 }
index b05f64d..7403f37 100644 (file)
@@ -118,7 +118,7 @@ namespace clitk {
   protected:
     FilterBase();
     virtual ~FilterBase() {}    
-    void StartNewStep(std::string s);
+    void StartNewStep(std::string s, bool endl=true);
     template<class TInternalImageType>
     void StopCurrentStep(typename TInternalImageType::Pointer p, std::string txt="");
     void StopCurrentStep();