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

itkCurvatureNDAnisotropicDiffusionFunction.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkCurvatureNDAnisotropicDiffusionFunction.h,v $
00005   Language:  C++
00006   Date:      $Date: 2002/12/17 17:50:35 $
00007   Version:   $Revision: 1.12 $
00008 
00009   Copyright (c) 2002 Insight 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 __itkCurvatureNDAnisotropicDiffusionFunction_h_
00018 #define __itkCurvatureNDAnisotropicDiffusionFunction_h_
00019 
00020 #include "itkScalarAnisotropicDiffusionFunction.h"
00021 #include "itkNeighborhoodAlgorithm.h"
00022 #include "itkNeighborhoodInnerProduct.h"
00023 #include "itkDerivativeOperator.h"
00024 
00025 namespace itk {
00026 
00070 template <class TImage>
00071 class CurvatureNDAnisotropicDiffusionFunction :
00072     public ScalarAnisotropicDiffusionFunction<TImage>
00073 {
00074 public:
00076   typedef CurvatureNDAnisotropicDiffusionFunction Self;
00077   typedef ScalarAnisotropicDiffusionFunction<TImage> Superclass;
00078   typedef SmartPointer<Self> Pointer;
00079   typedef SmartPointer<const Self> ConstPointer;
00080 
00082   itkNewMacro(Self);
00083 
00085   itkTypeMacro( CurvatureNDAnisotropicDiffusionFunction,
00086                 ScalarAnisotropicDiffusionFunction );
00087   
00089   typedef typename Superclass::ImageType        ImageType;
00090   typedef typename Superclass::PixelType        PixelType;
00091   typedef typename Superclass::TimeStepType     TimeStepType;
00092   typedef typename Superclass::RadiusType       RadiusType;
00093   typedef typename Superclass::NeighborhoodType NeighborhoodType;
00094   typedef typename Superclass::FloatOffsetType  FloatOffsetType;
00095 
00097   itkStaticConstMacro(ImageDimension, unsigned int,Superclass::ImageDimension);
00098 
00100   virtual PixelType ComputeUpdate(const NeighborhoodType &neighborhood,
00101                                   void *globalData,
00102                                   const FloatOffsetType& offset = FloatOffsetType(0.0)
00103                                   ) const;
00104 
00106   virtual void InitializeIteration()
00107     {
00108       m_K = static_cast<PixelType>(this->GetAverageGradientMagnitudeSquared() *
00109                                    this->GetConductanceParameter() * -1.0f);
00110     }
00111   
00112 protected:
00113   CurvatureNDAnisotropicDiffusionFunction();
00114   ~CurvatureNDAnisotropicDiffusionFunction() {}
00115   void PrintSelf(std::ostream& os, Indent indent) const
00116     {
00117       Superclass::PrintSelf(os,indent);
00118     }
00119   
00120 private:
00121   CurvatureNDAnisotropicDiffusionFunction(const Self&); //purposely not implemented
00122   void operator=(const Self&); //purposely not implemented
00123 
00125   NeighborhoodInnerProduct<ImageType> m_InnerProduct;
00126 
00128   std::slice  x_slice[ImageDimension];
00129   std::slice xa_slice[ImageDimension][ImageDimension];
00130   std::slice xd_slice[ImageDimension][ImageDimension];
00131 
00133   DerivativeOperator<PixelType, itkGetStaticConstMacro(ImageDimension)> dx_op;
00134 
00136   PixelType m_K;
00137 
00139   static double m_MIN_NORM;
00140   
00141   unsigned long m_Center;
00142   unsigned long m_Stride[ImageDimension];
00143 
00144 };
00145 
00146 
00147   
00148 }// end namespace itk
00149 
00150 #ifndef ITK_MANUAL_INSTANTIATION
00151 #include "itkCurvatureNDAnisotropicDiffusionFunction.txx"
00152 #endif
00153 
00154 #endif

Generated at Fri May 21 01:14:36 2004 for ITK by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2000