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

itkMinMaxCurvatureFlowFunction.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkMinMaxCurvatureFlowFunction.h,v $
00005   Language:  C++
00006   Date:      $Date: 2009-01-24 20:03:00 $
00007   Version:   $Revision: 1.16 $
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 __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&); //purposely not implemented
00099   void operator=(const Self&); //purposely not implemented
00100 
00101   RadiusValueType  m_StencilRadius;
00102 
00103   // To control overloaded versions of ComputeThreshold
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 }// end namespace itk
00120 
00121 #ifndef ITK_MANUAL_INSTANTIATION
00122 #include "itkMinMaxCurvatureFlowFunction.txx"
00123 #endif
00124 
00125 #endif
00126 

Generated at Mon Jul 12 2010 19:08:53 for ITK by doxygen 1.7.1 written by Dimitri van Heesch, © 1997-2000