18#ifndef itkBinaryThresholdImageFilter_h
19#define itkBinaryThresholdImageFilter_h
66template <
typename TInput,
typename TOutput>
74 m_OutsideValue = TOutput{};
84 m_LowerThreshold = thresh;
89 m_UpperThreshold = thresh;
94 m_InsideValue = value;
99 m_OutsideValue = value;
116 if (m_LowerThreshold <= A && A <= m_UpperThreshold)
118 return m_InsideValue;
120 return m_OutsideValue;
131template <
typename TInputImage,
typename TOutputImage>
136 Functor::BinaryThreshold<typename TInputImage::PixelType, typename TOutputImage::PixelType>>
212#ifdef ITK_USE_CONCEPT_CHECKING
238#ifndef ITK_MANUAL_INSTANTIATION
239# include "itkBinaryThresholdImageFilter.hxx"
Binarize an input image by thresholding.
typename TInputImage::PixelType InputPixelType
virtual const InputPixelObjectType * GetLowerThresholdInput() const
BinaryThresholdImageFilter()
void BeforeThreadedGenerateData() override
virtual InputPixelType GetLowerThreshold() const
virtual InputPixelObjectType * GetUpperThresholdInput()
virtual const InputPixelObjectType * GetUpperThresholdInput() const
~BinaryThresholdImageFilter() override=default
virtual void SetUpperThreshold(const InputPixelType threshold)
virtual void SetLowerThreshold(const InputPixelType threshold)
typename TOutputImage::PixelType OutputPixelType
virtual void SetLowerThresholdInput(const InputPixelObjectType *)
virtual void SetUpperThresholdInput(const InputPixelObjectType *)
virtual InputPixelObjectType * GetLowerThresholdInput()
virtual InputPixelType GetUpperThreshold() const
void PrintSelf(std::ostream &os, Indent indent) const override
void SetUpperThreshold(const TInput &thresh)
void SetLowerThreshold(const TInput &thresh)
void SetInsideValue(const TOutput &value)
ITK_UNEQUAL_OPERATOR_MEMBER_FUNCTION(BinaryThreshold)
bool operator==(const BinaryThreshold &other) const
TOutput operator()(const TInput &A) const
void SetOutsideValue(const TOutput &value)
~BinaryThreshold()=default
Base class for all process objects that output image data.
Control indentation during Print() invocation.
static constexpr T NonpositiveMin()
static constexpr T max(const T &)
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Decorates any "simple" data type (data types without smart pointers) with a DataObject API.
Implements pixel-wise generic operation on one image.
#define itkConceptMacro(name, concept)
bool ExactlyEquals(const TInput1 &x1, const TInput2 &x2)
Return the result of an exact comparison between two scalar values of potentially different types.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....