00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkLaplacianSegmentationLevelSetFunction_h_
00018 #define __itkLaplacianSegmentationLevelSetFunction_h_
00019
00020 #include "itkSegmentationLevelSetFunction.h"
00021
00022 namespace itk {
00023
00024
00030 template <class TImageType, class TFeatureImageType = TImageType>
00031 class ITK_EXPORT LaplacianSegmentationLevelSetFunction
00032 : public SegmentationLevelSetFunction<TImageType, TFeatureImageType>
00033 {
00034 public:
00035
00037 typedef LaplacianSegmentationLevelSetFunction Self;
00038 typedef SegmentationLevelSetFunction<TImageType, TFeatureImageType> Superclass;
00039 typedef SmartPointer<Self> Pointer;
00040 typedef SmartPointer<const Self> ConstPointer;
00041 typedef TFeatureImageType FeatureImageType;
00042
00044 itkNewMacro(Self);
00045
00047 itkTypeMacro( LaplacianSegmentationLevelSetFunction, SegmentationLevelSetFunction );
00048
00050 typedef typename Superclass::ImageType ImageType;
00051 typedef typename Superclass::ScalarValueType ScalarValueType;
00052 typedef typename Superclass::FeatureScalarType FeatureScalarType;
00053 typedef typename Superclass::RadiusType RadiusType;
00054
00056 itkStaticConstMacro(ImageDimension, unsigned int,
00057 Superclass::ImageDimension);
00058
00059
00060 virtual void CalculateSpeedImage();
00061
00062 virtual void Initialize(const RadiusType &r)
00063 {
00064 Superclass::Initialize(r);
00065
00066 this->SetAdvectionWeight( NumericTraits<ScalarValueType>::Zero);
00067 this->SetPropagationWeight(-1.0 * NumericTraits<ScalarValueType>::One);
00068 this->SetCurvatureWeight(NumericTraits<ScalarValueType>::One);
00069 }
00070
00077 void SetAdvectionWeight(const ScalarValueType value)
00078 {
00079 if (value == NumericTraits<ScalarValueType>::Zero)
00080 {
00081 Superclass::SetAdvectionWeight(value);
00082 }
00083 }
00085
00086 protected:
00087
00088 LaplacianSegmentationLevelSetFunction()
00089 {
00090 this->SetAdvectionWeight(0.0);
00091 this->SetPropagationWeight(1.0);
00092 this->SetCurvatureWeight(1.0);
00093 }
00094 virtual ~LaplacianSegmentationLevelSetFunction() {}
00095
00096 LaplacianSegmentationLevelSetFunction(const Self&);
00097 void operator=(const Self&);
00098 };
00099
00100 }
00101
00102 #ifndef ITK_MANUAL_INSTANTIATION
00103 #include "itkLaplacianSegmentationLevelSetFunction.txx"
00104 #endif
00105
00106 #endif
00107