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   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkCurvesLevelSetFunction.h,v $
00005   Language:  C++
00006   Date:      $Date: 2008-10-23 16:15:23 $
00007   Version:   $Revision: 1.4 $
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 __itkCurvesLevelSetFunction_h
00018 #define __itkCurvesLevelSetFunction_h
00019 
00020 #include "itkSegmentationLevelSetFunction.h"
00021 
00022 namespace itk {
00023 
00059 template <class TImageType, class TFeatureImageType = TImageType>
00060 class ITK_EXPORT CurvesLevelSetFunction
00061   : public SegmentationLevelSetFunction<TImageType, TFeatureImageType>
00062 {
00063 public:
00065   typedef CurvesLevelSetFunction                   Self;
00066   typedef SegmentationLevelSetFunction<TImageType> Superclass;
00067   typedef LevelSetFunction<TImageType>             SuperSuperclass;
00068   typedef SmartPointer<Self>                       Pointer;
00069   typedef SmartPointer<const Self>                 ConstPointer;
00070   typedef TFeatureImageType                        FeatureImageType;
00071 
00073   itkNewMacro(Self);
00074 
00076   itkTypeMacro( CurvesLevelSetFunction, SegmentationLevelSetFunction );
00077 
00079   typedef typename SuperSuperclass::PixelType        PixelType;
00080   typedef typename Superclass::ImageType             ImageType;
00081   typedef typename Superclass::NeighborhoodType      NeighborhoodType;
00082   typedef typename Superclass::ScalarValueType       ScalarValueType;
00083   typedef typename Superclass::FeatureScalarType     FeatureScalarType;
00084   typedef typename Superclass::RadiusType            RadiusType;
00085   typedef typename SuperSuperclass::FloatOffsetType  FloatOffsetType;
00086   typedef typename SuperSuperclass::GlobalDataStruct GlobalDataStruct;
00087   typedef typename Superclass::VectorImageType       VectorImageType;
00088 
00090   itkStaticConstMacro(ImageDimension, unsigned int,
00091                       Superclass::ImageDimension);
00092 
00094   virtual void CalculateSpeedImage();
00095 
00097   virtual void CalculateAdvectionImage();
00098 
00100   virtual ScalarValueType CurvatureSpeed(const NeighborhoodType & neighborhood,
00101                                          const FloatOffsetType & offset, GlobalDataStruct *gd ) const
00102   { return PropagationSpeed( neighborhood, offset, gd ); }
00103 
00106   void SetDerivativeSigma( const double v )
00107     { m_DerivativeSigma = v; }
00108   double GetDerivativeSigma()
00109     { return m_DerivativeSigma; }
00111 
00112   virtual void Initialize(const RadiusType &r);
00113   
00114 protected:
00115   CurvesLevelSetFunction()
00116     {
00117     //Curvature term is the minimal curvature.
00118     this->UseMinimalCurvatureOn();
00119     this->SetAdvectionWeight( NumericTraits<ScalarValueType>::One );
00120     this->SetPropagationWeight( NumericTraits<ScalarValueType>::One );
00121     this->SetCurvatureWeight( NumericTraits<ScalarValueType>::One );
00122     
00123     m_DerivativeSigma = 1.0;
00124     }
00125   virtual ~CurvesLevelSetFunction() {}
00126 
00127   CurvesLevelSetFunction(const Self&); //purposely not implemented
00128   void operator=(const Self&); //purposely not implemented
00129   
00130   void PrintSelf(std::ostream& os, Indent indent) const
00131     {
00132     Superclass::PrintSelf(os, indent );
00133     os << indent << "DerivativeSigma: " << m_DerivativeSigma << std::endl;
00134     }
00135 
00136 private:
00137   
00139   std::slice x_slice[ImageDimension];
00140 
00142   ::size_t m_Center;
00143 
00145   ::size_t m_xStride[ImageDimension];
00146 
00147   
00148   double m_DerivativeSigma;
00149   
00150 };
00151   
00152 } // end namespace itk
00153 
00154 #ifndef ITK_MANUAL_INSTANTIATION
00155 #include "itkCurvesLevelSetFunction.txx"
00156 #endif
00157 
00158 #endif
00159 

Generated at Mon Jul 12 2010 18:11:10 for ITK by doxygen 1.7.1 written by Dimitri van Heesch, © 1997-2000