Orfeo Toolbox  3.16
itkShapePriorSegmentationLevelSetFunction.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Insight Segmentation & Registration Toolkit
4  Module: $RCSfile: itkShapePriorSegmentationLevelSetFunction.h,v $
5  Language: C++
6  Date: $Date: 2009-01-27 19:30:16 $
7  Version: $Revision: 1.6 $
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 __itkShapePriorSegmentationLevelSetFunction_h
18 #define __itkShapePriorSegmentationLevelSetFunction_h
19 
22 
23 namespace itk {
24 
52 template <class TImageType, class TFeatureImageType = TImageType>
54  : public SegmentationLevelSetFunction<TImageType, TFeatureImageType>
55 {
56 public:
63  typedef TFeatureImageType FeatureImageType;
64 
66  itkNewMacro(Self);
67 
70 
72  typedef typename Superclass::ImageType ImageType;
79  typedef typename Superclass::PixelType PixelType;
81  typedef typename Superclass::IndexType IndexType;
83 
85  itkStaticConstMacro(ImageDimension, unsigned int,
86  Superclass::ImageDimension);
87 
89  typedef ShapeSignedDistanceFunction<double,
90  itkGetStaticConstMacro(ImageDimension)> ShapeFunctionType;
92 
94  void SetShapePriorWeight( const ScalarValueType p )
95  { m_ShapePriorWeight = p; }
96  ScalarValueType GetShapePriorWeight() const
97  { return m_ShapePriorWeight; }
98 
101  void SetShapeFunction( const ShapeFunctionType * ptr )
102  { m_ShapeFunction = ptr; }
103  const ShapeFunctionType * GetShapeFunction() const
104  { return m_ShapeFunction; }
105 
106 
108  virtual PixelType ComputeUpdate(const NeighborhoodType &neighborhood,
109  void *globalData,
110  const FloatOffsetType& = FloatOffsetType(0.0));
111 
113  virtual TimeStepType ComputeGlobalTimeStep( void *globalData ) const;
114 
118  {
120  };
121 
123  virtual void *GetGlobalDataPointer() const
124  {
126  ans->m_MaxAdvectionChange = NumericTraits<ScalarValueType>::Zero;
127  ans->m_MaxPropagationChange = NumericTraits<ScalarValueType>::Zero;
128  ans->m_MaxCurvatureChange = NumericTraits<ScalarValueType>::Zero;
129  ans->m_MaxShapePriorChange = NumericTraits<ScalarValueType>::Zero;
130  return ans;
131  }
132 
134  virtual void ReleaseGlobalDataPointer(void *GlobalData) const
135  { delete (ShapePriorGlobalDataStruct *) GlobalData; }
136 
137 protected:
140 
141  ShapePriorSegmentationLevelSetFunction(const Self&); //purposely not implemented
142  void operator=(const Self&); //purposely not implemented
143 
144  void PrintSelf(std::ostream& os, Indent indent) const;
145 
146 private:
147 
150 
151 };
152 
153 } // end namespace itk
154 
155 #ifndef ITK_MANUAL_INSTANTIATION
157 #endif
158 
159 #endif

Generated at Sun Feb 3 2013 00:06:19 for Orfeo Toolbox with doxygen 1.8.1.1