#include <itkSimpleFilterWatcher.h>
Inheritance diagram for itk::SimpleFilterWatcher:
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:
typedef itk::BinaryThresholdImageFilter<ImageType> FilterType; 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 63 of file itkSimpleFilterWatcher.h.
Public Member Functions | |
const char * | GetNameOfClass () |
void | operator= (const SimpleFilterWatcher &) |
SimpleFilterWatcher () | |
SimpleFilterWatcher (const SimpleFilterWatcher &) | |
SimpleFilterWatcher (itk::ProcessObject *o, const char *comment="") | |
virtual | ~SimpleFilterWatcher () |
void | QuietOff () |
void | QuietOn () |
void | TestAbortOff () |
void | TestAbortOn () |
Protected Member Functions | |
virtual void | ShowAbort () |
virtual void | ShowIteration () |
virtual void | EndFilter () |
virtual void | ShowProgress () |
virtual void | StartFilter () |
Friends | |
class | XMLFilterWatcher |
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 itk::SimpleFilterWatcher::~SimpleFilterWatcher | ( | ) | [virtual] |
Destructor.
virtual void itk::SimpleFilterWatcher::EndFilter | ( | ) | [inline, protected, virtual] |
Callback method to show the EndEvent
Reimplemented in itk::XMLFilterWatcher.
Definition at line 173 of file itkSimpleFilterWatcher.h.
References itkExceptionMacro.
const char* itk::SimpleFilterWatcher::GetNameOfClass | ( | ) | [inline] |
Method to get the name of the class be monitored by this SimpleFilterWatcher
Definition at line 88 of file itkSimpleFilterWatcher.h.
void itk::SimpleFilterWatcher::operator= | ( | const SimpleFilterWatcher & | ) |
operator=
void itk::SimpleFilterWatcher::QuietOff | ( | ) | [inline] |
Definition at line 96 of file itkSimpleFilterWatcher.h.
void itk::SimpleFilterWatcher::QuietOn | ( | ) | [inline] |
Methods to control the verbosity of the messages. Quiet reporting limits the information emitted at a ProgressEvent.
Definition at line 95 of file itkSimpleFilterWatcher.h.
virtual void itk::SimpleFilterWatcher::ShowAbort | ( | ) | [inline, protected, virtual] |
Callback method to show the AbortEvent
Definition at line 135 of file itkSimpleFilterWatcher.h.
virtual void itk::SimpleFilterWatcher::ShowIteration | ( | ) | [inline, protected, virtual] |
Callback method to show the IterationEvent
Definition at line 141 of file itkSimpleFilterWatcher.h.
virtual void itk::SimpleFilterWatcher::ShowProgress | ( | ) | [inline, protected, virtual] |
Callback method to show the ProgressEvent
Reimplemented in itk::XMLFilterWatcher.
Definition at line 110 of file itkSimpleFilterWatcher.h.
virtual void itk::SimpleFilterWatcher::StartFilter | ( | ) | [inline, protected, virtual] |
Callback method to show the StartEvent
Reimplemented in itk::XMLFilterWatcher.
Definition at line 148 of file itkSimpleFilterWatcher.h.
void itk::SimpleFilterWatcher::TestAbortOff | ( | ) | [inline] |
Definition at line 103 of file itkSimpleFilterWatcher.h.
void itk::SimpleFilterWatcher::TestAbortOn | ( | ) | [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 102 of file itkSimpleFilterWatcher.h.
friend class XMLFilterWatcher [friend] |
Classes that need access to filter's private data
Definition at line 67 of file itkSimpleFilterWatcher.h.