From cba1fb9b0634d911e979c253f8964fe8419e3eb4 Mon Sep 17 00:00:00 2001 From: David Sarrut Date: Fri, 3 Feb 2012 07:57:12 +0100 Subject: [PATCH] Add option for newStep --- common/clitkFilterBase.cxx | 5 +++-- common/clitkFilterBase.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/common/clitkFilterBase.cxx b/common/clitkFilterBase.cxx index 32dd9b4..f6bebad 100644 --- a/common/clitkFilterBase.cxx +++ b/common/clitkFilterBase.cxx @@ -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; } } diff --git a/common/clitkFilterBase.h b/common/clitkFilterBase.h index b05f64d..7403f37 100644 --- a/common/clitkFilterBase.h +++ b/common/clitkFilterBase.h @@ -118,7 +118,7 @@ namespace clitk { protected: FilterBase(); virtual ~FilterBase() {} - void StartNewStep(std::string s); + void StartNewStep(std::string s, bool endl=true); template void StopCurrentStep(typename TInternalImageType::Pointer p, std::string txt=""); void StopCurrentStep(); -- 2.47.1