#include <itkProgressReporter.h>
Collaboration diagram for itk::ProgressReporter:
Public Member Functions | |
ProgressReporter (ProcessObject *filter, int threadId, unsigned long numberOfPixels, unsigned long numberOfUpdates=100, float initialProgress=0.0f, float progressWeight=1.0f) | |
~ProgressReporter () | |
void | CompletedPixel () |
Protected Attributes | |
ProcessObject * | m_Filter |
int | m_ThreadId |
float | m_InverseNumberOfPixels |
unsigned long | m_CurrentPixel |
unsigned long | m_PixelsPerUpdate |
unsigned long | m_PixelsBeforeUpdate |
float | m_InitialProgress |
float | m_ProgressWeight |
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:
ProgressReporter progress(this, threadId, threadRegion.GetNumberOfPixels(), 100); for( each pixel ) { ... progress.CompletedPixel(); }
When used in a non-threaded filter, the threadId argument should be 0.
Definition at line 58 of file itkProgressReporter.h.
|
Constructor sets progress to 0 because the filter is starting. |
|
Destructor sets progress to 1 because the filter has finished. |
|
Called by a filter once per pixel. Definition at line 72 of file itkProgressReporter.h. |
|
Definition at line 98 of file itkProgressReporter.h. |
|
Definition at line 95 of file itkProgressReporter.h. |
|
Definition at line 101 of file itkProgressReporter.h. |
|
Definition at line 97 of file itkProgressReporter.h. |
|
Definition at line 100 of file itkProgressReporter.h. |
|
Definition at line 99 of file itkProgressReporter.h. |
|
Definition at line 102 of file itkProgressReporter.h. |
|
Definition at line 96 of file itkProgressReporter.h. |