ITK
5.2.0
Insight Toolkit
|
#include <itkSimpleFilterWatcher.h>
Simple mechanism for monitoring the pipeline events of a filter and reporting these events to std::cout.
SimpleFilterWatcher provides a simple mechanism for monitoring the execution of filter. SimpleFilterWatcher is a stack-based object which takes a pointer to a ProcessObject at constructor time. SimpleFilterWatcher creates a series of commands that are registered as observers to the specified ProcessObject. The events monitored are:
StartEvent EndEvent ProgressEvent IterationEvent AbortEvent
The callbacks routines registered for these events emit a simple message to std::cout.
Example of use:
using FilterType = itk::BinaryThresholdImageFilter<ImageType>; FilterType::Pointer thresholdFilter = FilterType::New();
SimpleFilterWatcher watcher(thresholdFilter, "Threshold");
The second argument to the constructor to SimpleFilterWatcher is an optional string that is prepended to the event messages. This allows the user to associate the emitted messages to a particular filter/variable.
Definition at line 67 of file itkSimpleFilterWatcher.h.
|
private |
Methods to control the verbosity of the messages. Quiet reporting limits the information emitted at a ProgressEvent.
Definition at line 303 of file itkSimpleFilterWatcher.h.
itk::SimpleFilterWatcher::SimpleFilterWatcher | ( | itk::ProcessObject * | o, |
const char * | comment = "" |
||
) |
Constructor. Takes a ProcessObject to monitor and an optional comment string that is prepended to each event message.
itk::SimpleFilterWatcher::SimpleFilterWatcher | ( | const SimpleFilterWatcher & | ) |
Copy constructor
itk::SimpleFilterWatcher::SimpleFilterWatcher | ( | ) |
Default constructor. Only provided so that you can have std::vectors of SimpleFilterWatchers.
|
virtual |
Destructor.
|
protected |
Create commands for different event types.
|
protected |
The common code for copying this class.
|
inlineprotectedvirtual |
Callback method to show the EndEvent
Reimplemented in itk::XMLFilterWatcher.
Definition at line 268 of file itkSimpleFilterWatcher.h.
|
inline |
Get the comment for the watcher.
Definition at line 176 of file itkSimpleFilterWatcher.h.
|
inline |
Methods to control the verbosity of the messages. Quiet reporting limits the information emitted at a ProgressEvent.
Definition at line 154 of file itkSimpleFilterWatcher.h.
|
inline |
Method to get the name of the class be monitored by this SimpleFilterWatcher
Definition at line 91 of file itkSimpleFilterWatcher.h.
|
inline |
Methods to access member data Get a pointer to the process object being watched.
Definition at line 129 of file itkSimpleFilterWatcher.h.
|
inline |
Methods to control the verbosity of the messages. Quiet reporting limits the information emitted at a ProgressEvent.
Definition at line 168 of file itkSimpleFilterWatcher.h.
|
inline |
Methods to control the verbosity of the messages. Quiet reporting limits the information emitted at a ProgressEvent.
Definition at line 141 of file itkSimpleFilterWatcher.h.
|
inline |
Get a reference to the TimeProbe
Definition at line 183 of file itkSimpleFilterWatcher.h.
SimpleFilterWatcher& itk::SimpleFilterWatcher::operator= | ( | const SimpleFilterWatcher & | ) |
operator=
|
inline |
Methods to control the verbosity of the messages. Quiet reporting limits the information emitted at a ProgressEvent.
Definition at line 104 of file itkSimpleFilterWatcher.h.
|
inline |
Methods to control the verbosity of the messages. Quiet reporting limits the information emitted at a ProgressEvent.
Definition at line 99 of file itkSimpleFilterWatcher.h.
|
protected |
Remove observers we have on the process object.
|
inline |
Set/Get the number of iterations completed.
Definition at line 149 of file itkSimpleFilterWatcher.h.
|
inline |
Set/Get the quiet mode boolean. If true, verbose progress is reported.
Definition at line 163 of file itkSimpleFilterWatcher.h.
|
inline |
Set/Get the steps completed.
Definition at line 136 of file itkSimpleFilterWatcher.h.
|
inlineprotectedvirtual |
Callback method to show the AbortEvent
Definition at line 229 of file itkSimpleFilterWatcher.h.
|
inlineprotectedvirtual |
Callback method to show the IterationEvent
Definition at line 236 of file itkSimpleFilterWatcher.h.
|
inlineprotectedvirtual |
Callback method to show the ProgressEvent
Reimplemented in itk::XMLFilterWatcher.
Definition at line 191 of file itkSimpleFilterWatcher.h.
|
inlineprotectedvirtual |
Callback method to show the StartEvent
Reimplemented in itk::XMLFilterWatcher.
Definition at line 244 of file itkSimpleFilterWatcher.h.
|
inline |
Methods to control the verbosity of the messages. Quiet reporting limits the information emitted at a ProgressEvent.
Definition at line 119 of file itkSimpleFilterWatcher.h.
|
inline |
Methods to use to test the AbortEvent of the a filter. If TestAbort is on, the filter being watched will be aborted when the progress reaches 30%.
Definition at line 114 of file itkSimpleFilterWatcher.h.
|
private |
Methods to control the verbosity of the messages. Quiet reporting limits the information emitted at a ProgressEvent.
Definition at line 308 of file itkSimpleFilterWatcher.h.
|
private |
Methods to control the verbosity of the messages. Quiet reporting limits the information emitted at a ProgressEvent.
Definition at line 314 of file itkSimpleFilterWatcher.h.
|
private |
Methods to control the verbosity of the messages. Quiet reporting limits the information emitted at a ProgressEvent.
Definition at line 300 of file itkSimpleFilterWatcher.h.
|
private |
Methods to control the verbosity of the messages. Quiet reporting limits the information emitted at a ProgressEvent.
Definition at line 305 of file itkSimpleFilterWatcher.h.
|
private |
Methods to control the verbosity of the messages. Quiet reporting limits the information emitted at a ProgressEvent.
Definition at line 311 of file itkSimpleFilterWatcher.h.
|
private |
Methods to control the verbosity of the messages. Quiet reporting limits the information emitted at a ProgressEvent.
Definition at line 307 of file itkSimpleFilterWatcher.h.
|
private |
Methods to control the verbosity of the messages. Quiet reporting limits the information emitted at a ProgressEvent.
Definition at line 297 of file itkSimpleFilterWatcher.h.
|
private |
Methods to control the verbosity of the messages. Quiet reporting limits the information emitted at a ProgressEvent.
Definition at line 313 of file itkSimpleFilterWatcher.h.
|
private |
Methods to control the verbosity of the messages. Quiet reporting limits the information emitted at a ProgressEvent.
Definition at line 301 of file itkSimpleFilterWatcher.h.
|
private |
Methods to control the verbosity of the messages. Quiet reporting limits the information emitted at a ProgressEvent.
Definition at line 306 of file itkSimpleFilterWatcher.h.
|
private |
Methods to control the verbosity of the messages. Quiet reporting limits the information emitted at a ProgressEvent.
Definition at line 312 of file itkSimpleFilterWatcher.h.
|
private |
Methods to control the verbosity of the messages. Quiet reporting limits the information emitted at a ProgressEvent.
Definition at line 298 of file itkSimpleFilterWatcher.h.
|
private |
Methods to control the verbosity of the messages. Quiet reporting limits the information emitted at a ProgressEvent.
Definition at line 304 of file itkSimpleFilterWatcher.h.
|
private |
Methods to control the verbosity of the messages. Quiet reporting limits the information emitted at a ProgressEvent.
Definition at line 310 of file itkSimpleFilterWatcher.h.
|
private |
Methods to control the verbosity of the messages. Quiet reporting limits the information emitted at a ProgressEvent.
Definition at line 296 of file itkSimpleFilterWatcher.h.
|
private |
Methods to control the verbosity of the messages. Quiet reporting limits the information emitted at a ProgressEvent.
Definition at line 299 of file itkSimpleFilterWatcher.h.
|
private |
Methods to control the verbosity of the messages. Quiet reporting limits the information emitted at a ProgressEvent.
Definition at line 295 of file itkSimpleFilterWatcher.h.