Orfeo Toolbox  4.0
itkSegmentationLevelSetFunction.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef __itkSegmentationLevelSetFunction_h
19 #define __itkSegmentationLevelSetFunction_h
20 
21 #include "itkLevelSetFunction.h"
25 
26 namespace itk
27 {
46 template< typename TImageType, typename TFeatureImageType = TImageType >
48  public LevelSetFunction< TImageType >
49 {
50 public:
56 
59 
61  typedef typename Superclass::ImageType ImageType;
64  typedef TFeatureImageType FeatureImageType;
68  typedef typename FeatureImageType::PixelType FeatureScalarType;
69  typedef typename ImageType::IndexType IndexType;
72 
74  itkStaticConstMacro(ImageDimension, unsigned int, Superclass::ImageDimension);
75 
78 
81 
84 
87 
89  virtual const FeatureImageType * GetFeatureImage() const
90  { return m_FeatureImage.GetPointer(); }
91  virtual void SetFeatureImage(const FeatureImageType *f)
92  { m_FeatureImage = f; }
93 
96  { return m_SpeedImage.GetPointer(); }
97  void SetSpeedImage(ImageType *s);
98 
101  { return m_AdvectionImage.GetPointer(); }
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 
157  const FloatOffsetType &, GlobalDataStruct *gd) const;
158 
161  const FloatOffsetType &, GlobalDataStruct *gd) const;
162 
165  {
166  m_SpeedImage = ImageType::New();
170  }
171 
173 
175 
176 private:
177  SegmentationLevelSetFunction(const Self &); //purposely not implemented
178  void operator=(const Self &); //purposely not implemented
179 };
180 } // end namespace
181 
182 #ifndef ITK_MANUAL_INSTANTIATION
184 #endif
185 
186 #endif

Generated at Sat Mar 8 2014 15:29:51 for Orfeo Toolbox with doxygen 1.8.3.1