ITK
5.0.0
Insight Segmentation and Registration Toolkit
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
ITK
Modules
Filtering
LabelMap
include
itkLabelMapUtilities.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
#ifndef itkLabelMapUtilities_h
19
#define itkLabelMapUtilities_h
20
21
/*
22
*
23
* This code was contributed in the Insight Journal paper:
24
* "Label object representation and manipulation with ITK"
25
* by Lehmann G.
26
* https://hdl.handle.net/1926/584
27
* http://www.insight-journal.org/browse/publication/176
28
*
29
*/
30
31
#define itkShapeLabelMapFilterDispatchMacro() \
32
case LabelObjectType::LABEL: \
33
{ \
34
using AccessorType = typename Functor::LabelLabelObjectAccessor< LabelObjectType >; \
35
AccessorType accessor; \
36
this->TemplatedGenerateData(accessor); \
37
break; \
38
} \
39
case LabelObjectType::NUMBER_OF_PIXELS: \
40
{ \
41
using AccessorType = typename Functor::NumberOfPixelsLabelObjectAccessor< LabelObjectType >; \
42
AccessorType accessor; \
43
this->TemplatedGenerateData(accessor); \
44
break; \
45
} \
46
case LabelObjectType::PHYSICAL_SIZE: \
47
{ \
48
using AccessorType = typename Functor::PhysicalSizeLabelObjectAccessor< LabelObjectType >; \
49
AccessorType accessor; \
50
this->TemplatedGenerateData(accessor); \
51
break; \
52
} \
53
case LabelObjectType::NUMBER_OF_PIXELS_ON_BORDER: \
54
{ \
55
using AccessorType = typename Functor::NumberOfPixelsOnBorderLabelObjectAccessor< LabelObjectType >; \
56
AccessorType accessor; \
57
this->TemplatedGenerateData(accessor); \
58
break; \
59
} \
60
case LabelObjectType::PERIMETER_ON_BORDER: \
61
{ \
62
using AccessorType = typename Functor::PerimeterOnBorderLabelObjectAccessor< LabelObjectType >; \
63
AccessorType accessor; \
64
this->TemplatedGenerateData(accessor); \
65
break; \
66
} \
67
case LabelObjectType::FERET_DIAMETER: \
68
{ \
69
using AccessorType = typename Functor::FeretDiameterLabelObjectAccessor< LabelObjectType >; \
70
AccessorType accessor; \
71
this->TemplatedGenerateData(accessor); \
72
break; \
73
} \
74
case LabelObjectType::ELONGATION: \
75
{ \
76
using AccessorType = typename Functor::ElongationLabelObjectAccessor< LabelObjectType >; \
77
AccessorType accessor; \
78
this->TemplatedGenerateData(accessor); \
79
break; \
80
} \
81
case LabelObjectType::PERIMETER: \
82
{ \
83
using AccessorType = typename Functor::PerimeterLabelObjectAccessor< LabelObjectType >; \
84
AccessorType accessor; \
85
this->TemplatedGenerateData(accessor); \
86
break; \
87
} \
88
case LabelObjectType::ROUNDNESS: \
89
{ \
90
using AccessorType = typename Functor::RoundnessLabelObjectAccessor< LabelObjectType >; \
91
AccessorType accessor; \
92
this->TemplatedGenerateData(accessor); \
93
break; \
94
} \
95
case LabelObjectType::EQUIVALENT_SPHERICAL_RADIUS: \
96
{ \
97
using AccessorType = typename Functor::EquivalentSphericalRadiusLabelObjectAccessor< LabelObjectType >; \
98
AccessorType accessor; \
99
this->TemplatedGenerateData(accessor); \
100
break; \
101
} \
102
case LabelObjectType::EQUIVALENT_SPHERICAL_PERIMETER: \
103
{ \
104
using AccessorType = typename Functor::EquivalentSphericalPerimeterLabelObjectAccessor< LabelObjectType >; \
105
AccessorType accessor; \
106
this->TemplatedGenerateData(accessor); \
107
break; \
108
} \
109
case LabelObjectType::FLATNESS: \
110
{ \
111
using AccessorType = typename Functor::FlatnessLabelObjectAccessor< LabelObjectType >; \
112
AccessorType accessor; \
113
this->TemplatedGenerateData(accessor); \
114
break; \
115
} \
116
case LabelObjectType::PERIMETER_ON_BORDER_RATIO: \
117
{ \
118
using AccessorType = typename Functor::PerimeterOnBorderRatioLabelObjectAccessor< LabelObjectType >; \
119
AccessorType accessor; \
120
this->TemplatedGenerateData(accessor); \
121
break; \
122
}
123
124
125
#define itkStatisticsLabelMapFilterDispatchMacro() \
126
case LabelObjectType::MINIMUM: \
127
{ \
128
using AccessorType = typename Functor::MinimumLabelObjectAccessor< LabelObjectType >; \
129
AccessorType accessor; \
130
this->TemplatedGenerateData(accessor); \
131
break; \
132
} \
133
case LabelObjectType::MAXIMUM: \
134
{ \
135
using AccessorType = typename Functor::MaximumLabelObjectAccessor< LabelObjectType >; \
136
AccessorType accessor; \
137
this->TemplatedGenerateData(accessor); \
138
break; \
139
} \
140
case LabelObjectType::MEAN: \
141
{ \
142
using AccessorType = typename Functor::MeanLabelObjectAccessor< LabelObjectType >; \
143
AccessorType accessor; \
144
this->TemplatedGenerateData(accessor); \
145
break; \
146
} \
147
case LabelObjectType::SUM: \
148
{ \
149
using AccessorType = typename Functor::SumLabelObjectAccessor< LabelObjectType >; \
150
AccessorType accessor; \
151
this->TemplatedGenerateData(accessor); \
152
break; \
153
} \
154
case LabelObjectType::STANDARD_DEVIATION: \
155
{ \
156
using AccessorType = typename Functor::StandardDeviationLabelObjectAccessor< LabelObjectType >; \
157
AccessorType accessor; \
158
this->TemplatedGenerateData(accessor); \
159
break; \
160
} \
161
case LabelObjectType::VARIANCE: \
162
{ \
163
using AccessorType = typename Functor::VarianceLabelObjectAccessor< LabelObjectType >; \
164
AccessorType accessor; \
165
this->TemplatedGenerateData(accessor); \
166
break; \
167
} \
168
case LabelObjectType::MEDIAN: \
169
{ \
170
using AccessorType = typename Functor::MedianLabelObjectAccessor< LabelObjectType >; \
171
AccessorType accessor; \
172
this->TemplatedGenerateData(accessor); \
173
break; \
174
} \
175
case LabelObjectType::KURTOSIS: \
176
{ \
177
using AccessorType = typename Functor::KurtosisLabelObjectAccessor< LabelObjectType >; \
178
AccessorType accessor; \
179
this->TemplatedGenerateData(accessor); \
180
break; \
181
} \
182
case LabelObjectType::SKEWNESS: \
183
{ \
184
using AccessorType = typename Functor::SkewnessLabelObjectAccessor< LabelObjectType >; \
185
AccessorType accessor; \
186
this->TemplatedGenerateData(accessor); \
187
break; \
188
} \
189
case LabelObjectType::WEIGHTED_ELONGATION: \
190
{ \
191
using AccessorType = typename Functor::WeightedElongationLabelObjectAccessor< LabelObjectType >; \
192
AccessorType accessor; \
193
this->TemplatedGenerateData(accessor); \
194
break; \
195
} \
196
case LabelObjectType::WEIGHTED_FLATNESS: \
197
{ \
198
using AccessorType = typename Functor::WeightedFlatnessLabelObjectAccessor< LabelObjectType >; \
199
AccessorType accessor; \
200
this->TemplatedGenerateData(accessor); \
201
break; \
202
}
203
204
#endif
Generated on Sun Mar 24 2019 02:59:28 for ITK by
1.8.5