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/02/20 20:40:13 $
00007   Version:   $Revision: 1.2 $
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 __itkGeodesicActiveContourLevelSetFunction_h_
00018 #define __itkGeodesicActiveContourLevelSetFunction_h_
00019 
00020 #include "itkSegmentationLevelSetFunction.h"
00021 
00022 namespace itk {
00023 
00060 template <class TImageType, class TFeatureImageType = TImageType>
00061 class ITK_EXPORT GeodesicActiveContourLevelSetFunction
00062   : public SegmentationLevelSetFunction<TImageType, TFeatureImageType>
00063 {
00064 public:
00066   typedef GeodesicActiveContourLevelSetFunction Self;
00067   typedef SegmentationLevelSetFunction<TImageType> Superclass;
00068   typedef SmartPointer<Self> Pointer;
00069   typedef SmartPointer<const Self> ConstPointer;
00070   typedef TFeatureImageType FeatureImageType;
00071 
00073   itkNewMacro(Self);
00074 
00076   itkTypeMacro( GeodesicActiveContourLevelSetFunction, SegmentationLevelSetFunction );
00077 
00079   typedef typename Superclass::ImageType ImageType;
00080   typedef typename Superclass::NeighborhoodType NeighborhoodType;
00081   typedef typename Superclass::ScalarValueType ScalarValueType;
00082   typedef typename Superclass::FeatureScalarType FeatureScalarType;
00083   typedef typename Superclass::RadiusType RadiusType;
00084   typedef typename Superclass::FloatOffsetType FloatOffsetType;
00085   typedef typename Superclass::VectorImageType VectorImageType;
00086 
00088   itkStaticConstMacro(ImageDimension, unsigned int,
00089                       Superclass::ImageDimension);
00090 
00092   virtual void CalculateSpeedImage();
00093 
00095   virtual void CalculateAdvectionImage();
00096 
00098   virtual ScalarValueType CurvatureSpeed(const NeighborhoodType & neighborhood,
00099                                            const FloatOffsetType & offset ) const
00100     { return PropagationSpeed( neighborhood, offset ); }
00101 
00104   void SetDerivativeSigma( const double v )
00105     { m_DerivativeSigma = v; }
00106   double GetDerivativeSigma()
00107     { return m_DerivativeSigma; };
00108 
00109   virtual void Initialize(const RadiusType &r)
00110   {
00111     Superclass::Initialize(r);
00112     
00113     this->SetAdvectionWeight( NumericTraits<ScalarValueType>::One );
00114     this->SetPropagationWeight( NumericTraits<ScalarValueType>::One );
00115     this->SetCurvatureWeight( NumericTraits<ScalarValueType>::One );
00116   }
00117   
00118 protected:
00119   GeodesicActiveContourLevelSetFunction()
00120   {
00121     this->SetAdvectionWeight( NumericTraits<ScalarValueType>::One );
00122     this->SetPropagationWeight( NumericTraits<ScalarValueType>::One );
00123     this->SetCurvatureWeight( NumericTraits<ScalarValueType>::One );
00124 
00125     m_DerivativeSigma = 1.0;
00126   }
00127   virtual ~GeodesicActiveContourLevelSetFunction() {}
00128 
00129   GeodesicActiveContourLevelSetFunction(const Self&); //purposely not implemented
00130   void operator=(const Self&); //purposely not implemented
00131   
00132   void PrintSelf(std::ostream& os, Indent indent) const
00133   {
00134     Superclass::PrintSelf(os, indent );
00135     os << indent << "DerivativeSigma: " << m_DerivativeSigma << std::endl;
00136   }
00137 
00138 private:
00139   
00140   double m_DerivativeSigma;
00141   
00142 };
00143   
00144 } // end namespace itk
00145 
00146 #ifndef ITK_MANUAL_INSTANTIATION
00147 #include "itkGeodesicActiveContourLevelSetFunction.txx"
00148 #endif
00149 
00150 #endif

Generated at Fri May 21 01:14:48 2004 for ITK by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2000