18 #ifndef itkTotalProgressReporter_h
19 #define itkTotalProgressReporter_h
55 float progressWeight = 1.0f);
67 if (m_Filter && m_Filter->GetAbortGenerateData())
70 ProcessAborted
e(__FILE__, __LINE__);
71 msg +=
"Object " + std::string(m_Filter->GetNameOfClass()) +
": AbortGenerateDataOn";
72 e.SetDescription(msg);
83 if (--m_PixelsBeforeUpdate == 0)
85 m_PixelsBeforeUpdate = m_PixelsPerUpdate;
86 m_CurrentPixel += m_PixelsPerUpdate;
91 m_Filter->IncrementProgress(m_PixelsPerUpdate * m_InverseNumberOfPixels * m_ProgressWeight);
93 this->CheckAbortGenerateData();
104 if (count >= m_PixelsBeforeUpdate)
106 SizeValueType total = static_cast<SizeValueType>(m_PixelsPerUpdate - m_PixelsBeforeUpdate) + count;
109 m_PixelsBeforeUpdate = m_PixelsPerUpdate - total % m_PixelsPerUpdate;
110 m_CurrentPixel += numberOfUpdates * m_PixelsPerUpdate;
114 m_Filter->IncrementProgress(numberOfUpdates * m_PixelsPerUpdate * m_InverseNumberOfPixels * m_ProgressWeight);
116 this->CheckAbortGenerateData();
121 m_PixelsBeforeUpdate -= count;