itkNeighborhoodBinaryThresholdImageFunction.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkNeighborhoodBinaryThresholdImageFunction_h
00018 #define __itkNeighborhoodBinaryThresholdImageFunction_h
00019
00020 #include "itkBinaryThresholdImageFunction.h"
00021
00022 namespace itk
00023 {
00024
00040 template <class TInputImage, class TCoordRep = float >
00041 class ITK_EXPORT NeighborhoodBinaryThresholdImageFunction :
00042 public BinaryThresholdImageFunction< TInputImage, TCoordRep >
00043 {
00044 public:
00045
00047 typedef NeighborhoodBinaryThresholdImageFunction Self;
00048 typedef BinaryThresholdImageFunction<TInputImage,TCoordRep> Superclass;
00049 typedef SmartPointer<Self> Pointer;
00050 typedef SmartPointer<const Self> ConstPointer;
00051
00053 itkTypeMacro(NeighborhoodBinaryThresholdImageFunction, BinaryThresholdImageFunction);
00054
00056 itkNewMacro(Self);
00057
00059 typedef TInputImage InputImageType;
00060
00062 typedef typename Superclass::OutputType OutputType;
00063
00065 typedef typename Superclass::IndexType IndexType;
00066
00068 typedef typename Superclass::ContinuousIndexType ContinuousIndexType;
00069
00071 typedef typename Superclass::PointType PointType;
00072
00074 typedef typename Superclass::PixelType PixelType;
00075
00077 itkStaticConstMacro(ImageDimension, unsigned int,
00078 InputImageType::ImageDimension);
00079
00081 typedef typename InputImageType::SizeType InputSizeType;
00082
00084 itkSetMacro(Radius, InputSizeType);
00085
00087 itkGetConstReferenceMacro(Radius, InputSizeType);
00088
00090 virtual bool EvaluateAtIndex( const IndexType& index ) const;
00091
00093 virtual bool Evaluate( const PointType& point ) const
00094 {
00095 IndexType index;
00096 this->ConvertPointToNearestIndex( point, index );
00097 return this->EvaluateAtIndex( index );
00098 }
00099 virtual bool EvaluateAtContinuousIndex(
00100 const ContinuousIndexType& cindex ) const
00101 {
00102 IndexType index;
00103 this->ConvertContinuousIndexToNearestIndex( cindex, index );
00104 return this->EvaluateAtIndex( index );
00105 }
00107
00108 protected:
00109 NeighborhoodBinaryThresholdImageFunction();
00110 ~NeighborhoodBinaryThresholdImageFunction(){};
00111 void PrintSelf(std::ostream& os, Indent indent) const;
00112
00113 private:
00114 NeighborhoodBinaryThresholdImageFunction( const Self& );
00115 void operator=( const Self& );
00116
00117 InputSizeType m_Radius;
00118 };
00119
00120 }
00121
00122
00123 #define ITK_TEMPLATE_NeighborhoodBinaryThresholdImageFunction(_, EXPORT, x, y) namespace itk { \
00124 _(2(class EXPORT NeighborhoodBinaryThresholdImageFunction< ITK_TEMPLATE_2 x >)) \
00125 namespace Templates { typedef NeighborhoodBinaryThresholdImageFunction< ITK_TEMPLATE_2 x > \
00126 NeighborhoodBinaryThresholdImageFunction##y; } \
00127 }
00128
00129 #if ITK_TEMPLATE_EXPLICIT
00130 # include "Templates/itkNeighborhoodBinaryThresholdImageFunction+-.h"
00131 #endif
00132
00133 #if ITK_TEMPLATE_TXX
00134 # include "itkNeighborhoodBinaryThresholdImageFunction.txx"
00135 #endif
00136
00137
00138
00139
00140
00141
00142
00143 #endif
00144