ITK
4.3.0
Insight Segmentation and Registration Toolkit
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
ITK
Modules
Segmentation
LevelSetsv4
include
itkLevelSetEquationAdvectionTerm.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
19
#ifndef __itkLevelSetEquationAdvectionTerm_h
20
#define __itkLevelSetEquationAdvectionTerm_h
21
22
#include "
itkLevelSetEquationTermBase.h
"
23
#include "
itkZeroFluxNeumannBoundaryCondition.h
"
24
#include "
itkConstNeighborhoodIterator.h
"
25
#include "
itkVector.h
"
26
#include "vnl/vnl_matrix_fixed.h"
27
28
namespace
itk
29
{
50
template
<
class
TInput,
// Input image or mesh
51
class
TLevelSetContainer >
52
class
LevelSetEquationAdvectionTerm
:
53
public
LevelSetEquationTermBase
< TInput, TLevelSetContainer >
54
{
55
public
:
56
typedef
LevelSetEquationAdvectionTerm
Self
;
57
typedef
SmartPointer< Self >
Pointer
;
58
typedef
SmartPointer< const Self >
ConstPointer
;
59
typedef
LevelSetEquationTermBase< TInput, TLevelSetContainer >
Superclass
;
61
63
itkNewMacro(
Self
);
64
66
itkTypeMacro(
LevelSetEquationAdvectionTerm
,
67
LevelSetEquationTermBase
);
68
69
typedef
typename
Superclass::InputImageType
InputImageType
;
70
typedef
typename
Superclass::InputImagePointer
InputImagePointer
;
71
typedef
typename
Superclass::InputPixelType
InputPixelType
;
72
typedef
typename
Superclass::InputPixelRealType
InputPixelRealType
;
73
74
typedef
typename
Superclass::LevelSetContainerType
LevelSetContainerType
;
75
typedef
typename
Superclass::LevelSetContainerPointer
LevelSetContainerPointer
;
76
typedef
typename
Superclass::LevelSetType
LevelSetType
;
77
typedef
typename
Superclass::LevelSetPointer
LevelSetPointer
;
78
typedef
typename
Superclass::LevelSetOutputPixelType
LevelSetOutputPixelType
;
79
typedef
typename
Superclass::LevelSetOutputRealType
LevelSetOutputRealType
;
80
typedef
typename
Superclass::LevelSetInputIndexType
LevelSetInputIndexType
;
81
typedef
typename
Superclass::LevelSetGradientType
LevelSetGradientType
;
82
typedef
typename
Superclass::LevelSetHessianType
LevelSetHessianType
;
83
typedef
typename
Superclass::LevelSetIdentifierType
LevelSetIdentifierType
;
84
typedef
typename
Superclass::LevelSetDataType
LevelSetDataType
;
85
86
typedef
typename
Superclass::HeavisideType
HeavisideType
;
87
typedef
typename
Superclass::HeavisideConstPointer
HeavisideConstPointer
;
88
89
itkStaticConstMacro(
ImageDimension
,
unsigned
int
, InputImageType::ImageDimension);
90
91
typedef
LevelSetGradientType
VectorType
;
92
93
typedef
Image< VectorType, itkGetStaticConstMacro(ImageDimension) >
AdvectionImageType
;
94
typedef
typename
AdvectionImageType::Pointer
AdvectionImagePointer
;
95
96
97
void
SetAdvectionImage
(
AdvectionImageType
* iImage );
98
itkGetObjectMacro( AdvectionImage,
AdvectionImageType
);
99
100
itkSetMacro( DerivativeSigma,
LevelSetOutputRealType
);
101
itkGetMacro( DerivativeSigma,
LevelSetOutputRealType
);
102
104
typedef
ZeroFluxNeumannBoundaryCondition< InputImageType >
DefaultBoundaryConditionType
;
105
typedef
typename
ConstNeighborhoodIterator< InputImageType >::RadiusType
RadiusType
;
106
typedef
ConstNeighborhoodIterator< InputImageType, DefaultBoundaryConditionType >
NeighborhoodType
;
107
108
typedef
Vector< LevelSetOutputRealType, itkGetStaticConstMacro(ImageDimension) >
NeighborhoodScalesType
;
109
111
virtual
void
Update
();
112
114
virtual
void
InitializeParameters
();
115
117
virtual
void
Initialize
(
const
LevelSetInputIndexType
& );
118
120
virtual
void
UpdatePixel
(
const
LevelSetInputIndexType
& iP,
121
const
LevelSetOutputRealType
& oldValue,
122
const
LevelSetOutputRealType
& newValue );
123
124
protected
:
125
LevelSetEquationAdvectionTerm
();
126
127
virtual
~LevelSetEquationAdvectionTerm
();
128
129
AdvectionImagePointer
m_AdvectionImage
;
130
133
VectorType
AdvectionSpeed
(
const
LevelSetInputIndexType
& iP )
const
;
134
137
virtual
LevelSetOutputRealType
Value
(
const
LevelSetInputIndexType
& iP );
138
virtual
LevelSetOutputRealType
Value
(
const
LevelSetInputIndexType
& iP,
139
const
LevelSetDataType
& iData );
141
142
LevelSetOutputRealType
m_NeighborhoodScales
[
ImageDimension
];
143
144
private
:
145
LevelSetEquationAdvectionTerm
(
const
Self
& );
// purposely not implemented
146
void
operator =
(
const
Self
& );
// purposely not implemented
147
148
LevelSetOutputRealType
m_DerivativeSigma
;
149
150
bool
m_AutoGenerateAdvectionImage
;
151
152
void
GenerateAdvectionImage
();
153
};
154
155
}
156
157
#ifndef ITK_MANUAL_INSTANTIATION
158
#include "itkLevelSetEquationAdvectionTerm.hxx"
159
#endif
160
161
#endif
162
Generated on Sun Dec 9 2012 01:16:58 for ITK by
1.8.2