ITK
6.0.0
Insight Toolkit
|
#include <itkTotalProgressReporter.h>
A progress reporter for concurrent threads.
Each thread should construct their own instance of the class. The ProcessObject::IncrementProgress method will be called to update the progress from all threads. The ProcessObject's method will automatically create ProgressEvents when the pipeline invoking thread updates the progress.
All threads concurrently contribute parts of the progress to the total number of pixels for all threads. This report will update the progress after a sufficient number of pixel to meet the numberOfUpdates requirement between all threads. Also when the object is deconstructed, all remaining pixels will increment the progress.
Definition at line 40 of file itkTotalProgressReporter.h.
Public Member Functions | |
void | Completed (SizeValueType count) |
TotalProgressReporter (ProcessObject *filter, SizeValueType totalNumberOfPixels, SizeValueType numberOfUpdates=100, float progressWeight=1.0f) | |
~TotalProgressReporter () | |
void | CheckAbortGenerateData () |
void | CompletedPixel () |
Protected Attributes | |
SizeValueType | m_CurrentPixel |
ProcessObject * | m_Filter |
float | m_InverseNumberOfPixels |
SizeValueType | m_PixelsBeforeUpdate |
SizeValueType | m_PixelsPerUpdate |
float | m_ProgressWeight |
itk::TotalProgressReporter::TotalProgressReporter | ( | ProcessObject * | filter, |
SizeValueType | totalNumberOfPixels, | ||
SizeValueType | numberOfUpdates = 100 , |
||
float | progressWeight = 1.0f |
||
) |
Construct a TotalProgressReporter.
filter | - the ProcessObject which whose progress will be updated. If nullptr then no updates will occur. |
totalNumberOfPixels | - the number of pixels between all threads and chunks that will be updated. If zero, any completed chunk will result in a progress event. |
numberOfUpdates | - controls how often the ProcessObject's progress will be incremented |
progressWeight | - A percentage of the filters progress, this total number of pixels will contribute |
itk::TotalProgressReporter::~TotalProgressReporter | ( | ) |
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 65 of file itkTotalProgressReporter.h.
References itk::Math::e.
|
inline |
Called by a filter when a chunk, region, scan-line, etc. is completed.
Definition at line 102 of file itkTotalProgressReporter.h.
|
inline |
Called by a filter once per pixel.
Definition at line 81 of file itkTotalProgressReporter.h.
|
protected |
Definition at line 129 of file itkTotalProgressReporter.h.
|
protected |
Definition at line 127 of file itkTotalProgressReporter.h.
|
protected |
Definition at line 128 of file itkTotalProgressReporter.h.
|
protected |
Definition at line 131 of file itkTotalProgressReporter.h.
|
protected |
Definition at line 130 of file itkTotalProgressReporter.h.
|
protected |
Definition at line 132 of file itkTotalProgressReporter.h.