ITK
5.2.0
Insight Toolkit
|
#include <itkTotalProgressReporter.h>
Public Member Functions | |
TotalProgressReporter (ProcessObject *filter, SizeValueType totalNumberOfPixels, SizeValueType numberOfUpdates=100, float progressWeight=1.0f) | |
~TotalProgressReporter () | |
ProcessObject * | m_Filter |
float | m_InverseNumberOfPixels |
SizeValueType | m_CurrentPixel |
SizeValueType | m_PixelsPerUpdate |
SizeValueType | m_PixelsBeforeUpdate |
float | m_ProgressWeight |
void | CheckAbortGenerateData () |
void | CompletedPixel () |
void | Completed (SizeValueType count) |
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.
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 |
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 64 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 101 of file itkTotalProgressReporter.h.
|
inline |
Called by a filter once per pixel.
Definition at line 80 of file itkTotalProgressReporter.h.
|
protected |
Check if the filter has the ProcessObject::AbortGenerateData flag set. If true, then a ProcessAborted exception will be thrown.
Definition at line 128 of file itkTotalProgressReporter.h.
|
protected |
Check if the filter has the ProcessObject::AbortGenerateData flag set. If true, then a ProcessAborted exception will be thrown.
Definition at line 126 of file itkTotalProgressReporter.h.
|
protected |
Check if the filter has the ProcessObject::AbortGenerateData flag set. If true, then a ProcessAborted exception will be thrown.
Definition at line 127 of file itkTotalProgressReporter.h.
|
protected |
Check if the filter has the ProcessObject::AbortGenerateData flag set. If true, then a ProcessAborted exception will be thrown.
Definition at line 130 of file itkTotalProgressReporter.h.
|
protected |
Check if the filter has the ProcessObject::AbortGenerateData flag set. If true, then a ProcessAborted exception will be thrown.
Definition at line 129 of file itkTotalProgressReporter.h.
|
protected |
Check if the filter has the ProcessObject::AbortGenerateData flag set. If true, then a ProcessAborted exception will be thrown.
Definition at line 131 of file itkTotalProgressReporter.h.