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

itkVectorGradientNDAnisotropicDiffusionFunction.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkVectorGradientNDAnisotropicDiffusionFunction.h,v $
00005   Language:  C++
00006   Date:      $Date: 2008-10-17 16:30:55 $
00007   Version:   $Revision: 1.13 $
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 __itkVectorGradientNDAnisotropicDiffusionFunction_h
00018 #define __itkVectorGradientNDAnisotropicDiffusionFunction_h
00019 
00020 #include "itkVectorAnisotropicDiffusionFunction.h"
00021 #include "itkNeighborhoodAlgorithm.h"
00022 #include "itkVectorNeighborhoodInnerProduct.h"
00023 #include "itkDerivativeOperator.h"
00024 
00025 namespace itk {
00026 
00041 template <class TImage>
00042 class ITK_EXPORT VectorGradientNDAnisotropicDiffusionFunction :
00043     public VectorAnisotropicDiffusionFunction<TImage>
00044 {
00045 public:
00047   typedef VectorGradientNDAnisotropicDiffusionFunction Self;
00048   typedef VectorAnisotropicDiffusionFunction<TImage>   Superclass;
00049   typedef SmartPointer<Self>                           Pointer;
00050   typedef SmartPointer<const Self>                     ConstPointer;
00051 
00053   itkNewMacro(Self);
00054 
00056   itkTypeMacro( VectorGradientNDAnisotropicDiffusionFunction,
00057                 ScalarAnisotropicDiffusionFunction );
00058 
00060   typedef typename Superclass::ImageType        ImageType;
00061   typedef typename Superclass::PixelType        PixelType;
00062   typedef typename Superclass::TimeStepType     TimeStepType;
00063   typedef typename Superclass::RadiusType       RadiusType;
00064   typedef typename Superclass::NeighborhoodType NeighborhoodType;
00065   typedef typename Superclass::FloatOffsetType  FloatOffsetType;
00066 
00068   itkStaticConstMacro(ImageDimension, unsigned int,
00069                       Superclass::ImageDimension );
00070   itkStaticConstMacro(VectorDimension, unsigned int,
00071                       Superclass::VectorDimension );
00073 
00075   typedef typename PixelType::ValueType  ScalarValueType;
00076 
00078   virtual PixelType ComputeUpdate(const NeighborhoodType &neighborhood,
00079                                   void * globalData,
00080                                   const FloatOffsetType& offset = FloatOffsetType(0.0)
00081     );
00082 
00084   virtual void InitializeIteration()
00085     {
00086     m_K = this->GetAverageGradientMagnitudeSquared() * this->GetConductanceParameter() *
00087       this->GetConductanceParameter() * -2.0f;
00088     }
00089 
00090 protected:
00091   VectorGradientNDAnisotropicDiffusionFunction();
00092   ~VectorGradientNDAnisotropicDiffusionFunction() {}
00093 
00094 private:
00095   VectorGradientNDAnisotropicDiffusionFunction(const Self&); //purposely not implemented
00096   void operator=(const Self&); //purposely not implemented
00097 
00099   VectorNeighborhoodInnerProduct<ImageType> m_InnerProduct;
00100 
00102   std::slice  x_slice[ImageDimension];
00103   std::slice xa_slice[ImageDimension][ImageDimension];
00104   std::slice xd_slice[ImageDimension][ImageDimension];
00105 
00107   DerivativeOperator<ScalarValueType,
00108                      itkGetStaticConstMacro(ImageDimension)> dx_op;
00109 
00111   ScalarValueType m_K;
00112 
00113   static double m_MIN_NORM;
00114   
00115   unsigned long int m_Stride[ImageDimension];
00116   unsigned long int m_Center;
00117   
00118 };
00119 
00120 
00121   
00122 }// end namespace itk
00123 
00124 #ifndef ITK_MANUAL_INSTANTIATION
00125 #include "itkVectorGradientNDAnisotropicDiffusionFunction.txx"
00126 #endif
00127 
00128 #endif
00129 

Generated at Thu Nov 6 00:42:27 2008 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000