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 &);
155 #ifndef ITK_MANUAL_INSTANTIATION
156 #include "itkBinaryThresholdImageFunction.hxx"