Slicer  5.3
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
List of all members | Public Member Functions
vtkPluginFilterWatcher Class Reference

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 ()

Detailed Description

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:


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.

Allow any stream object to be used for the output (not just std::cout)

Definition at line 54 of file vtkPluginFilterWatcher.h.

Constructor & Destructor Documentation

◆ vtkPluginFilterWatcher()

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.

◆ ~vtkPluginFilterWatcher()

virtual vtkPluginFilterWatcher::~vtkPluginFilterWatcher ( )


Member Function Documentation

◆ GetComment()

std::string vtkPluginFilterWatcher::GetComment ( )

Get the comment for the watcher.

Definition at line 99 of file vtkPluginFilterWatcher.h.

◆ GetFraction()

double vtkPluginFilterWatcher::GetFraction ( )

Definition at line 91 of file vtkPluginFilterWatcher.h.

◆ GetNameOfClass()

const char* vtkPluginFilterWatcher::GetNameOfClass ( )

Method to get the name of the class be monitored by this vtkPluginFilterWatcher

Definition at line 70 of file vtkPluginFilterWatcher.h.

◆ GetProcess()

vtkAlgorithm* vtkPluginFilterWatcher::GetProcess ( )

Methods to access member data Get a pointer to the process object being watched.

Definition at line 83 of file vtkPluginFilterWatcher.h.

◆ GetProcessInformation()

ModuleProcessInformation* vtkPluginFilterWatcher::GetProcessInformation ( )

Get the pointer for the process information.

Definition at line 102 of file vtkPluginFilterWatcher.h.

◆ GetQuiet()

bool vtkPluginFilterWatcher::GetQuiet ( )

Definition at line 96 of file vtkPluginFilterWatcher.h.

◆ GetStart()

double vtkPluginFilterWatcher::GetStart ( )

Get the start and fraction values.

Definition at line 90 of file vtkPluginFilterWatcher.h.

◆ GetSteps()

int vtkPluginFilterWatcher::GetSteps ( )

Definition at line 87 of file vtkPluginFilterWatcher.h.

◆ QuietOff()

void vtkPluginFilterWatcher::QuietOff ( )

Definition at line 79 of file vtkPluginFilterWatcher.h.

◆ QuietOn()

void vtkPluginFilterWatcher::QuietOn ( )

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.

◆ SetQuiet()

void vtkPluginFilterWatcher::SetQuiet ( bool  val)

Set/Get the quiet mode boolean. If false, verbose progress is reported.

◆ SetSteps()

void vtkPluginFilterWatcher::SetSteps ( int  val)

Set/Get the steps completed.

Definition at line 86 of file vtkPluginFilterWatcher.h.

The documentation for this class was generated from the following file: