00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkMinMaxCurvatureFlowFunction_h_
00018 #define __itkMinMaxCurvatureFlowFunction_h_
00019
00020 #include "itkCurvatureFlowFunction.h"
00021 #include "itkMacro.h"
00022 #include "itkNeighborhoodOperator.h"
00023
00024 namespace itk {
00025
00040 template <class TImage>
00041 class ITK_EXPORT MinMaxCurvatureFlowFunction :
00042 public CurvatureFlowFunction<TImage>
00043 {
00044 public:
00046 typedef MinMaxCurvatureFlowFunction Self;
00047 typedef CurvatureFlowFunction<TImage> Superclass;
00048 typedef SmartPointer<Self> Pointer;
00049 typedef SmartPointer<const Self> ConstPointer;
00050
00052 itkNewMacro(Self);
00053
00055 itkTypeMacro( MinMaxCurvatureFlowFunction,
00056 CurvatureFlowFunction );
00057
00059 typedef typename Superclass::ImageType ImageType;
00060 typedef typename Superclass::PixelType PixelType;
00061 typedef typename Superclass::RadiusType RadiusType;
00062 typedef typename Superclass::NeighborhoodType NeighborhoodType;
00063 typedef typename Superclass::FloatOffsetType FloatOffsetType;
00064
00066 itkStaticConstMacro(ImageDimension, unsigned int,
00067 Superclass::ImageDimension);
00068
00070 typedef typename RadiusType::SizeValueType RadiusValueType;
00071
00073 void SetStencilRadius( const RadiusValueType radius );
00074 const RadiusValueType &GetRadiusValueType() const
00075 { return m_StencilRadius; }
00077
00080 virtual PixelType ComputeUpdate(const NeighborhoodType &neighborhood,
00081 void * globalData,
00082 const FloatOffsetType& offset = FloatOffsetType(0.0)
00083 );
00084
00085 protected:
00086 MinMaxCurvatureFlowFunction();
00087 ~MinMaxCurvatureFlowFunction() {}
00088
00089 typedef Neighborhood<PixelType,itkGetStaticConstMacro(ImageDimension)> StencilOperatorType;
00090 StencilOperatorType m_StencilOperator;
00091
00094 void InitializeStencilOperator();
00095
00096
00097 private:
00098 MinMaxCurvatureFlowFunction(const Self&);
00099 void operator=(const Self&);
00100
00101 RadiusValueType m_StencilRadius;
00102
00103
00104 struct DispatchBase {};
00105 template<signed int VDimension>
00106 struct Dispatch : DispatchBase {};
00107
00110 virtual PixelType ComputeThreshold( const Dispatch<2> &,
00111 const NeighborhoodType & neighborhood ) const;
00112 virtual PixelType ComputeThreshold( const Dispatch<3> &,
00113 const NeighborhoodType & neighborhood ) const;
00114 virtual PixelType ComputeThreshold( const DispatchBase &,
00115 const NeighborhoodType & neighborhood ) const;
00116 };
00118
00119 }
00120
00121 #ifndef ITK_MANUAL_INSTANTIATION
00122 #include "itkMinMaxCurvatureFlowFunction.txx"
00123 #endif
00124
00125 #endif
00126