![Logo](itkLogoSmall.png) |
ITK
5.3.0
Insight Toolkit
|
Go to the documentation of this file.
19 #ifndef itkHistogramThresholdImageFilter_h
20 #define itkHistogramThresholdImageFilter_h
61 template <
typename TInputImage,
typename TOutputImage,
typename TMaskImage = TOutputImage>
118 static constexpr
unsigned int InputImageDimension = InputImageType::ImageDimension;
119 static constexpr
unsigned int OutputImageDimension = OutputImageType::ImageDimension;
120 static constexpr
unsigned int MaskImageDimension = MaskImageType::ImageDimension;
123 itkSetInputMacro(MaskImage, TMaskImage);
124 itkGetInputMacro(MaskImage, TMaskImage);
131 this->SetInput(input);
138 this->SetMaskImage(input);
143 itkSetMacro(OutsideValue, OutputPixelType);
146 itkGetConstMacro(OutsideValue, OutputPixelType);
150 itkSetMacro(InsideValue, OutputPixelType);
153 itkGetConstMacro(InsideValue, OutputPixelType);
156 itkSetMacro(NumberOfHistogramBins,
unsigned int);
157 itkGetConstMacro(NumberOfHistogramBins,
unsigned int);
162 itkSetMacro(AutoMinimumMaximum,
bool);
163 itkGetConstMacro(AutoMinimumMaximum,
bool);
164 itkBooleanMacro(AutoMinimumMaximum);
170 itkSetMacro(MaskOutput,
bool);
171 itkGetConstMacro(MaskOutput,
bool);
172 itkBooleanMacro(MaskOutput);
178 itkSetMacro(MaskValue, MaskPixelType);
179 itkGetConstMacro(MaskValue, MaskPixelType);
183 itkGetConstMacro(Threshold, InputPixelType);
186 itkSetObjectMacro(Calculator, CalculatorType);
187 itkGetModifiableObjectMacro(Calculator, CalculatorType);
190 #ifdef ITK_USE_CONCEPT_CHECKING
202 PrintSelf(std::ostream & os,
Indent indent)
const override;
205 GenerateInputRequestedRegion()
override;
207 GenerateData()
override;
212 Superclass::VerifyPreconditions();
213 if (m_Calculator.IsNull())
215 itkExceptionMacro(<<
"No threshold calculator set.");
222 SetUpHistogramGenerator(HistogramGeneratorPointer histogramGenerator);
229 unsigned int m_NumberOfHistogramBins{ 256 };
231 bool m_MaskOutput{
true };
236 #ifndef ITK_MANUAL_INSTANTIATION
237 # include "itkHistogramThresholdImageFilter.hxx"
void VerifyPreconditions() ITKv5_CONST override
Verifies that the process object has been configured correctly, that all required inputs are set,...
SmartPointer< Self > Pointer
typename InputImageType::IndexType InputIndexType
SmartPointer< const Self > ConstPointer
typename OutputImageType::Pointer OutputImagePointer
void SetInput1(const TInputImage *input)
typename InputImageType::PixelType InputPixelType
typename HistogramType::SizeType HistogramSizeType
typename HistogramType::Pointer HistogramPointer
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
Control indentation during Print() invocation.
typename HistogramType::ConstPointer HistogramConstPointer
CalculatorPointer m_Calculator
typename OutputImageType::IndexType OutputIndexType
MaskPixelType m_MaskValue
ImageBaseType::IndexType IndexType
Base class for filters that take an image as input and produce an image as output.
Base class for all process objects that output image data.
This class stores measurement vectors in the context of n-dimensional histogram.
OutputPixelType m_InsideValue
typename InputImageType::Pointer InputImagePointer
typename HistogramGeneratorType::Pointer HistogramGeneratorPointer
ImageBaseType::RegionType RegionType
typename MaskImageType::PixelType MaskPixelType
TInputImage InputImageType
typename InputImageType::SizeType InputSizeType
typename HistogramType::MeasurementType HistogramMeasurementType
Define additional traits for native types such as int or float.
Base class to compute a threshold value based on the histogram of an image.
typename HistogramType::MeasurementVectorType HistogramMeasurementVectorType
typename NumericTraits< ValueType >::RealType ValueRealType
void SetInput2(const TMaskImage *input)
typename OutputImageType::RegionType OutputImageRegionType
typename CalculatorType::Pointer CalculatorPointer
#define itkConceptMacro(name, concept)
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...
Array class with size defined at construction time.
InputPixelType m_Threshold
This class generates a histogram from an image.
typename NumericTraits< InputPixelType >::ValueType ValueType
OutputPixelType m_OutsideValue
TMeasurement MeasurementType
typename InputImageType::RegionType InputImageRegionType
typename MaskImageType::Pointer MaskImagePointer
TOutputImage OutputImageType
bool m_AutoMinimumMaximum