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: 2004/06/17 00:02:07 $
00007   Version:   $Revision: 1.9 $
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:
00062   typedef LaplacianOperator Self;
00063 
00065   typedef NeighborhoodOperator<TPixel, VDimension, TAllocator>  Superclass;
00066 
00067   typedef typename Superclass::PixelType PixelType;
00068   typedef typename Superclass::SizeType SizeType;
00069 
00071   LaplacianOperator()
00072   {
00073     for (unsigned i = 0; i < VDimension; ++i)
00074       {
00075       m_DerivativeScalings[i] = 1.0;
00076       }
00077   }
00078 
00080   LaplacianOperator(const Self& other)
00081     : NeighborhoodOperator<TPixel, VDimension, TAllocator>(other) 
00082   {
00083     for (unsigned i = 0; i < VDimension; ++i)
00084       {
00085       m_DerivativeScalings[i] = other.m_DerivativeScalings[i];
00086       }
00087   }
00088   
00090   void CreateOperator();  
00091 
00092  
00094   Self &operator=(const Self& other)
00095   {
00096     Superclass::operator=(other);
00097     return *this;
00098   }
00099   
00101   virtual void PrintSelf(std::ostream &os, Indent i) const  
00102   { 
00103     os << i << "LaplacianOperator { this=" << this
00104        << "}" << std::endl;
00105     Superclass::PrintSelf(os, i.GetNextIndent());
00106   }
00107 
00111   void SetDerivativeScalings( const double *s );
00112            
00113 protected:
00116   typedef typename Superclass::CoefficientVector CoefficientVector;
00117 
00119   CoefficientVector GenerateCoefficients();
00120 
00123   void Fill(const CoefficientVector &);
00124 
00125 private:
00127   double m_DerivativeScalings[VDimension];
00128   
00129 };
00130 
00131 } // namespace itk
00132 
00133 #ifndef ITK_MANUAL_INSTANTIATION
00134 #include "itkLaplacianOperator.txx"
00135 #endif
00136 
00137 #endif
00138 
00139 

Generated at Wed May 24 23:32:25 2006 for ITK by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2000