|
ITK
6.0.0
Insight Toolkit
|
Go to the documentation of this file.
19 #ifndef itkOtsuThresholdImageFilter_h
20 #define itkOtsuThresholdImageFilter_h
54 template <
typename TInputImage,
typename TOutputImage,
typename TMaskImage = TOutputImage>
96 using typename Superclass::HistogramType;
100 static constexpr
unsigned int InputImageDimension = InputImageType::ImageDimension;
101 static constexpr
unsigned int OutputImageDimension = OutputImageType::ImageDimension;
105 itkSetMacro(ReturnBinMidpoint,
bool);
106 itkGetConstReferenceMacro(ReturnBinMidpoint,
bool);
107 itkBooleanMacro(ReturnBinMidpoint);
117 auto calc = static_cast<CalculatorType *>(this->GetModifiableCalculator());
118 calc->SetReturnBinMidpoint(m_ReturnBinMidpoint);
119 this->Superclass::GenerateData();
125 Superclass::VerifyPreconditions();
126 if (dynamic_cast<const CalculatorType *>(Superclass::GetCalculator()) ==
nullptr)
128 itkExceptionMacro(
"Invalid OtsuThresholdCalculator.");
133 bool m_ReturnBinMidpoint{
false };
SmartPointer< Self > Pointer
typename InputImageType::IndexType InputIndexType
void VerifyPreconditions() const override
Verifies that the process object has been configured correctly, that all required inputs are set,...
typename OutputImageType::Pointer OutputImagePointer
typename InputImageType::PixelType InputPixelType
typename MaskImageType::RegionType MaskImageRegionType
typename MaskImageType::SizeType MaskSizeType
ImageBaseType::SizeType SizeType
typename OutputImageType::SizeType OutputSizeType
Threshold an image using a HistogramThresholdCalculator.
typename OutputImageType::PixelType OutputPixelType
Threshold an image using the Otsu Threshold.
typename OutputImageType::IndexType OutputIndexType
ImageBaseType::IndexType IndexType
Base class for all process objects that output image data.
typename InputImageType::Pointer InputImagePointer
Computes the Otsu's threshold for an image.
ImageBaseType::RegionType RegionType
typename MaskImageType::PixelType MaskPixelType
TInputImage InputImageType
typename InputImageType::SizeType InputSizeType
OtsuThresholdImageFilter()
Base class to compute a threshold value based on the histogram of an image.
typename OutputImageType::RegionType OutputImageRegionType
typename MaskImageType::IndexType MaskIndexType
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
void GenerateData() override
typename InputImageType::RegionType InputImageRegionType
TOutputImage OutputImageType