19#ifndef itkIntermodesThresholdImageFilter_h
20#define itkIntermodesThresholdImageFilter_h
51template <
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());
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 };
Threshold an image using a HistogramThresholdCalculator.
Base class for all process objects that output image data.
typename OutputImageType::RegionType OutputImageRegionType
TOutputImage OutputImageType
typename OutputImageType::Pointer OutputImagePointer
TInputImage InputImageType
typename InputImageType::Pointer InputImagePointer
typename InputImageType::RegionType InputImageRegionType
Control indentation during Print() invocation.
Computes the Intermodes's threshold for an image.
virtual void SetMaximumSmoothingIterations(SizeValueType _arg)
Threshold an image using the Intermodes Threshold.
typename OutputImageType::IndexType OutputIndexType
void VerifyPreconditions() const override
Verifies that the process object has been configured correctly, that all required inputs are set,...
typename MaskImageType::RegionType MaskImageRegionType
typename MaskImageType::IndexType MaskIndexType
~IntermodesThresholdImageFilter() override=default
typename InputImageType::SizeType InputSizeType
typename MaskImageType::SizeType MaskSizeType
typename OutputImageType::SizeType OutputSizeType
typename MaskImageType::PixelType MaskPixelType
IntermodesThresholdImageFilter()
void GenerateData() override
typename InputImageType::IndexType InputIndexType
typename OutputImageType::PixelType OutputPixelType
void PrintSelf(std::ostream &os, Indent indent) const override
typename InputImageType::PixelType InputPixelType
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
SmartPointer< Self > Pointer
ImageBaseType::RegionType RegionType
ImageBaseType::IndexType IndexType
ImageBaseType::SizeType SizeType
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
unsigned long SizeValueType