Orfeo Toolbox  3.16
itkSegmentationLevelSetFunction.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Insight Segmentation & Registration Toolkit
4  Module: $RCSfile: itkSegmentationLevelSetFunction.h,v $
5  Language: C++
6  Date: $Date: 2009-03-03 15:09:09 $
7  Version: $Revision: 1.19 $
8 
9  Copyright (c) Insight Software Consortium. All rights reserved.
10  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
11 
12  This software is distributed WITHOUT ANY WARRANTY; without even
13  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14  PURPOSE. See the above copyright notices for more information.
15 
16 =========================================================================*/
17 #ifndef __itkSegmentationLevelSetFunction_h
18 #define __itkSegmentationLevelSetFunction_h
19 
20 #include "itkLevelSetFunction.h"
24 
25 namespace itk {
26 
44 template <class TImageType, class TFeatureImageType = TImageType>
46  : public LevelSetFunction<TImageType>
47 {
48 public:
54 
57 
59  typedef typename Superclass::ImageType ImageType;
60  typedef typename Superclass::RadiusType RadiusType;
61  typedef typename Superclass::PixelRealType PixelRealType;
62  typedef TFeatureImageType FeatureImageType;
63  typedef typename Superclass::FloatOffsetType FloatOffsetType;
65  typedef typename Superclass::NeighborhoodType NeighborhoodType;
66  typedef typename FeatureImageType::PixelType FeatureScalarType;
67  typedef typename ImageType::IndexType IndexType;
69  typedef typename Superclass::GlobalDataStruct GlobalDataStruct;
70 
72  itkStaticConstMacro(ImageDimension, unsigned int,Superclass::ImageDimension);
73 
76 
77 
80 
83 
86 
88  virtual const FeatureImageType *GetFeatureImage() const
89  { return m_FeatureImage.GetPointer(); }
90  virtual void SetFeatureImage(const FeatureImageType *f)
91  { m_FeatureImage = f; }
92 
94  virtual ImageType *GetSpeedImage()
95  { return m_SpeedImage.GetPointer(); }
96  void SetSpeedImage( ImageType *s );
97 
99  virtual VectorImageType *GetAdvectionImage() const
100  { return m_AdvectionImage.GetPointer(); }
101  void SetAdvectionImage( VectorImageType *s );
102 
103 
107  virtual void Initialize(const RadiusType &r);
108 
113  virtual void CalculateSpeedImage() {}
114 
119  virtual void CalculateAdvectionImage() {}
120 
123  virtual void AllocateSpeedImage();
124 
127  virtual void AllocateAdvectionImage();
128 
139  virtual void ReverseExpansionDirection();
140 
141 protected:
143  typename FeatureImageType::ConstPointer m_FeatureImage;
144 
146  typename ImageType::Pointer m_SpeedImage;
147 
150 
154 
156  virtual ScalarValueType PropagationSpeed(const NeighborhoodType &,
157  const FloatOffsetType &, GlobalDataStruct *gd) const;
158 
160  virtual VectorType AdvectionField(const NeighborhoodType &,
161  const FloatOffsetType &, GlobalDataStruct *gd) const;
162 
163 
166  {
167  m_SpeedImage = ImageType::New();
168  m_AdvectionImage = VectorImageType::New();
169  m_Interpolator = InterpolatorType::New();
170  m_VectorInterpolator = VectorInterpolatorType::New();
171  }
172 
175 
176 
177 private:
178  SegmentationLevelSetFunction(const Self&); //purposely not implemented
179  void operator=(const Self&); //purposely not implemented
180 };
181 
182 } // end namespace
183 
184 // Define instantiation macro for this template.
185 #define ITK_TEMPLATE_SegmentationLevelSetFunction(_, EXPORT, x, y) namespace itk { \
186  _(2(class EXPORT SegmentationLevelSetFunction< ITK_TEMPLATE_2 x >)) \
187  namespace Templates { typedef SegmentationLevelSetFunction< ITK_TEMPLATE_2 x > \
188  SegmentationLevelSetFunction##y; } \
189  }
190 
191 #if ITK_TEMPLATE_EXPLICIT
192 # include "Templates/itkSegmentationLevelSetFunction+-.h"
193 #endif
194 
195 #if ITK_TEMPLATE_TXX
197 #endif
198 
199 
200 #endif

Generated at Sun Feb 3 2013 00:05:22 for Orfeo Toolbox with doxygen 1.8.1.1