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: 2008-12-21 19:13:11 $
00007   Version:   $Revision: 1.11 $
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>
00082                                                 Superclass;
00083   typedef SmartPointer<Self>                    Pointer;
00084   typedef SmartPointer<const Self>              ConstPointer;
00085   typedef TFeatureImageType                     FeatureImageType;
00086 
00088   itkNewMacro(Self);
00089 
00091   itkTypeMacro( GeodesicActiveContourLevelSetFunction, SegmentationLevelSetFunction );
00092 
00094   typedef typename Superclass::ImageType         ImageType;
00095   typedef typename Superclass::NeighborhoodType  NeighborhoodType;
00096   typedef typename Superclass::ScalarValueType   ScalarValueType;
00097   typedef typename Superclass::FeatureScalarType FeatureScalarType;
00098   typedef typename Superclass::RadiusType        RadiusType;
00099   typedef typename Superclass::FloatOffsetType   FloatOffsetType;
00100   typedef typename Superclass::VectorImageType   VectorImageType;
00101   typedef typename Superclass::GlobalDataStruct  GlobalDataStruct;
00102 
00104   itkStaticConstMacro(ImageDimension, unsigned int,
00105                       Superclass::ImageDimension);
00106 
00108   virtual void CalculateSpeedImage();
00109 
00111   virtual void CalculateAdvectionImage();
00112 
00114   virtual ScalarValueType CurvatureSpeed(const NeighborhoodType & neighborhood,
00115                                          const FloatOffsetType & offset, GlobalDataStruct *gd ) const
00116     { 
00117     return PropagationSpeed( neighborhood, offset, gd );
00118     }
00119 
00122   void SetDerivativeSigma( const double v )
00123     { m_DerivativeSigma = v; }
00124   double GetDerivativeSigma()
00125     { return m_DerivativeSigma; }
00127 
00128   virtual void Initialize(const RadiusType &r)
00129     {
00130     Superclass::Initialize(r);
00131     
00132     this->SetAdvectionWeight( NumericTraits<ScalarValueType>::One );
00133     this->SetPropagationWeight( NumericTraits<ScalarValueType>::One );
00134     this->SetCurvatureWeight( NumericTraits<ScalarValueType>::One );
00135     }
00136   
00137 protected:
00138   GeodesicActiveContourLevelSetFunction()
00139     {
00140     this->SetAdvectionWeight( NumericTraits<ScalarValueType>::One );
00141     this->SetPropagationWeight( NumericTraits<ScalarValueType>::One );
00142     this->SetCurvatureWeight( NumericTraits<ScalarValueType>::One );
00143 
00144     m_DerivativeSigma = 1.0;
00145     }
00146   virtual ~GeodesicActiveContourLevelSetFunction() {}
00147 
00148   GeodesicActiveContourLevelSetFunction(const Self&); //purposely not implemented
00149   void operator=(const Self&); //purposely not implemented
00150   
00151   void PrintSelf(std::ostream& os, Indent indent) const
00152     {
00153     Superclass::PrintSelf(os, indent );
00154     os << indent << "DerivativeSigma: " << m_DerivativeSigma << std::endl;
00155     }
00156 
00157 private:
00158   double m_DerivativeSigma;
00159   
00160 };
00161   
00162 } // end namespace itk
00163 
00164 #ifndef ITK_MANUAL_INSTANTIATION
00165 #include "itkGeodesicActiveContourLevelSetFunction.txx"
00166 #endif
00167 
00168 #endif
00169 

Generated at Thu May 28 10:02:00 2009 for ITK by doxygen 1.5.5 written by Dimitri van Heesch, © 1997-2000