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)
107 SizeValueType total = static_cast<SizeValueType>(m_PixelsPerUpdate - m_PixelsBeforeUpdate) + count;
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;