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: 2003/09/10 14:28:46 $
00007   Version:   $Revision: 1.17 $
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 __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 ITK_EXPORT CurvatureNDAnisotropicDiffusionFunction :
00072     public ScalarAnisotropicDiffusionFunction<TImage>
00073 {
00074 public:
00075 
00077   typedef CurvatureNDAnisotropicDiffusionFunction Self;
00078   typedef ScalarAnisotropicDiffusionFunction<TImage> Superclass;
00079   typedef SmartPointer<Self> Pointer;
00080   typedef SmartPointer<const Self> ConstPointer;
00081 
00083   itkNewMacro(Self);
00084 
00086   itkTypeMacro( CurvatureNDAnisotropicDiffusionFunction,
00087                 ScalarAnisotropicDiffusionFunction );
00088 
00090   typedef typename Superclass::ImageType        ImageType;
00091   typedef typename Superclass::PixelType        PixelType;
00092   typedef typename Superclass::TimeStepType     TimeStepType;
00093   typedef typename Superclass::RadiusType       RadiusType;
00094   typedef typename Superclass::NeighborhoodType NeighborhoodType;
00095   typedef typename Superclass::FloatOffsetType  FloatOffsetType;
00096 
00098   itkStaticConstMacro(ImageDimension, unsigned int,Superclass::ImageDimension);
00099 
00101   virtual PixelType ComputeUpdate(const NeighborhoodType &neighborhood,
00102                                   void *globalData,
00103                                   const FloatOffsetType& offset = FloatOffsetType(0.0)
00104     );
00105 
00107   virtual void InitializeIteration()
00108   {
00109     m_K = static_cast<PixelType>(this->GetAverageGradientMagnitudeSquared() *
00110                                  this->GetConductanceParameter() *
00111                                  this->GetConductanceParameter() * -2.0f);
00112   }
00113 
00114 protected:
00115   CurvatureNDAnisotropicDiffusionFunction();
00116   ~CurvatureNDAnisotropicDiffusionFunction() {}
00117   void PrintSelf(std::ostream& os, Indent indent) const
00118   {
00119     Superclass::PrintSelf(os,indent);
00120   }
00121   
00122 private:
00123   CurvatureNDAnisotropicDiffusionFunction(const Self&); //purposely not implemented
00124   void operator=(const Self&); //purposely not implemented
00125 
00127   NeighborhoodInnerProduct<ImageType> m_InnerProduct;
00128 
00130   std::slice  x_slice[ImageDimension];
00131   std::slice xa_slice[ImageDimension][ImageDimension];
00132   std::slice xd_slice[ImageDimension][ImageDimension];
00133 
00135   DerivativeOperator<PixelType, itkGetStaticConstMacro(ImageDimension)> dx_op;
00136 
00138   PixelType m_K;
00139 
00141   static double m_MIN_NORM;
00142 
00143   unsigned long m_Center;
00144   unsigned long m_Stride[ImageDimension];
00145 
00146 };
00147 
00148 
00149   
00150 }// end namespace itk
00151 
00152 #ifndef ITK_MANUAL_INSTANTIATION
00153 #include "itkCurvatureNDAnisotropicDiffusionFunction.txx"
00154 #endif
00155 
00156 #endif
00157 

Generated at Sun Sep 23 12:19:46 2007 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000