18#ifndef itkMultiLabelSTAPLEImageFilter_h
19#define itkMultiLabelSTAPLEImageFilter_h
118template <
typename TInputImage,
typename TOutputImage = TInputImage,
typename TWeights =
float>
143 static constexpr unsigned int ImageDimension = TOutputImage::ImageDimension;
152 using typename Superclass::OutputImageRegionType;
164 itkGetConstMacro(ElapsedNumberOfIterations,
unsigned int);
171 this->m_MaximumNumberOfIterations = mit;
172 this->m_HasMaximumNumberOfIterations =
true;
175 itkGetConstMacro(MaximumNumberOfIterations,
unsigned int);
179 itkGetConstMacro(HasMaximumNumberOfIterations,
bool);
186 if (this->m_HasMaximumNumberOfIterations)
188 this->m_HasMaximumNumberOfIterations =
false;
196 itkSetMacro(TerminationUpdateThreshold, TWeights);
197 itkGetConstMacro(TerminationUpdateThreshold, TWeights);
205 this->m_LabelForUndecidedPixels = l;
206 this->m_HasLabelForUndecidedPixels =
true;
221 itkGetMacro(HasLabelForUndecidedPixels,
bool);
228 if (this->m_HasLabelForUndecidedPixels)
230 this->m_HasLabelForUndecidedPixels =
false;
245 this->m_PriorProbabilities = ppa;
246 this->m_HasPriorProbabilities =
true;
261 itkGetMacro(HasPriorProbabilities,
bool);
268 if (this->m_HasPriorProbabilities)
270 this->m_HasPriorProbabilities =
false;
278 const ConfusionMatrixType &
281 return this->m_ConfusionMatrixArray[i];
287 , m_TerminationUpdateThreshold(1
e-5)
298 typename TInputImage::PixelType
310 size_t m_TotalLabelCount{ 0 };
313 bool m_HasLabelForUndecidedPixels{
false };
315 bool m_HasPriorProbabilities{
false };
321 std::vector<ConfusionMatrixType> m_ConfusionMatrixArray{};
322 std::vector<ConfusionMatrixType> m_UpdatedConfusionMatrixArray{};
329 bool m_HasMaximumNumberOfIterations{
false };
330 unsigned int m_MaximumNumberOfIterations{ 0 };
331 unsigned int m_ElapsedNumberOfIterations{ 0u };
333 TWeights m_TerminationUpdateThreshold{};
338#ifndef ITK_MANUAL_INSTANTIATION
339# include "itkMultiLabelSTAPLEImageFilter.hxx"
Array2D class representing a 2D array.
Base class for all data objects in ITK.
A multi-dimensional iterator templated over image type that walks a region of pixels.
A multi-dimensional iterator templated over image type that walks a region of pixels.
Base class for filters that take an image as input and produce an image as output.
Control indentation during Print() invocation.
Light weight base class for most itk classes.
This filter performs a pixelwise combination of an arbitrary number of input images,...
void UnsetPriorProbabilities()
void InitializeConfusionMatrixArrayFromVoting()
void PrintSelf(std::ostream &, Indent) const override
void GenerateData() override
const ConfusionMatrixType & GetConfusionMatrix(const unsigned int i) const
void SetMaximumNumberOfIterations(const unsigned int mit)
MultiLabelSTAPLEImageFilter()
TOutputImage OutputImageType
typename InputImageType::Pointer InputImagePointer
void UnsetMaximumNumberOfIterations()
typename OutputImageType::Pointer OutputImagePointer
void SetLabelForUndecidedPixels(const OutputPixelType l)
typename TInputImage::PixelType InputPixelType
~MultiLabelSTAPLEImageFilter() override=default
TInputImage::PixelType ComputeMaximumInputValue()
void InitializePriorProbabilities()
typename TOutputImage::PixelType OutputPixelType
void EnlargeOutputRequestedRegion(DataObject *) override
TInputImage InputImageType
void AllocateConfusionMatrixArray()
void UnsetLabelForUndecidedPixels()
void GenerateInputRequestedRegion() override
void SetPriorProbabilities(const PriorProbabilitiesType &ppa)
SmartPointer< Self > Pointer
static constexpr double e
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....