00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkImageKernelOperator_h
00018 #define __itkImageKernelOperator_h
00019
00020 #include "itkNeighborhoodOperator.h"
00021
00022 #include "itkImage.h"
00023
00024 namespace itk {
00025
00036 template<class TPixel, unsigned int VDimension=2,
00037 class TAllocator = NeighborhoodAllocator<TPixel> >
00038 class ITK_EXPORT ImageKernelOperator
00039 : public NeighborhoodOperator<TPixel, VDimension, TAllocator>
00040 {
00041 public:
00042
00044 typedef ImageKernelOperator Self;
00045 typedef NeighborhoodOperator<TPixel, VDimension, TAllocator> Superclass;
00046
00047 typedef Image<TPixel, VDimension> ImageType;
00048 typedef typename Superclass::CoefficientVector CoefficientVector;
00049
00051 ImageKernelOperator() {}
00052
00054 ImageKernelOperator(const Self &orig)
00055 : Neighborhood<TPixel, VDimension, TAllocator>(orig)
00056 {}
00057
00059 Self &operator=( const Self &orig )
00060 {
00061 Superclass::operator=(orig);
00062 return *this;
00063 }
00065
00066 void SetImageKernel( ImageType *kernel )
00067 {
00068 this->m_ImageKernel = kernel;
00069 }
00070
00072 virtual void PrintSelf(std::ostream &os, Indent i) const
00073 {
00074 os << i << "ImageKernelOperator { this=" << this
00075 << "} " << std::endl;
00076 Superclass::PrintSelf( os, i.GetNextIndent() );
00077 }
00079
00080 protected:
00081
00083 CoefficientVector GenerateCoefficients();
00084
00086 void Fill( const CoefficientVector& coeff );
00087
00088 private:
00089
00090 typename ImageType::Pointer m_ImageKernel;
00091
00093 const char *GetNameOfClass()
00094 { return "itkImageKernelOperator"; }
00095
00096 };
00097
00098 }
00099
00100
00101 #ifndef ITK_MANUAL_INSTANTIATION
00102 #include "itkImageKernelOperator.txx"
00103 #endif
00104
00105 #endif
00106