18 #ifndef itkMultiLabelSTAPLEImageFilter_h
19 #define itkMultiLabelSTAPLEImageFilter_h
118 template <
typename TInputImage,
typename TOutputImage = TInputImage,
typename TWeights =
float>
143 static constexpr
unsigned int ImageDimension = TOutputImage::ImageDimension;
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;
218 itkGetMacro(LabelForUndecidedPixels, OutputPixelType);
221 itkGetMacro(HasLabelForUndecidedPixels,
bool);
228 if (this->m_HasLabelForUndecidedPixels)
230 this->m_HasLabelForUndecidedPixels =
false;
245 this->m_PriorProbabilities = ppa;
246 this->m_HasPriorProbabilities =
true;
258 itkGetConstReferenceMacro(PriorProbabilities, PriorProbabilitiesType);
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)
292 GenerateData()
override;
295 PrintSelf(std::ostream &,
Indent)
const override;
298 typename TInputImage::PixelType
299 ComputeMaximumInputValue();
303 GenerateInputRequestedRegion()
override;
307 EnlargeOutputRequestedRegion(
DataObject *)
override;
310 size_t m_TotalLabelCount{ 0 };
313 bool m_HasLabelForUndecidedPixels{
false };
315 bool m_HasPriorProbabilities{
false };
319 InitializePriorProbabilities();
325 AllocateConfusionMatrixArray();
327 InitializeConfusionMatrixArrayFromVoting();
329 bool m_HasMaximumNumberOfIterations{
false };
330 unsigned int m_MaximumNumberOfIterations{ 0 };
331 unsigned int m_ElapsedNumberOfIterations{ 0u };
338 #ifndef ITK_MANUAL_INSTANTIATION
339 # include "itkMultiLabelSTAPLEImageFilter.hxx"