ITK
5.2.0
Insight Toolkit
|
#include <itkProgressReporter.h>
Public Member Functions | |
ProgressReporter (ProcessObject *filter, ThreadIdType threadId, SizeValueType numberOfPixels, SizeValueType numberOfUpdates=100, float initialProgress=0.0f, float progressWeight=1.0f) | |
~ProgressReporter () | |
ProcessObject * | m_Filter |
ThreadIdType | m_ThreadId |
float | m_InverseNumberOfPixels |
SizeValueType | m_CurrentPixel |
SizeValueType | m_PixelsPerUpdate |
SizeValueType | m_PixelsBeforeUpdate |
float | m_InitialProgress |
float | m_ProgressWeight |
void | CheckAbortGenerateData () |
void | CompletedPixel () |
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.
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.
|
inline |
Check if the filter has the ProcessObject::AbortGenerateData flag set. If true, then a ProcessAborted exception will be thrown.
Definition at line 80 of file itkProgressReporter.h.
References itk::Math::e.
|
inline |
Called by a filter once per pixel.
Definition at line 96 of file itkProgressReporter.h.
Referenced by itk::BoxAccumulateFunction(), itk::BoxMeanCalculatorFunction(), itk::BoxSigmaCalculatorFunction(), and itk::BoxSquareAccumulateFunction().
|
protected |
Check if the filter has the ProcessObject::AbortGenerateData flag set. If true, then a ProcessAborted exception will be thrown.
Definition at line 119 of file itkProgressReporter.h.
|
protected |
Check if the filter has the ProcessObject::AbortGenerateData flag set. If true, then a ProcessAborted exception will be thrown.
Definition at line 116 of file itkProgressReporter.h.
|
protected |
Check if the filter has the ProcessObject::AbortGenerateData flag set. If true, then a ProcessAborted exception will be thrown.
Definition at line 122 of file itkProgressReporter.h.
|
protected |
Check if the filter has the ProcessObject::AbortGenerateData flag set. If true, then a ProcessAborted exception will be thrown.
Definition at line 118 of file itkProgressReporter.h.
|
protected |
Check if the filter has the ProcessObject::AbortGenerateData flag set. If true, then a ProcessAborted exception will be thrown.
Definition at line 121 of file itkProgressReporter.h.
|
protected |
Check if the filter has the ProcessObject::AbortGenerateData flag set. If true, then a ProcessAborted exception will be thrown.
Definition at line 120 of file itkProgressReporter.h.
|
protected |
Check if the filter has the ProcessObject::AbortGenerateData flag set. If true, then a ProcessAborted exception will be thrown.
Definition at line 123 of file itkProgressReporter.h.
|
protected |
Check if the filter has the ProcessObject::AbortGenerateData flag set. If true, then a ProcessAborted exception will be thrown.
Definition at line 117 of file itkProgressReporter.h.