18 #ifndef itkPluginFilterWatcher_h 19 #define itkPluginFilterWatcher_h 22 #include <ModuleProcessInformation.h> 25 #include <itkSimpleFilterWatcher.h> 39 const char *comment=
"",
40 ModuleProcessInformation *inf=
nullptr,
41 double fraction = 1.0,
43 : SimpleFilterWatcher(o, comment)
56 if (this->GetProcess())
58 this->SetSteps( this->GetSteps()+1 );
59 if (!this->GetQuiet())
64 this->GetComment().c_str(), 1023);
74 this->GetTimeProbe().Stop();
76 = this->GetTimeProbe().GetMean()
77 * this->GetTimeProbe().GetNumberOfStops();
83 this->GetTimeProbe().Start();
87 this->GetProcess()->AbortGenerateDataOn();
100 std::cout <<
"<filter-progress>" 102 <<
"</filter-progress>" 106 std::cout <<
"<filter-stage-progress>" 107 << this->GetProcess()->GetProgress()
108 <<
"</filter-stage-progress>" 111 std::cout << std::flush;
122 this->SetIterations(0);
123 this->GetTimeProbe().Start();
124 if (!this->GetQuiet())
131 this->GetComment().c_str(), 1023);
141 std::cout <<
"<filter-start>" 143 std::cout <<
"<filter-name>" 144 << (this->GetProcess()
145 ? this->GetProcess()->GetNameOfClass() :
"None")
148 std::cout <<
"<filter-comment>" 149 <<
" \"" << this->GetComment() <<
"\" " 150 <<
"</filter-comment>" 152 std::cout <<
"</filter-start>" 154 std::cout << std::flush;
163 this->GetTimeProbe().Stop();
164 if (!this->GetQuiet())
172 = this->GetTimeProbe().GetMean()
173 * this->GetTimeProbe().GetNumberOfStops();
183 std::cout <<
"<filter-end>" 185 std::cout <<
"<filter-name>" 186 << (this->GetProcess()
187 ? this->GetProcess()->GetNameOfClass() :
"None")
190 std::cout <<
"<filter-time>" 191 << this->GetTimeProbe().GetMean()
194 std::cout <<
"</filter-end>";
195 std::cout << std::flush;
void EndFilter() override
Simplified inverse ITK transforms.
PluginFilterWatcher(itk::ProcessObject *o, const char *comment="", ModuleProcessInformation *inf=nullptr, double fraction=1.0, double start=0.0)
ModuleProcessInformation * m_ProcessInformation
void ShowProgress() override
Simple mechanism for monitoring the pipeline events of a filter and reporting these events to std::co...
void StartFilter() override