ITK
4.4.0
Insight Segmentation and Registration Toolkit
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
ITK
Modules
Segmentation
LevelSetsv4
include
itkLevelSetSparseImage.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 __itkLevelSetSparseImage_h
20
#define __itkLevelSetSparseImage_h
21
22
#include "
itkDiscreteLevelSetImage.h
"
23
#include "
itkObjectFactory.h
"
24
25
#include "
itkLabelObject.h
"
26
#include "
itkLabelMap.h
"
27
28
namespace
itk
29
{
39
template
<
typename
TOutput,
unsigned
int
VDimension >
40
class
LevelSetSparseImage
:
41
public
DiscreteLevelSetImage
< TOutput, VDimension >
42
{
43
public
:
44
typedef
LevelSetSparseImage
Self
;
45
typedef
SmartPointer< Self >
Pointer
;
46
typedef
SmartPointer< const Self >
ConstPointer
;
47
typedef
DiscreteLevelSetImage< TOutput, VDimension >
Superclass
;
48
50
itkTypeMacro (
LevelSetSparseImage
,
DiscreteLevelSetImage
);
51
52
itkStaticConstMacro (
Dimension
,
unsigned
int
,
Superclass::Dimension
);
53
54
typedef
typename
Superclass::InputType
InputType
;
55
typedef
typename
Superclass::OutputType
OutputType
;
56
typedef
typename
Superclass::OutputRealType
OutputRealType
;
57
typedef
typename
Superclass::GradientType
GradientType
;
58
typedef
typename
Superclass::HessianType
HessianType
;
59
typedef
typename
Superclass::LevelSetDataType
LevelSetDataType
;
60
61
typedef
int8_t
LayerIdType
;
62
typedef
std::list< LayerIdType >
LayerIdListType
;
63
64
typedef
LabelObject< LayerIdType, VDimension >
LabelObjectType
;
65
typedef
typename
LabelObjectType::Pointer
LabelObjectPointer
;
66
typedef
typename
LabelObjectType::LengthType
LabelObjectLengthType
;
67
typedef
typename
LabelObjectType::LineType
LabelObjectLineType
;
68
69
typedef
LabelMap< LabelObjectType >
LabelMapType
;
70
typedef
typename
LabelMapType::Pointer
LabelMapPointer
;
71
typedef
typename
LabelMapType::RegionType
RegionType
;
72
73
typedef
std::map<
InputType
,
OutputType
,
74
Functor::IndexLexicographicCompare< VDimension >
>
75
LayerType
;
76
typedef
typename
LayerType::iterator
LayerIterator
;
77
typedef
typename
LayerType::const_iterator
LayerConstIterator
;
78
79
typedef
std::map< LayerIdType, LayerType >
LayerMapType
;
80
typedef
typename
LayerMapType::iterator
LayerMapIterator
;
81
typedef
typename
LayerMapType::const_iterator
LayerMapConstIterator
;
82
84
virtual
LayerIdType
Status
(
const
InputType
& iP )
const
;
85
87
const
LayerType
&
GetLayer
(
LayerIdType
iVal )
const
;
88
90
LayerType
&
GetLayer
(
LayerIdType
iVal );
91
93
void
SetLayer
(
LayerIdType
iVal,
const
LayerType
& iLayer );
94
96
virtual
void
SetLabelMap
(
LabelMapType
* iLabelMap );
97
itkGetModifiableObjectMacro(
LabelMap
,
LabelMapType
);
99
101
virtual
void
Graft
(
const
DataObject
* data );
102
104
template
<
class
TLabel >
105
typename
LabelObject< TLabel, VDimension >::Pointer
GetAsLabelObject
();
106
107
protected
:
108
LevelSetSparseImage
();
109
110
virtual
~LevelSetSparseImage
();
111
112
LayerMapType
m_Layers
;
113
LabelMapPointer
m_LabelMap
;
114
LayerIdListType
m_InternalLabelList
;
115
117
virtual
void
InitializeLayers
() = 0;
118
119
virtual
void
InitializeInternalLabelList
() = 0;
120
121
virtual
bool
IsInsideDomain
(
const
InputType
& iP )
const
;
122
124
virtual
void
Initialize
();
125
127
virtual
void
CopyInformation
(
const
DataObject
* data );
128
129
private
:
130
131
LevelSetSparseImage
(
const
Self
& );
// purposely not implemented
132
void
operator =
(
const
Self
& );
// purposely not implemented
133
};
134
}
135
136
#ifndef ITK_MANUAL_INSTANTIATION
137
#include "itkLevelSetSparseImage.hxx"
138
#endif
139
140
#endif // __itkLevelSetSparseImage_h
141
Generated on Mon May 13 2013 00:59:56 for ITK by
1.8.3.1