18 #ifndef __itkBinaryThresholdImageFunction_h
19 #define __itkBinaryThresholdImageFunction_h
42 template<
class TInputImage,
class TCoordRep =
float >
66 itkStaticConstMacro(ImageDimension,
unsigned int, Superclass::ImageDimension);
86 virtual bool Evaluate(
const PointType & point)
const
90 this->ConvertPointToNearestIndex(point, index);
91 return ( this->EvaluateAtIndex(index) );
102 virtual bool EvaluateAtContinuousIndex(
107 this->ConvertContinuousIndexToNearestIndex (index, nindex);
108 return this->EvaluateAtIndex(nindex);
119 virtual bool EvaluateAtIndex(
const IndexType & index)
const
121 PixelType value = this->GetInputImage()->GetPixel(index);
123 return ( m_Lower <= value && value <= m_Upper );
127 itkGetConstReferenceMacro(Lower, PixelType);
130 itkGetConstReferenceMacro(Upper, PixelType);
133 void ThresholdAbove(PixelType thresh);
136 void ThresholdBelow(PixelType thresh);
139 void ThresholdBetween(PixelType lower, PixelType upper);
144 void PrintSelf(std::ostream & os,
Indent indent)
const;
148 void operator=(
const Self &);
156 #define ITK_TEMPLATE_BinaryThresholdImageFunction(_, EXPORT, TypeX, TypeY) \
159 _( 2 ( class EXPORT BinaryThresholdImageFunction< ITK_TEMPLATE_2 TypeX > ) ) \
160 namespace Templates \
162 typedef BinaryThresholdImageFunction< ITK_TEMPLATE_2 TypeX > \
163 BinaryThresholdImageFunction##TypeY; \
167 #if ITK_TEMPLATE_EXPLICIT
168 #include "Templates/itkBinaryThresholdImageFunction+-.h"
172 #include "itkBinaryThresholdImageFunction.hxx"