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

itkCurvesLevelSetFunction.h

Go to the documentation of this file.
00001 
00002 /*=========================================================================
00003 
00004   Program:   Insight Segmentation & Registration Toolkit
00005   Module:    $RCSfile: itkCurvesLevelSetFunction.h,v $
00006   Language:  C++
00007   Date:      $Date: 2003-09-10 14:28:29 $
00008   Version:   $Revision: 1.3 $
00009 
00010   Copyright (c) Insight Software Consortium. All rights reserved.
00011   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
00012 
00013      This software is distributed WITHOUT ANY WARRANTY; without even 
00014      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00015      PURPOSE.  See the above copyright notices for more information.
00016 
00017 =========================================================================*/
00018 #ifndef __itkCurvesLevelSetFunction_h_
00019 #define __itkCurvesLevelSetFunction_h_
00020 
00021 #include "itkSegmentationLevelSetFunction.h"
00022 
00023 namespace itk {
00024 
00060 template <class TImageType, class TFeatureImageType = TImageType>
00061 class ITK_EXPORT CurvesLevelSetFunction
00062   : public SegmentationLevelSetFunction<TImageType, TFeatureImageType>
00063 {
00064 public:
00066   typedef CurvesLevelSetFunction Self;
00067   typedef SegmentationLevelSetFunction<TImageType> Superclass;
00068   typedef LevelSetFunction<TImageType> SuperSuperclass;
00069   typedef SmartPointer<Self> Pointer;
00070   typedef SmartPointer<const Self> ConstPointer;
00071   typedef TFeatureImageType FeatureImageType;
00072 
00074   itkNewMacro(Self);
00075 
00077   itkTypeMacro( CurvesLevelSetFunction, SegmentationLevelSetFunction );
00078 
00080   typedef typename SuperSuperclass::PixelType    PixelType;
00081   typedef typename Superclass::ImageType ImageType;
00082   typedef typename Superclass::NeighborhoodType  NeighborhoodType;
00083   typedef typename Superclass::ScalarValueType   ScalarValueType;
00084   typedef typename Superclass::FeatureScalarType FeatureScalarType;
00085   typedef typename Superclass::RadiusType        RadiusType;
00086   typedef typename SuperSuperclass::FloatOffsetType   FloatOffsetType;
00087   typedef typename SuperSuperclass::GlobalDataStruct GlobalDataStruct;
00088   typedef typename Superclass::VectorImageType   VectorImageType;
00089 
00091   itkStaticConstMacro(ImageDimension, unsigned int,
00092                       Superclass::ImageDimension);
00093 
00095   virtual void CalculateSpeedImage();
00096 
00098   virtual void CalculateAdvectionImage();
00099 
00101   virtual ScalarValueType CurvatureSpeed(const NeighborhoodType & neighborhood,
00102                                          const FloatOffsetType & offset, GlobalDataStruct *gd ) const
00103   { return PropagationSpeed( neighborhood, offset, gd ); }
00104 
00107   void SetDerivativeSigma( const double v )
00108     { m_DerivativeSigma = v; }
00109   double GetDerivativeSigma()
00110     { return m_DerivativeSigma; };
00112 
00113   virtual void Initialize(const RadiusType &r);
00114   
00115 protected:
00116   CurvesLevelSetFunction()
00117   {
00118     //Curvature term is the minimal curvature.
00119     this->UseMinimalCurvatureOn();
00120     this->SetAdvectionWeight( NumericTraits<ScalarValueType>::One );
00121     this->SetPropagationWeight( NumericTraits<ScalarValueType>::One );
00122     this->SetCurvatureWeight( NumericTraits<ScalarValueType>::One );
00123     
00124 
00125     m_DerivativeSigma = 1.0;
00126   }
00127   virtual ~CurvesLevelSetFunction() {}
00128 
00129   CurvesLevelSetFunction(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   
00141   std::slice x_slice[ImageDimension];
00142 
00144   ::size_t m_Center;
00145 
00147   ::size_t m_xStride[ImageDimension];
00148 
00149   
00150   double m_DerivativeSigma;
00151   
00152 };
00153   
00154 } // end namespace itk
00155 
00156 #ifndef ITK_MANUAL_INSTANTIATION
00157 #include "itkCurvesLevelSetFunction.txx"
00158 #endif
00159 
00160 #endif
00161 

Generated at Mon Apr 14 12:08:54 2008 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000