ITK
4.8.0
Insight Segmentation and Registration Toolkit
|
#include <itkProgressReporter.h>
Implements progress tracking for a filter.
This is a utility class for use by filter implementations in GenerateData() and ThreadedGenerateData().
The class constructor sets the progress to 0, and the destructor sets it to 1. In between, there should be one call to CompletedPixel() per pixel. The reporter will automatically update the filter's progress at an interval resulting in the specified number of updates. The default number of updates is 100.
Example usage:
When used in a non-threaded filter, the threadId argument should be 0.
Definition at line 60 of file itkProgressReporter.h.
Public Member Functions | |
ProgressReporter (ProcessObject *filter, ThreadIdType threadId, SizeValueType numberOfPixels, SizeValueType numberOfUpdates=100, float initialProgress=0.0f, float progressWeight=1.0f) | |
~ProgressReporter () | |
void | CompletedPixel () |
Protected Attributes | |
SizeValueType | m_CurrentPixel |
ProcessObject * | m_Filter |
float | m_InitialProgress |
float | m_InverseNumberOfPixels |
SizeValueType | m_PixelsBeforeUpdate |
SizeValueType | m_PixelsPerUpdate |
float | m_ProgressWeight |
ThreadIdType | m_ThreadId |
Private Member Functions | |
ProgressReporter () | |
itk::ProgressReporter::ProgressReporter | ( | ProcessObject * | filter, |
ThreadIdType | threadId, | ||
SizeValueType | numberOfPixels, | ||
SizeValueType | numberOfUpdates = 100 , |
||
float | initialProgress = 0.0f , |
||
float | progressWeight = 1.0f |
||
) |
Constructor sets progress to 0 because the filter is starting.
itk::ProgressReporter::~ProgressReporter | ( | ) |
Destructor sets progress to 1 because the filter has finished.
|
private |
|
inline |
Called by a filter once per pixel.
Definition at line 74 of file itkProgressReporter.h.
References itk::Math::e, and itk::ExceptionObject::SetDescription().
Referenced by itk::BoxAccumulateFunction(), itk::BoxMeanCalculatorFunction(), itk::BoxSigmaCalculatorFunction(), itk::BoxSquareAccumulateFunction(), itk::doOneDimension(), itk::LabSet::doOneDimensionDilate(), itk::LabSet::doOneDimensionDilateFirstPass(), itk::LabSet::doOneDimensionErode(), itk::LabSet::doOneDimensionErodeFirstPass(), and itk::ShapeRelabelLabelMapFilter< TImage >::TemplatedGenerateData().
|
protected |
Definition at line 104 of file itkProgressReporter.h.
|
protected |
Definition at line 101 of file itkProgressReporter.h.
|
protected |
Definition at line 107 of file itkProgressReporter.h.
|
protected |
Definition at line 103 of file itkProgressReporter.h.
|
protected |
Definition at line 106 of file itkProgressReporter.h.
|
protected |
Definition at line 105 of file itkProgressReporter.h.
|
protected |
Definition at line 108 of file itkProgressReporter.h.
|
protected |
Definition at line 102 of file itkProgressReporter.h.