19 #ifndef itkIntermodesThresholdImageFilter_h
20 #define itkIntermodesThresholdImageFilter_h
51 template <
typename TInputImage,
typename TOutputImage,
typename TMaskImage = TOutputImage>
93 using typename Superclass::HistogramType;
102 itkSetMacro(UseInterMode,
bool);
103 itkGetConstReferenceMacro(UseInterMode,
bool);
104 itkBooleanMacro(UseInterMode);
108 static constexpr
unsigned int InputImageDimension = InputImageType::ImageDimension;
109 static constexpr
unsigned int OutputImageDimension = OutputImageType::ImageDimension;
115 calculator->SetMaximumSmoothingIterations(m_MaximumSmoothingIterations);
116 calculator->SetUseInterMode(m_UseInterMode);
117 Superclass::SetCalculator(calculator);
124 Superclass::VerifyPreconditions();
125 if (dynamic_cast<const CalculatorType *>(Superclass::GetCalculator()) ==
nullptr)
127 itkExceptionMacro(
"Invalid IntermodesCalculator.");
134 auto calculator = static_cast<CalculatorType *>(this->Superclass::GetModifiableCalculator());
135 calculator->SetMaximumSmoothingIterations(m_MaximumSmoothingIterations);
136 calculator->SetUseInterMode(m_UseInterMode);
137 this->Superclass::GenerateData();
144 Superclass::PrintSelf(os, indent);
145 os << indent <<
"MaximumSmoothingIterations: " << m_MaximumSmoothingIterations << std::endl;
146 os << indent <<
"UseInterMode: " << m_UseInterMode << std::endl;
151 bool m_UseInterMode{
true };