18#ifndef itkProgressReporter_h
19#define itkProgressReporter_h
70 float initialProgress = 0.0f,
71 float progressWeight = 1.0f);
83 if (m_Filter && m_Filter->GetAbortGenerateData())
86 ProcessAborted
e(__FILE__, __LINE__);
87 msg +=
"Object " + std::string(m_Filter->GetNameOfClass()) +
": AbortGenerateDataOn";
88 e.SetDescription(msg);
99 if (--m_PixelsBeforeUpdate == 0)
101 m_PixelsBeforeUpdate = m_PixelsPerUpdate;
102 m_CurrentPixel += m_PixelsPerUpdate;
104 if (m_ThreadId == 0 && m_Filter)
106 m_Filter->UpdateProgress(
static_cast<float>(m_CurrentPixel) * m_InverseNumberOfPixels * m_ProgressWeight +
111 this->CheckAbortGenerateData();
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Implements progress tracking for a filter.
float m_InverseNumberOfPixels
void CheckAbortGenerateData()
SizeValueType m_CurrentPixel
SizeValueType m_PixelsBeforeUpdate
SizeValueType m_PixelsPerUpdate
ProgressReporter(ProcessObject *filter, ThreadIdType threadId, SizeValueType numberOfPixels, SizeValueType numberOfUpdates=100, float initialProgress=0.0f, float progressWeight=1.0f)
static constexpr double e
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
unsigned int ThreadIdType
unsigned long SizeValueType