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: 2003/09/10 14:28:31 $
00007   Version:   $Revision: 1.3 $
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 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; };
00140 
00141   virtual void Initialize(const RadiusType &r)
00142   {
00143     Superclass::Initialize(r);
00144     
00145     this->SetAdvectionWeight( NumericTraits<ScalarValueType>::One );
00146     this->SetPropagationWeight( NumericTraits<ScalarValueType>::One );
00147     this->SetCurvatureWeight( NumericTraits<ScalarValueType>::One );
00148     this->SetShapePriorWeight( NumericTraits<ScalarValueType>::One );
00149   }
00150   
00151 protected:
00152   GeodesicActiveContourShapePriorLevelSetFunction()
00153   {
00154     this->SetAdvectionWeight( NumericTraits<ScalarValueType>::One );
00155     this->SetPropagationWeight( NumericTraits<ScalarValueType>::One );
00156     this->SetCurvatureWeight( NumericTraits<ScalarValueType>::One );
00157     this->SetShapePriorWeight( NumericTraits<ScalarValueType>::One );
00158 
00159     m_DerivativeSigma = 1.0;
00160   }
00161 
00162   virtual ~GeodesicActiveContourShapePriorLevelSetFunction() {}
00163 
00164   GeodesicActiveContourShapePriorLevelSetFunction(const Self&); //purposely not implemented
00165   void operator=(const Self&); //purposely not implemented
00166   
00167   void PrintSelf(std::ostream& os, Indent indent) const
00168   {
00169     Superclass::PrintSelf(os, indent );
00170     os << indent << "DerivativeSigma: " << m_DerivativeSigma << std::endl;
00171   }
00172 
00173 private:
00174 
00175   double m_DerivativeSigma;
00176   
00177 };
00178   
00179 } // end namespace itk
00180 
00181 #ifndef ITK_MANUAL_INSTANTIATION
00182 #include "itkGeodesicActiveContourShapePriorLevelSetFunction.txx"
00183 #endif
00184 
00185 #endif

Generated at Wed May 24 23:12:12 2006 for ITK by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2000