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

itkShapeDetectionLevelSetFunction.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkShapeDetectionLevelSetFunction.h,v $
00005   Language:  C++
00006   Date:      $Date: 2003-09-10 14:28:38 $
00007   Version:   $Revision: 1.11 $
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 __itkShapeDetectionLevelSetFunction_h_
00018 #define __itkShapeDetectionLevelSetFunction_h_
00019 
00020 #include "itkSegmentationLevelSetFunction.h"
00021 
00022 namespace itk {
00023 
00069 template <class TImageType, class TFeatureImageType = TImageType>
00070 class ITK_EXPORT ShapeDetectionLevelSetFunction
00071   : public SegmentationLevelSetFunction<TImageType, TFeatureImageType>
00072 {
00073 public:
00075   typedef ShapeDetectionLevelSetFunction Self;
00076   typedef SegmentationLevelSetFunction<TImageType, TFeatureImageType> Superclass;
00077   typedef SmartPointer<Self> Pointer;
00078   typedef SmartPointer<const Self> ConstPointer;
00079   typedef TFeatureImageType FeatureImageType;
00080 
00082   itkNewMacro(Self);
00083 
00085   itkTypeMacro( ShapeDetectionLevelSetFunction, SegmentationLevelSetFunction );
00086 
00088   typedef typename Superclass::ImageType ImageType;
00089   typedef typename Superclass::NeighborhoodType NeighborhoodType;
00090   typedef typename Superclass::ScalarValueType ScalarValueType;
00091   typedef typename Superclass::FeatureScalarType FeatureScalarType;
00092   typedef typename Superclass::RadiusType RadiusType;
00093   typedef typename Superclass::FloatOffsetType FloatOffsetType;
00094   typedef typename Superclass::GlobalDataStruct GlobalDataStruct;
00095 
00097   itkStaticConstMacro(ImageDimension, unsigned int,
00098                       Superclass::ImageDimension);
00099 
00100   virtual void CalculateSpeedImage();
00101 
00103   virtual ScalarValueType CurvatureSpeed(const NeighborhoodType & neighborhood,
00104                                          const FloatOffsetType & offset, GlobalDataStruct *gd ) const
00105   { return PropagationSpeed( neighborhood, offset, gd ); }
00106 
00107   virtual void Initialize(const RadiusType &r)
00108   {
00109     Superclass::Initialize(r);
00110     
00111     this->SetAdvectionWeight( NumericTraits<ScalarValueType>::Zero );
00112     this->SetPropagationWeight( NumericTraits<ScalarValueType>::One );
00113     this->SetCurvatureWeight( NumericTraits<ScalarValueType>::One );
00114   }
00115   
00116 protected:
00117   ShapeDetectionLevelSetFunction()
00118   {
00119     this->SetAdvectionWeight( NumericTraits<ScalarValueType>::Zero );
00120     this->SetPropagationWeight( NumericTraits<ScalarValueType>::One );
00121     this->SetCurvatureWeight( NumericTraits<ScalarValueType>::One );
00122   }
00123   virtual ~ShapeDetectionLevelSetFunction() {}
00124 
00125   ShapeDetectionLevelSetFunction(const Self&); //purposely not implemented
00126   void operator=(const Self&); //purposely not implemented
00127   
00128   void PrintSelf(std::ostream& os, Indent indent) const
00129   {
00130     Superclass::PrintSelf(os, indent );
00131   }
00132   
00133 };
00134   
00135 } // end namespace itk
00136 
00137 #ifndef ITK_MANUAL_INSTANTIATION
00138 #include "itkShapeDetectionLevelSetFunction.txx"
00139 #endif
00140 
00141 #endif
00142 

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