Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkLaplacianOperator.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkLaplacianOperator.h,v $
00005   Language:  C++
00006   Date:      $Date: 2007/02/01 14:39:33 $
00007   Version:   $Revision: 1.10 $
00008 
00009   Copyright (c) Insight Software Consortium. All rights reserved.
00010   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
00011 
00012      This software is distributed WITHOUT ANY WARRANTY; without even 
00013      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00014      PURPOSE.  See the above copyright notices for more information.
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:
00061 
00063   typedef LaplacianOperator Self;
00064 
00066   typedef NeighborhoodOperator<TPixel, VDimension, TAllocator>  Superclass;
00067 
00068   typedef typename Superclass::PixelType PixelType;
00069   typedef typename Superclass::SizeType SizeType;
00070 
00072   LaplacianOperator()
00073   {
00074     for (unsigned i = 0; i < VDimension; ++i)
00075       {
00076       m_DerivativeScalings[i] = 1.0;
00077       }
00078   }
00080 
00082   LaplacianOperator(const Self& other)
00083     : NeighborhoodOperator<TPixel, VDimension, TAllocator>(other) 
00084   {
00085     for (unsigned i = 0; i < VDimension; ++i)
00086       {
00087       m_DerivativeScalings[i] = other.m_DerivativeScalings[i];
00088       }
00089   }
00091 
00093   void CreateOperator();  
00094 
00095  
00097   Self &operator=(const Self& other)
00098   {
00099     Superclass::operator=(other);
00100     return *this;
00101   }
00103 
00105   virtual void PrintSelf(std::ostream &os, Indent i) const  
00106   { 
00107     os << i << "LaplacianOperator { this=" << this
00108        << "}" << std::endl;
00109     Superclass::PrintSelf(os, i.GetNextIndent());
00110   }
00112 
00116   void SetDerivativeScalings( const double *s );
00117 
00118 protected:
00121   typedef typename Superclass::CoefficientVector CoefficientVector;
00122 
00124   CoefficientVector GenerateCoefficients();
00125 
00128   void Fill(const CoefficientVector &);
00129 
00130 private:
00132   double m_DerivativeScalings[VDimension];
00133 
00134 };
00135 
00136 } // namespace itk
00137 
00138 // Define instantiation macro for this template.
00139 #define ITK_TEMPLATE_LaplacianOperator(_, EXPORT, x, y) namespace itk { \
00140   _(2(class EXPORT LaplacianOperator< ITK_TEMPLATE_2 x >)) \
00141   namespace Templates { typedef LaplacianOperator< ITK_TEMPLATE_2 x > \
00142                                                   LaplacianOperator##y; } \
00143   }
00144 
00145 #if ITK_TEMPLATE_EXPLICIT
00146 # include "Templates/itkLaplacianOperator+-.h"
00147 #endif
00148 
00149 #if ITK_TEMPLATE_TXX
00150 # include "itkLaplacianOperator.txx"
00151 #endif
00152 
00153 #endif
00154 
00155 
00156 

Generated at Wed Nov 5 22:37:53 2008 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000