18#ifndef itkTotalProgressReporter_h
19#define itkTotalProgressReporter_h
56 float progressWeight = 1.0f);
68 if (m_Filter && m_Filter->GetAbortGenerateData())
71 ProcessAborted
e(__FILE__, __LINE__);
72 msg +=
"Object " + std::string(m_Filter->GetNameOfClass()) +
": AbortGenerateDataOn";
73 e.SetDescription(msg);
84 if (--m_PixelsBeforeUpdate == 0)
86 m_PixelsBeforeUpdate = m_PixelsPerUpdate;
87 m_CurrentPixel += m_PixelsPerUpdate;
92 m_Filter->IncrementProgress(m_PixelsPerUpdate * m_InverseNumberOfPixels * m_ProgressWeight);
94 this->CheckAbortGenerateData();
105 if (count >= m_PixelsBeforeUpdate)
110 m_PixelsBeforeUpdate = m_PixelsPerUpdate - total % m_PixelsPerUpdate;
111 m_CurrentPixel += numberOfUpdates * m_PixelsPerUpdate;
115 m_Filter->IncrementProgress(numberOfUpdates * m_PixelsPerUpdate * m_InverseNumberOfPixels * m_ProgressWeight);
117 this->CheckAbortGenerateData();
122 m_PixelsBeforeUpdate -= count;
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
A progress reporter for concurrent threads.
void Completed(SizeValueType count)
SizeValueType m_PixelsBeforeUpdate
SizeValueType m_CurrentPixel
TotalProgressReporter(ProcessObject *filter, SizeValueType totalNumberOfPixels, SizeValueType numberOfUpdates=100, float progressWeight=1.0f)
Construct a TotalProgressReporter.
float m_InverseNumberOfPixels
void CheckAbortGenerateData()
SizeValueType m_PixelsPerUpdate
static constexpr double e
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
unsigned long SizeValueType