00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkBinaryMinMaxCurvatureFlowFunction.h,v $ 00005 Language: C++ 00006 Date: $Date: 2002/09/30 19:25:04 $ 00007 Version: $Revision: 1.3 $ 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 __itkBinaryMinMaxCurvatureFlowFunction_h_ 00018 #define __itkBinaryMinMaxCurvatureFlowFunction_h_ 00019 00020 #include "itkMinMaxCurvatureFlowFunction.h" 00021 #include "itkMacro.h" 00022 #include "itkNeighborhoodOperator.h" 00023 00024 namespace itk { 00025 00040 template <class TImage> 00041 class BinaryMinMaxCurvatureFlowFunction : 00042 public MinMaxCurvatureFlowFunction<TImage> 00043 { 00044 public: 00046 typedef BinaryMinMaxCurvatureFlowFunction Self; 00047 typedef MinMaxCurvatureFlowFunction<TImage> Superclass; 00048 typedef SmartPointer<Self> Pointer; 00049 typedef SmartPointer<const Self> ConstPointer; 00050 00052 itkNewMacro(Self); 00053 00055 itkTypeMacro( BinaryMinMaxCurvatureFlowFunction, 00056 MinMaxCurvatureFlowFunction ); 00057 00059 typedef typename Superclass::PixelType PixelType; 00060 typedef typename Superclass::RadiusType RadiusType; 00061 typedef typename Superclass::NeighborhoodType NeighborhoodType; 00062 typedef typename Superclass::BoundaryNeighborhoodType BoundaryNeighborhoodType; 00063 typedef typename Superclass::FloatOffsetType FloatOffsetType; 00064 typedef typename Superclass::ImageType ImageType; 00065 00067 itkStaticConstMacro(ImageDimension, unsigned int, Superclass::ImageDimension); 00068 00070 void SetThreshold( const double thresh ) 00071 { m_Threshold = thresh; } 00072 const double & GetThreshold() const 00073 { return m_Threshold; } 00074 00077 virtual PixelType ComputeUpdate(const NeighborhoodType &neighborhood, 00078 void * globalData, 00079 const FloatOffsetType& offset = m_ZeroOffset 00080 ) const; 00081 00084 virtual PixelType ComputeUpdate(const BoundaryNeighborhoodType 00085 &neighborhood, void * globalData, 00086 const FloatOffsetType& offset = m_ZeroOffset 00087 ) const; 00088 00089 protected: 00090 BinaryMinMaxCurvatureFlowFunction(); 00091 ~BinaryMinMaxCurvatureFlowFunction() {} 00092 00093 private: 00094 BinaryMinMaxCurvatureFlowFunction(const Self&); //purposely not implemented 00095 void operator=(const Self&); //purposely not implemented 00096 00097 double m_Threshold; 00098 00099 }; 00100 00101 }// end namespace itk 00102 00103 #ifndef ITK_MANUAL_INSTANTIATION 00104 #include "itkBinaryMinMaxCurvatureFlowFunction.txx" 00105 #endif 00106 00107 #endif