18 #ifndef itkSimpleFilterWatcher_h
19 #define itkSimpleFilterWatcher_h
91 return ( m_Process ? 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();
162 void CreateCommands();
165 void RemoveObservers();
173 std::cout << std::endl <<
"-------Aborted" << std::endl << std::flush;
179 std::cout <<
" #" << std::flush;
189 std::cout <<
"-------- Start "
190 << ( m_Process.GetPointer() ? m_Process->GetNameOfClass() :
"None" )
191 <<
" \"" << m_Comment <<
"\" ";
196 std::cout << m_Process;
203 std::cout << ( m_Quiet ?
"Progress Quiet " :
"Progress " )
212 std::cout << std::endl <<
"Filter took "
213 << m_TimeProbe.GetMean()
215 std::cout << std::endl
217 << ( m_Process.GetPointer() ? m_Process->GetNameOfClass() :
"None" )
218 <<
" \"" << m_Comment <<
"\" " << std::endl;
223 std::cout << m_Process;
229 std::cout << std::flush;
233 itkExceptionMacro (
"Filter does not have progress.");
243 bool m_TestAbort{
false};
254 unsigned long m_StartTag{0};
255 unsigned long m_EndTag{0};
256 unsigned long m_ProgressTag{0};
257 unsigned long m_IterationTag{0};
258 unsigned long m_AbortTag{0};
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
CommandType::Pointer m_ProgressFilterCommand
A Command subclass that calls a pointer to a member function.
CommandType::Pointer m_StartFilterCommand
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