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

itkGeodesicActiveContourLevelSetFunction.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkGeodesicActiveContourLevelSetFunction.h,v $
00005   Language:  C++
00006   Date:      $Date: 2003/09/10 14:28:30 $
00007   Version:   $Revision: 1.9 $
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 __itkGeodesicActiveContourLevelSetFunction_h_
00018 #define __itkGeodesicActiveContourLevelSetFunction_h_
00019 
00020 #include "itkSegmentationLevelSetFunction.h"
00021 
00022 namespace itk {
00023 
00074 template <class TImageType, class TFeatureImageType = TImageType>
00075 class ITK_EXPORT GeodesicActiveContourLevelSetFunction
00076   : public SegmentationLevelSetFunction<TImageType, TFeatureImageType>
00077 {
00078 public:
00080   typedef GeodesicActiveContourLevelSetFunction Self;
00081   typedef SegmentationLevelSetFunction<TImageType, TFeatureImageType> Superclass;
00082   typedef SmartPointer<Self> Pointer;
00083   typedef SmartPointer<const Self> ConstPointer;
00084   typedef TFeatureImageType FeatureImageType;
00085 
00087   itkNewMacro(Self);
00088 
00090   itkTypeMacro( GeodesicActiveContourLevelSetFunction, SegmentationLevelSetFunction );
00091 
00093   typedef typename Superclass::ImageType ImageType;
00094   typedef typename Superclass::NeighborhoodType NeighborhoodType;
00095   typedef typename Superclass::ScalarValueType ScalarValueType;
00096   typedef typename Superclass::FeatureScalarType FeatureScalarType;
00097   typedef typename Superclass::RadiusType RadiusType;
00098   typedef typename Superclass::FloatOffsetType FloatOffsetType;
00099   typedef typename Superclass::VectorImageType VectorImageType;
00100   typedef typename Superclass::GlobalDataStruct GlobalDataStruct;
00101 
00103   itkStaticConstMacro(ImageDimension, unsigned int,
00104                       Superclass::ImageDimension);
00105 
00107   virtual void CalculateSpeedImage();
00108 
00110   virtual void CalculateAdvectionImage();
00111 
00113   virtual ScalarValueType CurvatureSpeed(const NeighborhoodType & neighborhood,
00114                                          const FloatOffsetType & offset, GlobalDataStruct *gd ) const
00115   { return PropagationSpeed( neighborhood, offset, gd ); }
00116 
00119   void SetDerivativeSigma( const double v )
00120   { m_DerivativeSigma = v; }
00121   double GetDerivativeSigma()
00122   { return m_DerivativeSigma; };
00124 
00125   virtual void Initialize(const RadiusType &r)
00126   {
00127     Superclass::Initialize(r);
00128     
00129     this->SetAdvectionWeight( NumericTraits<ScalarValueType>::One );
00130     this->SetPropagationWeight( NumericTraits<ScalarValueType>::One );
00131     this->SetCurvatureWeight( NumericTraits<ScalarValueType>::One );
00132   }
00133   
00134 protected:
00135   GeodesicActiveContourLevelSetFunction()
00136   {
00137     this->SetAdvectionWeight( NumericTraits<ScalarValueType>::One );
00138     this->SetPropagationWeight( NumericTraits<ScalarValueType>::One );
00139     this->SetCurvatureWeight( NumericTraits<ScalarValueType>::One );
00140 
00141     m_DerivativeSigma = 1.0;
00142   }
00143   virtual ~GeodesicActiveContourLevelSetFunction() {}
00144 
00145   GeodesicActiveContourLevelSetFunction(const Self&); //purposely not implemented
00146   void operator=(const Self&); //purposely not implemented
00147   
00148   void PrintSelf(std::ostream& os, Indent indent) const
00149   {
00150     Superclass::PrintSelf(os, indent );
00151     os << indent << "DerivativeSigma: " << m_DerivativeSigma << std::endl;
00152   }
00153 
00154 private:
00155   
00156   double m_DerivativeSigma;
00157   
00158 };
00159   
00160 } // end namespace itk
00161 
00162 #ifndef ITK_MANUAL_INSTANTIATION
00163 #include "itkGeodesicActiveContourLevelSetFunction.txx"
00164 #endif
00165 
00166 #endif
00167 

Generated at Tue Jul 29 20:09:36 2008 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000