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; }; 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 00124 m_DerivativeSigma = 1.0; 00125 } 00126 virtual ~CurvesLevelSetFunction() {} 00127 00128 CurvesLevelSetFunction(const Self&); //purposely not implemented 00129 void operator=(const Self&); //purposely not implemented 00130 00131 void PrintSelf(std::ostream& os, Indent indent) const 00132 { 00133 Superclass::PrintSelf(os, indent ); 00134 os << indent << "DerivativeSigma: " << m_DerivativeSigma << std::endl; 00135 } 00136 00137 private: 00138 00140 std::slice x_slice[ImageDimension]; 00141 00143 ::size_t m_Center; 00144 00146 ::size_t m_xStride[ImageDimension]; 00147 00148 00149 double m_DerivativeSigma; 00150 00151 }; 00152 00153 } // end namespace itk 00154 00155 #ifndef ITK_MANUAL_INSTANTIATION 00156 #include "itkCurvesLevelSetFunction.txx" 00157 #endif 00158 00159 #endif

Generated at Sun Apr 1 02:26:45 2007 for ITK by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2000