#include <itkProgressReporter.h>
Collaboration diagram for itk::ProgressReporter:
Public Methods | |
ProgressReporter (ProcessObject *filter, int threadId, unsigned long numberOfPixels, unsigned long numberOfUpdates=100) | |
~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 |
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 49 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 61 of file itkProgressReporter.h. References m_CurrentPixel, m_Filter, m_InverseNumberOfPixels, m_PixelsBeforeUpdate, m_PixelsPerUpdate, and itk::ProcessObject::UpdateProgress(). |
|
Definition at line 78 of file itkProgressReporter.h. Referenced by CompletedPixel(). |
|
Definition at line 75 of file itkProgressReporter.h. Referenced by CompletedPixel(). |
|
Definition at line 77 of file itkProgressReporter.h. Referenced by CompletedPixel(). |
|
Definition at line 80 of file itkProgressReporter.h. Referenced by CompletedPixel(). |
|
Definition at line 79 of file itkProgressReporter.h. Referenced by CompletedPixel(). |
|
Definition at line 76 of file itkProgressReporter.h. |