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: 2002/12/17 17:50:35 $
00007   Version:   $Revision: 1.6 $
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 __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 
00033 template <class TImage>
00034 class VectorGradientNDAnisotropicDiffusionFunction :
00035     public VectorAnisotropicDiffusionFunction<TImage>
00036 {
00037 public:
00039   typedef VectorGradientNDAnisotropicDiffusionFunction Self;
00040   typedef VectorAnisotropicDiffusionFunction<TImage> Superclass;
00041   typedef SmartPointer<Self> Pointer;
00042   typedef SmartPointer<const Self> ConstPointer;
00043 
00045   itkNewMacro(Self);
00046 
00048   itkTypeMacro( VectorGradientNDAnisotropicDiffusionFunction,
00049                 ScalarAnisotropicDiffusionFunction );
00050   
00052   typedef typename Superclass::ImageType        ImageType;
00053   typedef typename Superclass::PixelType        PixelType;
00054   typedef typename Superclass::TimeStepType     TimeStepType;
00055   typedef typename Superclass::RadiusType       RadiusType;
00056   typedef typename Superclass::NeighborhoodType NeighborhoodType;
00057   typedef typename Superclass::FloatOffsetType FloatOffsetType;
00058 
00060   itkStaticConstMacro(ImageDimension, unsigned int,
00061                       Superclass::ImageDimension );
00062   itkStaticConstMacro(VectorDimension, unsigned int,
00063                       Superclass::VectorDimension );
00064 
00066   typedef typename PixelType::ValueType  ScalarValueType;
00067 
00069   virtual PixelType ComputeUpdate(const NeighborhoodType &neighborhood,
00070                                   void * globalData,
00071                                   const FloatOffsetType& offset = FloatOffsetType(0.0)
00072                                   ) const;
00073 
00075   virtual void InitializeIteration()
00076     {
00077       m_K = this->GetAverageGradientMagnitudeSquared() *
00078         this->GetConductanceParameter() * -1.0f;
00079     }
00080   
00081 protected:
00082   VectorGradientNDAnisotropicDiffusionFunction();
00083   ~VectorGradientNDAnisotropicDiffusionFunction() {}
00084 
00085 private:
00086   VectorGradientNDAnisotropicDiffusionFunction(const Self&); //purposely not implemented
00087   void operator=(const Self&); //purposely not implemented
00088 
00090   VectorNeighborhoodInnerProduct<ImageType> m_InnerProduct;
00091 
00093   std::slice  x_slice[ImageDimension];
00094   std::slice xa_slice[ImageDimension][ImageDimension];
00095   std::slice xd_slice[ImageDimension][ImageDimension];
00096 
00098   DerivativeOperator<ScalarValueType,
00099                      itkGetStaticConstMacro(ImageDimension)> dx_op;
00100 
00102   ScalarValueType m_K;
00103 
00104   static double m_MIN_NORM;
00105   
00106   unsigned long int m_Stride[ImageDimension];
00107   unsigned long int m_Center;
00108   
00109 };
00110 
00111 
00112   
00113 }// end namespace itk
00114 
00115 #ifndef ITK_MANUAL_INSTANTIATION
00116 #include "itkVectorGradientNDAnisotropicDiffusionFunction.txx"
00117 #endif
00118 
00119 #endif

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