Orfeo Toolbox
3.16
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
OTB
Utilities
ITK
Code
Algorithms
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
20
#include "
itkFiniteDifferenceFunction.h
"
21
#include "
itkMacro.h
"
22
23
namespace
itk {
24
40
template
<
class
TImage>
41
class
ITK_EXPORT
CurvatureFlowFunction
:
42
public
FiniteDifferenceFunction
<TImage>
43
{
44
public
:
46
typedef
CurvatureFlowFunction
Self
;
47
typedef
FiniteDifferenceFunction<TImage>
Superclass
;
48
typedef
SmartPointer<Self>
Pointer
;
49
typedef
SmartPointer<const Self>
ConstPointer
;
50
52
itkNewMacro(
Self
);
53
55
itkTypeMacro(
CurvatureFlowFunction
,
56
FiniteDifferenceFunction
);
57
59
typedef
typename
Superclass::ImageType
ImageType
;
60
typedef
typename
Superclass::PixelType
PixelType
;
61
typedef
typename
Superclass::RadiusType
RadiusType
;
62
typedef
PixelType
ScalarValueType
;
63
typedef
typename
Superclass::PixelRealType
PixelRealType
;
64
typedef
typename
Superclass::NeighborhoodType
NeighborhoodType
;
65
typedef
typename
Superclass::NeighborhoodScalesType
NeighborhoodScalesType
;
66
typedef
typename
Superclass::FloatOffsetType
FloatOffsetType
;
67
typedef
typename
Superclass::TimeStepType
TimeStepType
;
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
{
127
m_MaxChange =
NumericTraits<ScalarValueType>::Zero
;
128
}
129
~GlobalDataStruct() {}
130
131
ScalarValueType m_MaxChange;
132
};
134
135
CurvatureFlowFunction();
136
~CurvatureFlowFunction
() {}
137
138
private
:
139
CurvatureFlowFunction
(
const
Self&);
//purposely not implemented
140
void
operator=(
const
Self&);
//purposely not implemented
141
142
TimeStepType
m_TimeStep
;
143
144
145
};
146
147
}
// end namespace itk
148
149
#ifndef ITK_MANUAL_INSTANTIATION
150
#include "
itkCurvatureFlowFunction.txx
"
151
#endif
152
153
#endif
Generated at Sat May 18 2013 23:35:23 for
Orfeo Toolbox
with
doxygen 1.8.3.1