00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkGeodesicActiveContourShapePriorLevelSetFunction_h_
00018 #define __itkGeodesicActiveContourShapePriorLevelSetFunction_h_
00019
00020 #include "itkShapePriorSegmentationLevelSetFunction.h"
00021
00022 namespace itk {
00023
00090 template <class TImageType, class TFeatureImageType = TImageType>
00091 class ITK_EXPORT GeodesicActiveContourShapePriorLevelSetFunction
00092 : public ShapePriorSegmentationLevelSetFunction<TImageType, TFeatureImageType>
00093 {
00094 public:
00096 typedef GeodesicActiveContourShapePriorLevelSetFunction Self;
00097 typedef ShapePriorSegmentationLevelSetFunction<TImageType,TFeatureImageType> Superclass;
00098 typedef SmartPointer<Self> Pointer;
00099 typedef SmartPointer<const Self> ConstPointer;
00100 typedef TFeatureImageType FeatureImageType;
00101
00103 itkNewMacro(Self);
00104
00106 itkTypeMacro( GeodesicActiveContourShapePriorLevelSetFunction,
00107 ShapePriorSegmentationLevelSetFunction );
00108
00110 typedef typename Superclass::ImageType ImageType;
00111 typedef typename Superclass::NeighborhoodType NeighborhoodType;
00112 typedef typename Superclass::ScalarValueType ScalarValueType;
00113 typedef typename Superclass::FeatureScalarType FeatureScalarType;
00114 typedef typename Superclass::RadiusType RadiusType;
00115 typedef typename Superclass::FloatOffsetType FloatOffsetType;
00116 typedef typename Superclass::VectorImageType VectorImageType;
00117 typedef typename Superclass::GlobalDataStruct GlobalDataStruct;
00118
00120 itkStaticConstMacro(ImageDimension, unsigned int,
00121 Superclass::ImageDimension);
00122
00124 virtual void CalculateSpeedImage();
00125
00127 virtual void CalculateAdvectionImage();
00128
00130 virtual ScalarValueType CurvatureSpeed(const NeighborhoodType & neighborhood,
00131 const FloatOffsetType & offset, GlobalDataStruct *gd ) const
00132 { return PropagationSpeed( neighborhood, offset, gd ); }
00133
00136 void SetDerivativeSigma( const double v )
00137 { m_DerivativeSigma = v; }
00138 double GetDerivativeSigma()
00139 { return m_DerivativeSigma; };
00141
00142 virtual void Initialize(const RadiusType &r)
00143 {
00144 Superclass::Initialize(r);
00145
00146 this->SetAdvectionWeight( NumericTraits<ScalarValueType>::One );
00147 this->SetPropagationWeight( NumericTraits<ScalarValueType>::One );
00148 this->SetCurvatureWeight( NumericTraits<ScalarValueType>::One );
00149 this->SetShapePriorWeight( NumericTraits<ScalarValueType>::One );
00150 }
00151
00152 protected:
00153 GeodesicActiveContourShapePriorLevelSetFunction()
00154 {
00155 this->SetAdvectionWeight( NumericTraits<ScalarValueType>::One );
00156 this->SetPropagationWeight( NumericTraits<ScalarValueType>::One );
00157 this->SetCurvatureWeight( NumericTraits<ScalarValueType>::One );
00158 this->SetShapePriorWeight( NumericTraits<ScalarValueType>::One );
00159
00160 m_DerivativeSigma = 1.0;
00161 }
00162
00163 virtual ~GeodesicActiveContourShapePriorLevelSetFunction() {}
00164
00165 GeodesicActiveContourShapePriorLevelSetFunction(const Self&);
00166 void operator=(const Self&);
00167
00168 void PrintSelf(std::ostream& os, Indent indent) const
00169 {
00170 Superclass::PrintSelf(os, indent );
00171 os << indent << "DerivativeSigma: " << m_DerivativeSigma << std::endl;
00172 }
00173
00174 private:
00175
00176 double m_DerivativeSigma;
00177
00178 };
00179
00180 }
00181
00182 #ifndef ITK_MANUAL_INSTANTIATION
00183 #include "itkGeodesicActiveContourShapePriorLevelSetFunction.txx"
00184 #endif
00185
00186 #endif
00187