00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkLaplacianOperator_h
00018 #define __itkLaplacianOperator_h
00019
00020 #include "itkExceptionObject.h"
00021 #include "itkNeighborhoodOperator.h"
00022
00023 namespace itk {
00024
00055 template<class TPixel, unsigned int VDimension=2,
00056 class TAllocator = NeighborhoodAllocator<TPixel> >
00057 class ITK_EXPORT LaplacianOperator
00058 : public NeighborhoodOperator<TPixel, VDimension, TAllocator>
00059 {
00060 public:
00062 typedef LaplacianOperator Self;
00063
00065 typedef NeighborhoodOperator<TPixel, VDimension, TAllocator> Superclass;
00066
00067 typedef typename Superclass::PixelType PixelType;
00068
00070 LaplacianOperator()
00071 {
00072 for (unsigned i = 0; i < VDimension; ++i)
00073 {
00074 m_DerivativeScalings[i] = 1.0;
00075 }
00076 }
00077
00079 LaplacianOperator(const Self& other)
00080 : NeighborhoodOperator<TPixel, VDimension, TAllocator>(other)
00081 {
00082 for (unsigned i = 0; i < VDimension; ++i)
00083 {
00084 m_DerivativeScalings[i] = other.m_DerivativeScalings[i];
00085 }
00086 }
00087
00089 void CreateOperator();
00090
00091
00093 Self &operator=(const Self& other)
00094 {
00095 Superclass::operator=(other);
00096 return *this;
00097 }
00098
00100 virtual void PrintSelf(std::ostream &os, Indent i) const
00101 {
00102 os << i << "LaplacianOperator { this=" << this
00103 << "}" << std::endl;
00104 Superclass::PrintSelf(os, i.GetNextIndent());
00105 }
00106
00110 void SetDerivativeScalings( const double *s );
00111
00112 protected:
00115 typedef typename Superclass::CoefficientVector CoefficientVector;
00116
00118 CoefficientVector GenerateCoefficients();
00119
00122 void Fill(const CoefficientVector &);
00123
00124 private:
00126 double m_DerivativeScalings[VDimension];
00127
00128 };
00129
00130 }
00131
00132 #ifndef ITK_MANUAL_INSTANTIATION
00133 #include "itkLaplacianOperator.txx"
00134 #endif
00135
00136 #endif
00137
00138