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

itkGeodesicActiveContourShapePriorLevelSetFunction.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkGeodesicActiveContourShapePriorLevelSetFunction.h,v $
00005   Language:  C++
00006   Date:      $Date: 2008-12-21 19:13:12 $
00007   Version:   $Revision: 1.5 $
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 __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
00097                                    Self;
00098   typedef ShapePriorSegmentationLevelSetFunction<TImageType,TFeatureImageType> Superclass;
00099   typedef SmartPointer<Self>       Pointer;
00100   typedef SmartPointer<const Self> ConstPointer;
00101   typedef TFeatureImageType        FeatureImageType;
00102 
00104   itkNewMacro(Self);
00105 
00107   itkTypeMacro( GeodesicActiveContourShapePriorLevelSetFunction, 
00108     ShapePriorSegmentationLevelSetFunction );
00109 
00111   typedef typename Superclass::ImageType         ImageType;
00112   typedef typename Superclass::NeighborhoodType  NeighborhoodType;
00113   typedef typename Superclass::ScalarValueType   ScalarValueType;
00114   typedef typename Superclass::FeatureScalarType FeatureScalarType;
00115   typedef typename Superclass::RadiusType        RadiusType;
00116   typedef typename Superclass::FloatOffsetType   FloatOffsetType;
00117   typedef typename Superclass::VectorImageType   VectorImageType;
00118   typedef typename Superclass::GlobalDataStruct  GlobalDataStruct;
00119 
00121   itkStaticConstMacro(ImageDimension, unsigned int,
00122                       Superclass::ImageDimension);
00123 
00125   virtual void CalculateSpeedImage();
00126 
00128   virtual void CalculateAdvectionImage();
00129 
00131   virtual ScalarValueType CurvatureSpeed(const NeighborhoodType & neighborhood,
00132                                          const FloatOffsetType & offset, GlobalDataStruct *gd ) const
00133     { return PropagationSpeed( neighborhood, offset, gd ); }
00134 
00137   void SetDerivativeSigma( const double v )
00138     { m_DerivativeSigma = v; }
00139   double GetDerivativeSigma()
00140     { return m_DerivativeSigma; }
00142 
00143   virtual void Initialize(const RadiusType &r)
00144     {
00145     Superclass::Initialize(r);
00146     
00147     this->SetAdvectionWeight( NumericTraits<ScalarValueType>::One );
00148     this->SetPropagationWeight( NumericTraits<ScalarValueType>::One );
00149     this->SetCurvatureWeight( NumericTraits<ScalarValueType>::One );
00150     this->SetShapePriorWeight( NumericTraits<ScalarValueType>::One );
00151     }
00152   
00153 protected:
00154   GeodesicActiveContourShapePriorLevelSetFunction()
00155     {
00156     this->SetAdvectionWeight( NumericTraits<ScalarValueType>::One );
00157     this->SetPropagationWeight( NumericTraits<ScalarValueType>::One );
00158     this->SetCurvatureWeight( NumericTraits<ScalarValueType>::One );
00159     this->SetShapePriorWeight( NumericTraits<ScalarValueType>::One );
00160 
00161     m_DerivativeSigma = 1.0;
00162     }
00163 
00164   virtual ~GeodesicActiveContourShapePriorLevelSetFunction() {}
00165 
00166   GeodesicActiveContourShapePriorLevelSetFunction(const Self&); //purposely not implemented
00167   void operator=(const Self&); //purposely not implemented
00168   
00169   void PrintSelf(std::ostream& os, Indent indent) const
00170     {
00171     Superclass::PrintSelf(os, indent );
00172     os << indent << "DerivativeSigma: " << m_DerivativeSigma << std::endl;
00173     }
00174 
00175 private:
00176   double m_DerivativeSigma;
00177   
00178 };
00179   
00180 } // end namespace itk
00181 
00182 #ifndef ITK_MANUAL_INSTANTIATION
00183 #include "itkGeodesicActiveContourShapePriorLevelSetFunction.txx"
00184 #endif
00185 
00186 #endif
00187 

Generated at Sat Feb 28 12:29:22 2009 for ITK by doxygen 1.5.6 written by Dimitri van Heesch, © 1997-2000