itkShapeDetectionLevelSetFunction.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 __itkShapeDetectionLevelSetFunction_h
00018 #define __itkShapeDetectionLevelSetFunction_h
00019
00020 #include "itkSegmentationLevelSetFunction.h"
00021
00022 namespace itk {
00023
00069 template <class TImageType, class TFeatureImageType = TImageType>
00070 class ITK_EXPORT ShapeDetectionLevelSetFunction
00071 : public SegmentationLevelSetFunction<TImageType, TFeatureImageType>
00072 {
00073 public:
00075 typedef ShapeDetectionLevelSetFunction Self;
00076 typedef SegmentationLevelSetFunction<TImageType, TFeatureImageType>
00077 Superclass;
00078 typedef SmartPointer<Self> Pointer;
00079 typedef SmartPointer<const Self> ConstPointer;
00080 typedef TFeatureImageType FeatureImageType;
00081
00083 itkNewMacro(Self);
00084
00086 itkTypeMacro( ShapeDetectionLevelSetFunction, SegmentationLevelSetFunction );
00087
00089 typedef typename Superclass::ImageType ImageType;
00090 typedef typename Superclass::NeighborhoodType NeighborhoodType;
00091 typedef typename Superclass::ScalarValueType ScalarValueType;
00092 typedef typename Superclass::FeatureScalarType FeatureScalarType;
00093 typedef typename Superclass::RadiusType RadiusType;
00094 typedef typename Superclass::FloatOffsetType FloatOffsetType;
00095 typedef typename Superclass::GlobalDataStruct GlobalDataStruct;
00096
00098 itkStaticConstMacro(ImageDimension, unsigned int,
00099 Superclass::ImageDimension);
00100
00101 virtual void CalculateSpeedImage();
00102
00104 virtual ScalarValueType CurvatureSpeed(const NeighborhoodType & neighborhood,
00105 const FloatOffsetType & offset, GlobalDataStruct *gd ) const
00106 { return PropagationSpeed( neighborhood, offset, gd ); }
00107
00108 virtual void Initialize(const RadiusType &r)
00109 {
00110 Superclass::Initialize(r);
00111
00112 this->SetAdvectionWeight( NumericTraits<ScalarValueType>::Zero );
00113 this->SetPropagationWeight( NumericTraits<ScalarValueType>::One );
00114 this->SetCurvatureWeight( NumericTraits<ScalarValueType>::One );
00115 }
00116
00117 protected:
00118 ShapeDetectionLevelSetFunction()
00119 {
00120 this->SetAdvectionWeight( NumericTraits<ScalarValueType>::Zero );
00121 this->SetPropagationWeight( NumericTraits<ScalarValueType>::One );
00122 this->SetCurvatureWeight( NumericTraits<ScalarValueType>::One );
00123 }
00124 virtual ~ShapeDetectionLevelSetFunction() {}
00125
00126 ShapeDetectionLevelSetFunction(const Self&);
00127 void operator=(const Self&);
00128
00129 };
00130
00131 }
00132
00133 #ifndef ITK_MANUAL_INSTANTIATION
00134 #include "itkShapeDetectionLevelSetFunction.txx"
00135 #endif
00136
00137 #endif
00138