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: 2009-01-27 19:30:15 $
00007   Version:   $Revision: 1.12 $
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>
00077                                          Superclass;
00078   typedef SmartPointer<Self>             Pointer;
00079   typedef SmartPointer<const Self>       ConstPointer;
00080   typedef TFeatureImageType              FeatureImageType;
00081 
00083   itkNewMacro(Self);
00084 
00086   itkTypeMacro( ShapeDetectionLevelSetFunction, SegmentationLevelSetFunction );
00087 
00089   typedef typename Superclass::ImageType         ImageType;
00090   typedef typename Superclass::NeighborhoodType  NeighborhoodType;
00091   typedef typename Superclass::ScalarValueType   ScalarValueType;
00092   typedef typename Superclass::FeatureScalarType FeatureScalarType;
00093   typedef typename Superclass::RadiusType        RadiusType;
00094   typedef typename Superclass::FloatOffsetType   FloatOffsetType;
00095   typedef typename Superclass::GlobalDataStruct  GlobalDataStruct;
00096 
00098   itkStaticConstMacro(ImageDimension, unsigned int,
00099                       Superclass::ImageDimension);
00100 
00101   virtual void CalculateSpeedImage();
00102 
00104   virtual ScalarValueType CurvatureSpeed(const NeighborhoodType & neighborhood,
00105                                          const FloatOffsetType & offset, GlobalDataStruct *gd ) const
00106   { return PropagationSpeed( neighborhood, offset, gd ); }
00107 
00108   virtual void Initialize(const RadiusType &r)
00109     {
00110     Superclass::Initialize(r);
00111     
00112     this->SetAdvectionWeight( NumericTraits<ScalarValueType>::Zero );
00113     this->SetPropagationWeight( NumericTraits<ScalarValueType>::One );
00114     this->SetCurvatureWeight( NumericTraits<ScalarValueType>::One );
00115     }
00116   
00117 protected:
00118   ShapeDetectionLevelSetFunction()
00119     {
00120     this->SetAdvectionWeight( NumericTraits<ScalarValueType>::Zero );
00121     this->SetPropagationWeight( NumericTraits<ScalarValueType>::One );
00122     this->SetCurvatureWeight( NumericTraits<ScalarValueType>::One );
00123     }
00124   virtual ~ShapeDetectionLevelSetFunction() {}
00125 
00126   ShapeDetectionLevelSetFunction(const Self&); //purposely not implemented
00127   void operator=(const Self&); //purposely not implemented
00128   
00129 };
00130   
00131 } // end namespace itk
00132 
00133 #ifndef ITK_MANUAL_INSTANTIATION
00134 #include "itkShapeDetectionLevelSetFunction.txx"
00135 #endif
00136 
00137 #endif
00138 

Generated at Sat Feb 28 13:30:39 2009 for ITK by doxygen 1.5.6 written by Dimitri van Heesch, © 1997-2000