18 #ifndef itkBinaryThresholdImageFunction_h
19 #define itkBinaryThresholdImageFunction_h
42 template<
typename TInputImage,
typename TCoordRep =
float >
68 static constexpr
unsigned int ImageDimension = Superclass::ImageDimension;
92 this->ConvertPointToNearestIndex(point, index);
93 return ( this->EvaluateAtIndex(index) );
109 this->ConvertContinuousIndexToNearestIndex (index, nindex);
110 return this->EvaluateAtIndex(nindex);
123 PixelType value = this->GetInputImage()->GetPixel(index);
125 return ( m_Lower <= value && value <= m_Upper );
129 itkGetConstReferenceMacro(Lower, PixelType);
132 itkGetConstReferenceMacro(Upper, PixelType);
135 void ThresholdAbove(PixelType thresh);
138 void ThresholdBelow(PixelType thresh);
141 void ThresholdBetween(PixelType lower, PixelType upper);
146 void PrintSelf(std::ostream & os,
Indent indent)
const override;
154 #ifndef ITK_MANUAL_INSTANTIATION
155 #include "itkBinaryThresholdImageFunction.hxx"
Light weight base class for most itk classes.
bool Evaluate(const PointType &point) const override
typename Superclass::IndexType IndexType
typename Superclass::PointType PointType
bool EvaluateAtIndex(const IndexType &index) const override
typename Superclass::ContinuousIndexType ContinuousIndexType
ImageBaseType::IndexType IndexType
typename TInputImage::PixelType PixelType
bool EvaluateAtContinuousIndex(const ContinuousIndexType &index) const override
typename Superclass::InputImageType InputImageType
Control indentation during Print() invocation.
ImageBaseType::PointType PointType
Returns true is the value of an image lies within a range of thresholds This ImageFunction returns tr...
Evaluates a function of an image at specified position.