|
Slicer
5.0
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
|
Simple mechanism for monitoring the pipeline events of a filter and reporting these events to std::cout. More...
#include <Base/CLI/vtkPluginFilterWatcher.h>
Public Member Functions | |
| std::string | GetComment () |
| double | GetFraction () |
| const char * | GetNameOfClass () |
| vtkAlgorithm * | GetProcess () |
| ModuleProcessInformation * | GetProcessInformation () |
| bool | GetQuiet () |
| double | GetStart () |
| int | GetSteps () |
| void | QuietOff () |
| void | QuietOn () |
| void | SetQuiet (bool val) |
| void | SetSteps (int val) |
| vtkPluginFilterWatcher (vtkAlgorithm *o, const char *comment="", ModuleProcessInformation *inf=nullptr, double fraction=1.0, double start=0.0) | |
| virtual | ~vtkPluginFilterWatcher () |
Simple mechanism for monitoring the pipeline events of a filter and reporting these events to std::cout.
vtkPluginFilterWatcher provides a simple mechanism for monitoring the execution of filter. vtkPluginFilterWatcher is a stack-based object which takes a pointer to a vtkAlgorithm at constructor time. vtkPluginFilterWatcher creates a series of commands that are registered as observers to the specified vtkAlgorithm. The events monitored are:
StartEvent EndEvent ProgressEvent
The callbacks routines registered for these events emit a simple message to std::cout.
Example of use:
typedef vtk::BinaryThresholdImageFilter<ImageType> FilterType; FilterType::Pointer thresholdFilter = FilterType::New();
vtkPluginFilterWatcher watcher(thresholdFilter, "Threshold");
The second argument to the constructor to vtkPluginFilterWatcher 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 54 of file vtkPluginFilterWatcher.h.
| vtkPluginFilterWatcher::vtkPluginFilterWatcher | ( | vtkAlgorithm * | o, |
| const char * | comment = "", |
||
| ModuleProcessInformation * | inf = nullptr, |
||
| double | fraction = 1.0, |
||
| double | start = 0.0 |
||
| ) |
Constructor. Takes a vtkAlgorithm to monitor and an optional comment string that is prepended to each event message.
|
virtual |
Destructor.
|
inline |
Get the comment for the watcher.
Definition at line 99 of file vtkPluginFilterWatcher.h.
|
inline |
Definition at line 91 of file vtkPluginFilterWatcher.h.
|
inline |
Method to get the name of the class be monitored by this vtkPluginFilterWatcher
Definition at line 70 of file vtkPluginFilterWatcher.h.
|
inline |
Methods to access member data Get a pointer to the process object being watched.
Definition at line 83 of file vtkPluginFilterWatcher.h.
|
inline |
Get the pointer for the process information.
Definition at line 102 of file vtkPluginFilterWatcher.h.
|
inline |
Definition at line 96 of file vtkPluginFilterWatcher.h.
|
inline |
Get the start and fraction values.
Definition at line 90 of file vtkPluginFilterWatcher.h.
|
inline |
Definition at line 87 of file vtkPluginFilterWatcher.h.
|
inline |
Definition at line 79 of file vtkPluginFilterWatcher.h.
|
inline |
Methods to control the verbosity of the messages. Quiet reporting limits the information emitted at a ProgressEvent: only filter start and filter end are emitted.
Definition at line 78 of file vtkPluginFilterWatcher.h.
| void vtkPluginFilterWatcher::SetQuiet | ( | bool | val | ) |
Set/Get the quiet mode boolean. If false, verbose progress is reported.
|
inline |
Set/Get the steps completed.
Definition at line 86 of file vtkPluginFilterWatcher.h.
1.8.14