Orfeo Toolbox  3.16
itkCurvatureFlowFunction.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Insight Segmentation & Registration Toolkit
4  Module: $RCSfile: itkCurvatureFlowFunction.h,v $
5  Language: C++
6  Date: $Date: 2008-10-23 16:15:23 $
7  Version: $Revision: 1.21 $
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 __itkCurvatureFlowFunction_h
18 #define __itkCurvatureFlowFunction_h
19 
21 #include "itkMacro.h"
22 
23 namespace itk {
24 
40 template <class TImage>
42  public FiniteDifferenceFunction<TImage>
43 {
44 public:
50 
52  itkNewMacro(Self);
53 
55  itkTypeMacro( CurvatureFlowFunction,
57 
59  typedef typename Superclass::ImageType ImageType;
60  typedef typename Superclass::PixelType PixelType;
68 
70  itkStaticConstMacro(ImageDimension, unsigned int,Superclass::ImageDimension);
71 
82  virtual TimeStepType ComputeGlobalTimeStep(void *GlobalData) const;
83 
89  virtual void *GetGlobalDataPointer() const
90  {
91  GlobalDataStruct *ans = new GlobalDataStruct();
92  ans->m_MaxChange = NumericTraits<ScalarValueType>::Zero;
93  return ans;
94  }
95 
100  virtual void ReleaseGlobalDataPointer(void *GlobalData) const
101  { delete (GlobalDataStruct *) GlobalData; }
102 
104  void SetTimeStep( const TimeStepType & t )
105  { m_TimeStep = t; }
106 
108  const TimeStepType &GetTimeStep() const
109  { return m_TimeStep; }
110 
113  virtual PixelType ComputeUpdate(const NeighborhoodType &neighborhood,
114  void * globalData,
115  const FloatOffsetType& offset = FloatOffsetType(0.0)
116  );
117 
118 protected:
119 
122 
123  struct GlobalDataStruct
124  {
125  GlobalDataStruct()
126  {
128  }
129  ~GlobalDataStruct() {}
130 
131  ScalarValueType m_MaxChange;
132  };
134 
135  CurvatureFlowFunction();
137 
138 private:
139  CurvatureFlowFunction(const Self&); //purposely not implemented
140  void operator=(const Self&); //purposely not implemented
141 
143 
144 
145 };
146 
147 }// end namespace itk
148 
149 #ifndef ITK_MANUAL_INSTANTIATION
151 #endif
152 
153 #endif

Generated at Sat May 18 2013 23:35:23 for Orfeo Toolbox with doxygen 1.8.3.1