18 #ifndef itkSimpleFilterWatcher_h
19 #define itkSimpleFilterWatcher_h
94 return (m_Process ? m_Process->GetNameOfClass() :
"None");
132 return m_Process.GetPointer();
196 const std::lock_guard<std::mutex> lockGuard(m_ProgressOutput);
200 std::cout <<
" | " << m_Process->GetProgress() << std::flush;
201 if ((m_Steps % 10) == 0)
203 std::cout << std::endl;
208 if (m_Process->GetProgress() > .03)
210 m_Process->AbortGenerateDataOn();
233 std::cout << std::endl <<
"-------Aborted" << std::endl << std::flush;
240 std::cout <<
" #" << std::flush;
251 std::cout <<
"-------- Start " << (m_Process.GetPointer() ? m_Process->GetNameOfClass() :
"None") <<
" \""
252 << m_Comment <<
"\" ";
257 std::cout << m_Process;
264 std::cout << (m_Quiet ?
"Progress Quiet " :
"Progress ") << std::flush;
273 std::cout << std::endl
274 <<
"Filter took " << m_TimeProbe.GetMean() <<
" seconds." << std::endl
275 <<
"-------- End " << (m_Process.GetPointer() ? m_Process->GetNameOfClass() :
"None") <<
" \""
276 << m_Comment <<
"\" " << std::endl;
281 std::cout << m_Process;
287 std::cout << std::flush;
291 itkExceptionMacro(
"Filter does not have progress.");
299 int m_Iterations{ 0 };
300 bool m_Quiet{
false };
301 bool m_TestAbort{
false };
302 std::string m_Comment{};
304 std::mutex m_ProgressOutput{};
313 unsigned long m_StartTag{ 0 };
314 unsigned long m_EndTag{ 0 };
315 unsigned long m_ProgressTag{ 0 };
316 unsigned long m_IterationTag{ 0 };
317 unsigned long m_AbortTag{ 0 };