vtkPluginFilterWatcher Class Reference

Simple mechanism for monitoring the pipeline events of a filter and reporting these events to std::cout. More...

#include <vtkPluginFilterWatcher.h>

List of all members.

Public Member Functions

std::string GetComment ()
std::string GetComment ()
double GetFraction ()
double GetFraction ()
const charGetNameOfClass ()
const charGetNameOfClass ()
vtkAlgorithm * GetProcess ()
vtkAlgorithm * GetProcess ()
ModuleProcessInformationGetProcessInformation ()
ModuleProcessInformationGetProcessInformation ()
bool GetQuiet ()
bool GetQuiet ()
double GetStart ()
double GetStart ()
int GetSteps ()
int GetSteps ()
void QuietOff ()
void QuietOff ()
void QuietOn ()
void QuietOn ()
void SetQuiet (bool val)
void SetQuiet (bool val)
void SetSteps (int val)
void SetSteps (int val)
 vtkPluginFilterWatcher (vtkAlgorithm *o, const char *comment="", ModuleProcessInformation *inf=0, double fraction=1.0, double start=0.0)
 vtkPluginFilterWatcher (vtkAlgorithm *o, const char *comment="", ModuleProcessInformation *inf=0, double fraction=1.0, double start=0.0)
virtual ~vtkPluginFilterWatcher ()
virtual ~vtkPluginFilterWatcher ()

Private Attributes

std::string Comment
vtkPluginWatcherEndEndFilterCommand
unsigned long EndTag
double Fraction
vtkAlgorithm * Process
ModuleProcessInformationProcessInformation
vtkPluginWatcherProgressProgressFilterCommand
unsigned long ProgressTag
bool Quiet
double Start
vtkPluginWatcherStartStartFilterCommand
unsigned long StartTag
int Steps

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:

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.

Todo:
Allow any stream object to be used for the output (not just 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.

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

Constructor & Destructor Documentation

vtkPluginFilterWatcher::vtkPluginFilterWatcher ( vtkAlgorithm *  o,
const char comment = "",
ModuleProcessInformation inf = 0,
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.

References vtkPluginWatcherProgress::New(), vtkPluginWatcherEnd::New(), and vtkPluginWatcherStart::New().

vtkPluginFilterWatcher::~vtkPluginFilterWatcher (  )  [virtual]

Destructor.

vtkPluginFilterWatcher::vtkPluginFilterWatcher ( vtkAlgorithm *  o,
const char comment = "",
ModuleProcessInformation inf = 0,
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 vtkPluginFilterWatcher::~vtkPluginFilterWatcher (  )  [virtual]

Destructor.


Member Function Documentation

std::string vtkPluginFilterWatcher::GetComment (  )  [inline]

Get the comment for the watcher.

std::string vtkPluginFilterWatcher::GetComment (  )  [inline]

Get the comment for the watcher.

Referenced by vtkPluginWatcherProgress::Execute(), and vtkPluginWatcherStart::Execute().

double vtkPluginFilterWatcher::GetFraction (  )  [inline]
double vtkPluginFilterWatcher::GetFraction (  )  [inline]
const char* vtkPluginFilterWatcher::GetNameOfClass (  )  [inline]

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

const char* vtkPluginFilterWatcher::GetNameOfClass (  )  [inline]

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

vtkAlgorithm* vtkPluginFilterWatcher::GetProcess (  )  [inline]

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

vtkAlgorithm* vtkPluginFilterWatcher::GetProcess (  )  [inline]

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

Referenced by vtkPluginWatcherProgress::Execute(), vtkPluginWatcherEnd::Execute(), and vtkPluginWatcherStart::Execute().

ModuleProcessInformation* vtkPluginFilterWatcher::GetProcessInformation (  )  [inline]

Get the pointer for the process information.

ModuleProcessInformation* vtkPluginFilterWatcher::GetProcessInformation (  )  [inline]

Get the pointer for the process information.

Referenced by vtkPluginWatcherProgress::Execute(), vtkPluginWatcherEnd::Execute(), and vtkPluginWatcherStart::Execute().

bool vtkPluginFilterWatcher::GetQuiet (  )  [inline]
bool vtkPluginFilterWatcher::GetQuiet (  )  [inline]
double vtkPluginFilterWatcher::GetStart (  )  [inline]

Get the start and fraction values.

double vtkPluginFilterWatcher::GetStart (  )  [inline]

Get the start and fraction values.

Referenced by vtkPluginWatcherProgress::Execute().

int vtkPluginFilterWatcher::GetSteps (  )  [inline]
int vtkPluginFilterWatcher::GetSteps (  )  [inline]
void vtkPluginFilterWatcher::QuietOff (  )  [inline]
void vtkPluginFilterWatcher::QuietOff (  )  [inline]
void vtkPluginFilterWatcher::QuietOn (  )  [inline]

Methods to control the verbosity of the messages. Quiet reporting limits the information emitted at a ProgressEvent.

void vtkPluginFilterWatcher::QuietOn (  )  [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.

void vtkPluginFilterWatcher::SetQuiet ( bool  val  )  [inline]

Set/Get the quiet mode boolean. If true, verbose progess is reported.

void vtkPluginFilterWatcher::SetQuiet ( bool  val  ) 

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

References ProgressFilterCommand, Quiet, and vtkPluginWatcherProgress::SetQuiet().

void vtkPluginFilterWatcher::SetSteps ( int  val  )  [inline]

Set/Get the steps completed.

void vtkPluginFilterWatcher::SetSteps ( int  val  )  [inline]

Set/Get the steps completed.

Referenced by vtkPluginWatcherProgress::Execute(), and vtkPluginWatcherStart::Execute().


Member Data Documentation

std::string vtkPluginFilterWatcher::Comment [private]
unsigned long vtkPluginFilterWatcher::EndTag [private]
vtkAlgorithm * vtkPluginFilterWatcher::Process [private]

Referenced by SetQuiet().

unsigned long vtkPluginFilterWatcher::ProgressTag [private]

Referenced by SetQuiet().

unsigned long vtkPluginFilterWatcher::StartTag [private]

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

Generated on 6 Apr 2011 for Slicer3 by  doxygen 1.6.1