00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef _itkNeighborhoodOperatorImageFunction_h
00018 #define _itkNeighborhoodOperatorImageFunction_h
00019
00020 #include "itkImageFunction.h"
00021 #include "itkNeighborhood.h"
00022
00023 namespace itk
00024 {
00025
00035 template <class TInputImage,class TOutput>
00036 class ITK_EXPORT NeighborhoodOperatorImageFunction :
00037 public ImageFunction< TInputImage, TOutput >
00038 {
00039 public:
00040
00042 typedef NeighborhoodOperatorImageFunction Self;
00043
00045 typedef ImageFunction<TInputImage, TOutput> Superclass;
00046
00048 typedef SmartPointer<Self> Pointer;
00049 typedef SmartPointer<const Self> ConstPointer;
00050
00052 itkNewMacro(Self);
00053
00055 typedef TInputImage InputImageType;
00056 typedef typename InputImageType::PixelType InputPixelType;
00057 typedef typename Superclass::IndexType IndexType;
00058 typedef typename Superclass::ContinuousIndexType ContinuousIndexType;
00059
00061 itkTypeMacro( NeighborhoodOperatorImageFunction, ImageFunction );
00062
00063
00065 itkStaticConstMacro(ImageDimension, unsigned int,
00066 InputImageType::ImageDimension);
00067
00068 typedef Neighborhood<TOutput, itkGetStaticConstMacro(ImageDimension)> NeighborhoodType;
00069
00071 typedef typename Superclass::PointType PointType;
00072
00074
00075
00079 void SetOperator(const NeighborhoodType &p) const
00080 {
00081 m_Operator = p;
00082 this->Modified();
00083 }
00084
00087 virtual TOutput Evaluate(const PointType& ) const
00088 {
00089 std::cout << "NeighborhoodOperatorImageFunction::Evaluate(): Not implemented!" << std::endl;
00090 TOutput out;
00091 out = 0;
00092 return out;
00093 }
00095 virtual TOutput EvaluateAtIndex( const IndexType & index ) const;
00096
00099 virtual TOutput EvaluateAtContinuousIndex(
00100 const ContinuousIndexType & ) const
00101 {
00102 std::cout << "NeighborhoodOperatorImageFunction::EvaluateAtContinuousIndex():Not implemented!" << std::endl;
00103 TOutput out;
00104 out = 0;
00105 return out;
00106 }
00107
00108 protected:
00109 NeighborhoodOperatorImageFunction();
00110 NeighborhoodOperatorImageFunction( const Self& ){};
00111
00112 ~NeighborhoodOperatorImageFunction(){};
00113
00114 void operator=( const Self& ){};
00115 void PrintSelf(std::ostream& os, Indent indent) const;
00116
00117 private:
00118
00119 mutable NeighborhoodType m_Operator;
00120
00121 };
00122
00123 }
00124
00125 #ifndef ITK_MANUAL_INSTANTIATION
00126 #include "itkNeighborhoodOperatorImageFunction.txx"
00127 #endif
00128
00129 #endif
00130