itkVectorCurvatureNDAnisotropicDiffusionFunction.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkVectorCurvatureNDAnisotropicDiffusionFunction_h
00018 #define __itkVectorCurvatureNDAnisotropicDiffusionFunction_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 VectorCurvatureNDAnisotropicDiffusionFunction :
00043 public VectorAnisotropicDiffusionFunction<TImage>
00044 {
00045 public:
00047 typedef VectorCurvatureNDAnisotropicDiffusionFunction Self;
00048 typedef VectorAnisotropicDiffusionFunction<TImage> Superclass;
00049 typedef SmartPointer<Self> Pointer;
00050 typedef SmartPointer<const Self> ConstPointer;
00051
00053 itkNewMacro(Self);
00054
00056 itkTypeMacro( VectorCurvatureNDAnisotropicDiffusionFunction,
00057 VectorAnisotropicDiffusionFunction );
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 typedef typename PixelType::ValueType ScalarValueType;
00067
00069 itkStaticConstMacro(ImageDimension, unsigned int,
00070 Superclass::ImageDimension);
00071 itkStaticConstMacro(VectorDimension, unsigned int,
00072 Superclass::VectorDimension);
00074
00076 virtual PixelType ComputeUpdate(const NeighborhoodType &neighborhood,
00077 void *globalData,
00078 const FloatOffsetType& offset = FloatOffsetType(0.0)
00079 );
00080
00082 virtual void InitializeIteration()
00083 {
00084 m_K = this->GetAverageGradientMagnitudeSquared() * this->GetConductanceParameter() *
00085 this->GetConductanceParameter() * -2.0f;
00086 }
00087
00088 protected:
00089 VectorCurvatureNDAnisotropicDiffusionFunction();
00090 ~VectorCurvatureNDAnisotropicDiffusionFunction() {}
00091 void PrintSelf(std::ostream& os, Indent indent) const
00092 { Superclass::PrintSelf(os,indent); }
00093
00094 private:
00095 VectorCurvatureNDAnisotropicDiffusionFunction(const Self&);
00096 void operator=(const Self&);
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, itkGetStaticConstMacro(ImageDimension)> dx_op;
00108
00110 double m_K;
00111
00112 static double m_MIN_NORM;
00113 unsigned long m_Center;
00114 unsigned long m_Stride[ImageDimension];
00115 };
00116
00117 }
00118
00119 #ifndef ITK_MANUAL_INSTANTIATION
00120 #include "itkVectorCurvatureNDAnisotropicDiffusionFunction.txx"
00121 #endif
00122
00123 #endif
00124