18 #ifndef __itkSimpleFilterWatcher_h
19 #define __itkSimpleFilterWatcher_h
91 return ( m_Process.GetPointer() ? m_Process->GetNameOfClass() :
"None" );
144 std::cout <<
" | " << m_Process->GetProgress() << std::flush;
145 if ( ( m_Steps % 10 ) == 0 )
147 std::cout << std::endl;
152 if ( m_Process->GetProgress() > .03 )
154 m_Process->AbortGenerateDataOn();
164 std::cout << std::endl <<
"-------Aborted" << std::endl << std::flush;
170 std::cout <<
" #" << std::flush;
180 std::cout <<
"-------- Start "
181 << ( m_Process.GetPointer() ? m_Process->GetNameOfClass() :
"None" )
182 <<
" \"" << m_Comment <<
"\" ";
187 std::cout << m_Process;
194 std::cout << ( m_Quiet ?
"Progress Quiet " :
"Progress " )
203 std::cout << std::endl <<
"Filter took "
204 << m_TimeProbe.GetMean()
206 std::cout << std::endl
208 << ( m_Process.GetPointer() ? m_Process->GetNameOfClass() :
"None" )
209 <<
" \"" << m_Comment <<
"\" " << std::endl;
214 std::cout << m_Process;
220 std::cout << std::flush;
224 itkExceptionMacro (
"Filter does not have progress.");
CommandType::Pointer m_EndFilterCommand
TimeProbe & GetTimeProbe()
virtual void ShowIteration()
Computes the time passed between two points in code.
ProcessObject * GetProcess()
virtual void ShowProgress()
const char * GetNameOfClass()
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
CommandType::Pointer m_IterationFilterCommand
unsigned long m_IterationTag
CommandType::Pointer m_ProgressFilterCommand
A Command subclass that calls a pointer to a member function.
CommandType::Pointer m_StartFilterCommand
SimpleMemberCommand< SimpleFilterWatcher > CommandType
unsigned long m_ProgressTag
itk::ProcessObject::Pointer m_Process
void SetIterations(int val)
virtual void StartFilter()
Simple mechanism for monitoring the pipeline events of a filter and reporting these events to std::co...
CommandType::Pointer m_AbortFilterCommand