ITK
4.3.0
Insight Segmentation and Registration Toolkit
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
ITK
Modules
Core
Common
include
itkSpatialOrientation.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
*
20
* Portions of this file are subject to the VTK Toolkit Version 3 copyright.
21
*
22
* Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
23
*
24
* For complete copyright, license and disclaimer of warranty information
25
* please refer to the NOTICE file at the top of the ITK source tree.
26
*
27
*=========================================================================*/
28
#ifndef __itkSpatialOrientation_h
29
#define __itkSpatialOrientation_h
30
31
namespace
itk
32
{
33
namespace
SpatialOrientation
34
{
35
// Coordinate orientation codes have a place-value organization such that
36
// an ImageDimension-al sequence of subcodes says both which varies fastest
37
// through which varies slowest, but also which end of the frame of
38
// reference
39
// is considered zero for each of the coordinates. For example, 'RIP'
40
// means
41
// Right to Left varies fastest, then Inferior to Superior, and Posterior
42
// to
43
// Anterior varies the slowest.
44
typedef
enum
{
45
ITK_COORDINATE_UNKNOWN
= 0,
46
ITK_COORDINATE_Right
= 2,
47
ITK_COORDINATE_Left
= 3,
48
ITK_COORDINATE_Posterior
= 4,
//back
49
ITK_COORDINATE_Anterior
= 5,
//front
50
ITK_COORDINATE_Inferior
= 8,
//below
51
ITK_COORDINATE_Superior
= 9
//above
52
// ITK_COORDINATE_Historical=16,
53
// ITK_COORDINATE_Future=17
54
}
CoordinateTerms
;
55
56
typedef
enum
{
57
// These code place values have to be far enough apart to
58
// separate the CoordinateTerms above.
59
// However, if we added History/Future direction in time,
60
// we would need at least 5 bits per.
61
ITK_COORDINATE_PrimaryMinor
= 0,
62
ITK_COORDINATE_SecondaryMinor
= 8,
63
ITK_COORDINATE_TertiaryMinor
= 16
64
// Majorness is in terms of rank-minor because
65
// a
66
// fourth dimension, time, would be even More
67
// major than the
68
// PrimaryMajor==TertiaryMinor.
69
// ITK_COORDINATE_QuaternaryMinor=24
70
}
CoordinateMajornessTerms
;
71
// Adding time IN GENERAL would make these 8 x 6 = 48 triples into 16
72
// x 24 = 384 4-tuples.
73
// A general fourth dimension would need a unique pair of letters to
74
// add to the code;
75
// Maybe use H and F, from History to Future? Maybe use 48 x 2 with
76
// time ALWAYS highest
77
// order, or 48 x 2 x 2, with 3-space always highest or lowest order?
78
// Multispectra might be
79
// co-registered and pieced together.... PD-T2 interleaving of
80
// slices is handled with choosing
81
// which spectrum to load via the prototypical file name.
82
typedef
enum
{
83
ITK_COORDINATE_ORIENTATION_INVALID
=
ITK_COORDINATE_UNKNOWN
,
84
ITK_COORDINATE_ORIENTATION_RIP
= (
ITK_COORDINATE_Right
85
<<
ITK_COORDINATE_PrimaryMinor
)
86
+ (
ITK_COORDINATE_Inferior
<<
ITK_COORDINATE_SecondaryMinor
)
87
+ (
ITK_COORDINATE_Posterior
<<
ITK_COORDINATE_TertiaryMinor
),
88
ITK_COORDINATE_ORIENTATION_LIP
= (
ITK_COORDINATE_Left
89
<<
ITK_COORDINATE_PrimaryMinor
)
90
+ (
ITK_COORDINATE_Inferior
<<
ITK_COORDINATE_SecondaryMinor
)
91
+ (
ITK_COORDINATE_Posterior
<<
ITK_COORDINATE_TertiaryMinor
),
92
ITK_COORDINATE_ORIENTATION_RSP
= (
ITK_COORDINATE_Right
93
<<
ITK_COORDINATE_PrimaryMinor
)
94
+ (
ITK_COORDINATE_Superior
<<
ITK_COORDINATE_SecondaryMinor
)
95
+ (
ITK_COORDINATE_Posterior
<<
ITK_COORDINATE_TertiaryMinor
),
96
ITK_COORDINATE_ORIENTATION_LSP
= (
ITK_COORDINATE_Left
97
<<
ITK_COORDINATE_PrimaryMinor
)
98
+ (
ITK_COORDINATE_Superior
<<
ITK_COORDINATE_SecondaryMinor
)
99
+ (
ITK_COORDINATE_Posterior
<<
ITK_COORDINATE_TertiaryMinor
),
100
ITK_COORDINATE_ORIENTATION_RIA
= (
ITK_COORDINATE_Right
101
<<
ITK_COORDINATE_PrimaryMinor
)
102
+ (
ITK_COORDINATE_Inferior
<<
ITK_COORDINATE_SecondaryMinor
)
103
+ (
ITK_COORDINATE_Anterior
<<
ITK_COORDINATE_TertiaryMinor
),
104
ITK_COORDINATE_ORIENTATION_LIA
= (
ITK_COORDINATE_Left
105
<<
ITK_COORDINATE_PrimaryMinor
)
106
+ (
ITK_COORDINATE_Inferior
<<
ITK_COORDINATE_SecondaryMinor
)
107
+ (
ITK_COORDINATE_Anterior
<<
ITK_COORDINATE_TertiaryMinor
),
108
ITK_COORDINATE_ORIENTATION_RSA
= (
ITK_COORDINATE_Right
109
<<
ITK_COORDINATE_PrimaryMinor
)
110
+ (
ITK_COORDINATE_Superior
<<
ITK_COORDINATE_SecondaryMinor
)
111
+ (
ITK_COORDINATE_Anterior
<<
ITK_COORDINATE_TertiaryMinor
),
112
ITK_COORDINATE_ORIENTATION_LSA
= (
ITK_COORDINATE_Left
113
<<
ITK_COORDINATE_PrimaryMinor
)
114
+ (
ITK_COORDINATE_Superior
<<
ITK_COORDINATE_SecondaryMinor
)
115
+ (
ITK_COORDINATE_Anterior
<<
ITK_COORDINATE_TertiaryMinor
),
116
117
ITK_COORDINATE_ORIENTATION_IRP
= (
ITK_COORDINATE_Inferior
118
<<
ITK_COORDINATE_PrimaryMinor
)
119
+ (
ITK_COORDINATE_Right
<<
ITK_COORDINATE_SecondaryMinor
)
120
+ (
ITK_COORDINATE_Posterior
<<
ITK_COORDINATE_TertiaryMinor
),
121
ITK_COORDINATE_ORIENTATION_ILP
= (
ITK_COORDINATE_Inferior
122
<<
ITK_COORDINATE_PrimaryMinor
)
123
+ (
ITK_COORDINATE_Left
<<
ITK_COORDINATE_SecondaryMinor
)
124
+ (
ITK_COORDINATE_Posterior
<<
ITK_COORDINATE_TertiaryMinor
),
125
ITK_COORDINATE_ORIENTATION_SRP
= (
ITK_COORDINATE_Superior
126
<<
ITK_COORDINATE_PrimaryMinor
)
127
+ (
ITK_COORDINATE_Right
<<
ITK_COORDINATE_SecondaryMinor
)
128
+ (
ITK_COORDINATE_Posterior
<<
ITK_COORDINATE_TertiaryMinor
),
129
ITK_COORDINATE_ORIENTATION_SLP
= (
ITK_COORDINATE_Superior
130
<<
ITK_COORDINATE_PrimaryMinor
)
131
+ (
ITK_COORDINATE_Left
<<
ITK_COORDINATE_SecondaryMinor
)
132
+ (
ITK_COORDINATE_Posterior
<<
ITK_COORDINATE_TertiaryMinor
),
133
ITK_COORDINATE_ORIENTATION_IRA
= (
ITK_COORDINATE_Inferior
134
<<
ITK_COORDINATE_PrimaryMinor
)
135
+ (
ITK_COORDINATE_Right
<<
ITK_COORDINATE_SecondaryMinor
)
136
+ (
ITK_COORDINATE_Anterior
<<
ITK_COORDINATE_TertiaryMinor
),
137
ITK_COORDINATE_ORIENTATION_ILA
= (
ITK_COORDINATE_Inferior
138
<<
ITK_COORDINATE_PrimaryMinor
)
139
+ (
ITK_COORDINATE_Left
<<
ITK_COORDINATE_SecondaryMinor
)
140
+ (
ITK_COORDINATE_Anterior
<<
ITK_COORDINATE_TertiaryMinor
),
141
ITK_COORDINATE_ORIENTATION_SRA
= (
ITK_COORDINATE_Superior
142
<<
ITK_COORDINATE_PrimaryMinor
)
143
+ (
ITK_COORDINATE_Right
<<
ITK_COORDINATE_SecondaryMinor
)
144
+ (
ITK_COORDINATE_Anterior
<<
ITK_COORDINATE_TertiaryMinor
),
145
ITK_COORDINATE_ORIENTATION_SLA
= (
ITK_COORDINATE_Superior
146
<<
ITK_COORDINATE_PrimaryMinor
)
147
+ (
ITK_COORDINATE_Left
<<
ITK_COORDINATE_SecondaryMinor
)
148
+ (
ITK_COORDINATE_Anterior
<<
ITK_COORDINATE_TertiaryMinor
),
149
150
ITK_COORDINATE_ORIENTATION_RPI
= (
ITK_COORDINATE_Right
151
<<
ITK_COORDINATE_PrimaryMinor
)
152
+ (
ITK_COORDINATE_Posterior
<<
ITK_COORDINATE_SecondaryMinor
)
153
+ (
ITK_COORDINATE_Inferior
<<
ITK_COORDINATE_TertiaryMinor
),
154
ITK_COORDINATE_ORIENTATION_LPI
= (
ITK_COORDINATE_Left
155
<<
ITK_COORDINATE_PrimaryMinor
)
156
+ (
ITK_COORDINATE_Posterior
<<
ITK_COORDINATE_SecondaryMinor
)
157
+ (
ITK_COORDINATE_Inferior
<<
ITK_COORDINATE_TertiaryMinor
),
158
ITK_COORDINATE_ORIENTATION_RAI
= (
ITK_COORDINATE_Right
159
<<
ITK_COORDINATE_PrimaryMinor
)
160
+ (
ITK_COORDINATE_Anterior
<<
ITK_COORDINATE_SecondaryMinor
)
161
+ (
ITK_COORDINATE_Inferior
<<
ITK_COORDINATE_TertiaryMinor
),
162
ITK_COORDINATE_ORIENTATION_LAI
= (
ITK_COORDINATE_Left
163
<<
ITK_COORDINATE_PrimaryMinor
)
164
+ (
ITK_COORDINATE_Anterior
<<
ITK_COORDINATE_SecondaryMinor
)
165
+ (
ITK_COORDINATE_Inferior
<<
ITK_COORDINATE_TertiaryMinor
),
166
ITK_COORDINATE_ORIENTATION_RPS
= (
ITK_COORDINATE_Right
167
<<
ITK_COORDINATE_PrimaryMinor
)
168
+ (
ITK_COORDINATE_Posterior
<<
ITK_COORDINATE_SecondaryMinor
)
169
+ (
ITK_COORDINATE_Superior
<<
ITK_COORDINATE_TertiaryMinor
),
170
ITK_COORDINATE_ORIENTATION_LPS
= (
ITK_COORDINATE_Left
171
<<
ITK_COORDINATE_PrimaryMinor
)
172
+ (
ITK_COORDINATE_Posterior
<<
ITK_COORDINATE_SecondaryMinor
)
173
+ (
ITK_COORDINATE_Superior
<<
ITK_COORDINATE_TertiaryMinor
),
174
ITK_COORDINATE_ORIENTATION_RAS
= (
ITK_COORDINATE_Right
175
<<
ITK_COORDINATE_PrimaryMinor
)
176
+ (
ITK_COORDINATE_Anterior
<<
ITK_COORDINATE_SecondaryMinor
)
177
+ (
ITK_COORDINATE_Superior
<<
ITK_COORDINATE_TertiaryMinor
),
178
ITK_COORDINATE_ORIENTATION_LAS
= (
ITK_COORDINATE_Left
179
<<
ITK_COORDINATE_PrimaryMinor
)
180
+ (
ITK_COORDINATE_Anterior
<<
ITK_COORDINATE_SecondaryMinor
)
181
+ (
ITK_COORDINATE_Superior
<<
ITK_COORDINATE_TertiaryMinor
),
182
183
ITK_COORDINATE_ORIENTATION_PRI
= (
ITK_COORDINATE_Posterior
184
<<
ITK_COORDINATE_PrimaryMinor
)
185
+ (
ITK_COORDINATE_Right
<<
ITK_COORDINATE_SecondaryMinor
)
186
+ (
ITK_COORDINATE_Inferior
<<
ITK_COORDINATE_TertiaryMinor
),
187
ITK_COORDINATE_ORIENTATION_PLI
= (
ITK_COORDINATE_Posterior
188
<<
ITK_COORDINATE_PrimaryMinor
)
189
+ (
ITK_COORDINATE_Left
<<
ITK_COORDINATE_SecondaryMinor
)
190
+ (
ITK_COORDINATE_Inferior
<<
ITK_COORDINATE_TertiaryMinor
),
191
ITK_COORDINATE_ORIENTATION_ARI
= (
ITK_COORDINATE_Anterior
192
<<
ITK_COORDINATE_PrimaryMinor
)
193
+ (
ITK_COORDINATE_Right
<<
ITK_COORDINATE_SecondaryMinor
)
194
+ (
ITK_COORDINATE_Inferior
<<
ITK_COORDINATE_TertiaryMinor
),
195
ITK_COORDINATE_ORIENTATION_ALI
= (
ITK_COORDINATE_Anterior
196
<<
ITK_COORDINATE_PrimaryMinor
)
197
+ (
ITK_COORDINATE_Left
<<
ITK_COORDINATE_SecondaryMinor
)
198
+ (
ITK_COORDINATE_Inferior
<<
ITK_COORDINATE_TertiaryMinor
),
199
ITK_COORDINATE_ORIENTATION_PRS
= (
ITK_COORDINATE_Posterior
200
<<
ITK_COORDINATE_PrimaryMinor
)
201
+ (
ITK_COORDINATE_Right
<<
ITK_COORDINATE_SecondaryMinor
)
202
+ (
ITK_COORDINATE_Superior
<<
ITK_COORDINATE_TertiaryMinor
),
203
ITK_COORDINATE_ORIENTATION_PLS
= (
ITK_COORDINATE_Posterior
204
<<
ITK_COORDINATE_PrimaryMinor
)
205
+ (
ITK_COORDINATE_Left
<<
ITK_COORDINATE_SecondaryMinor
)
206
+ (
ITK_COORDINATE_Superior
<<
ITK_COORDINATE_TertiaryMinor
),
207
ITK_COORDINATE_ORIENTATION_ARS
= (
ITK_COORDINATE_Anterior
208
<<
ITK_COORDINATE_PrimaryMinor
)
209
+ (
ITK_COORDINATE_Right
<<
ITK_COORDINATE_SecondaryMinor
)
210
+ (
ITK_COORDINATE_Superior
<<
ITK_COORDINATE_TertiaryMinor
),
211
ITK_COORDINATE_ORIENTATION_ALS
= (
ITK_COORDINATE_Anterior
212
<<
ITK_COORDINATE_PrimaryMinor
)
213
+ (
ITK_COORDINATE_Left
<<
ITK_COORDINATE_SecondaryMinor
)
214
+ (
ITK_COORDINATE_Superior
<<
ITK_COORDINATE_TertiaryMinor
),
215
216
ITK_COORDINATE_ORIENTATION_IPR
= (
ITK_COORDINATE_Inferior
217
<<
ITK_COORDINATE_PrimaryMinor
)
218
+ (
ITK_COORDINATE_Posterior
<<
ITK_COORDINATE_SecondaryMinor
)
219
+ (
ITK_COORDINATE_Right
<<
ITK_COORDINATE_TertiaryMinor
),
220
ITK_COORDINATE_ORIENTATION_SPR
= (
ITK_COORDINATE_Superior
221
<<
ITK_COORDINATE_PrimaryMinor
)
222
+ (
ITK_COORDINATE_Posterior
<<
ITK_COORDINATE_SecondaryMinor
)
223
+ (
ITK_COORDINATE_Right
<<
ITK_COORDINATE_TertiaryMinor
),
224
ITK_COORDINATE_ORIENTATION_IAR
= (
ITK_COORDINATE_Inferior
225
<<
ITK_COORDINATE_PrimaryMinor
)
226
+ (
ITK_COORDINATE_Anterior
<<
ITK_COORDINATE_SecondaryMinor
)
227
+ (
ITK_COORDINATE_Right
<<
ITK_COORDINATE_TertiaryMinor
),
228
ITK_COORDINATE_ORIENTATION_SAR
= (
ITK_COORDINATE_Superior
229
<<
ITK_COORDINATE_PrimaryMinor
)
230
+ (
ITK_COORDINATE_Anterior
<<
ITK_COORDINATE_SecondaryMinor
)
231
+ (
ITK_COORDINATE_Right
<<
ITK_COORDINATE_TertiaryMinor
),
232
ITK_COORDINATE_ORIENTATION_IPL
= (
ITK_COORDINATE_Inferior
233
<<
ITK_COORDINATE_PrimaryMinor
)
234
+ (
ITK_COORDINATE_Posterior
<<
ITK_COORDINATE_SecondaryMinor
)
235
+ (
ITK_COORDINATE_Left
<<
ITK_COORDINATE_TertiaryMinor
),
236
ITK_COORDINATE_ORIENTATION_SPL
= (
ITK_COORDINATE_Superior
237
<<
ITK_COORDINATE_PrimaryMinor
)
238
+ (
ITK_COORDINATE_Posterior
<<
ITK_COORDINATE_SecondaryMinor
)
239
+ (
ITK_COORDINATE_Left
<<
ITK_COORDINATE_TertiaryMinor
),
240
ITK_COORDINATE_ORIENTATION_IAL
= (
ITK_COORDINATE_Inferior
241
<<
ITK_COORDINATE_PrimaryMinor
)
242
+ (
ITK_COORDINATE_Anterior
<<
ITK_COORDINATE_SecondaryMinor
)
243
+ (
ITK_COORDINATE_Left
<<
ITK_COORDINATE_TertiaryMinor
),
244
ITK_COORDINATE_ORIENTATION_SAL
= (
ITK_COORDINATE_Superior
245
<<
ITK_COORDINATE_PrimaryMinor
)
246
+ (
ITK_COORDINATE_Anterior
<<
ITK_COORDINATE_SecondaryMinor
)
247
+ (
ITK_COORDINATE_Left
<<
ITK_COORDINATE_TertiaryMinor
),
248
249
ITK_COORDINATE_ORIENTATION_PIR
= (
ITK_COORDINATE_Posterior
250
<<
ITK_COORDINATE_PrimaryMinor
)
251
+ (
ITK_COORDINATE_Inferior
<<
ITK_COORDINATE_SecondaryMinor
)
252
+ (
ITK_COORDINATE_Right
<<
ITK_COORDINATE_TertiaryMinor
),
253
ITK_COORDINATE_ORIENTATION_PSR
= (
ITK_COORDINATE_Posterior
254
<<
ITK_COORDINATE_PrimaryMinor
)
255
+ (
ITK_COORDINATE_Superior
<<
ITK_COORDINATE_SecondaryMinor
)
256
+ (
ITK_COORDINATE_Right
<<
ITK_COORDINATE_TertiaryMinor
),
257
ITK_COORDINATE_ORIENTATION_AIR
= (
ITK_COORDINATE_Anterior
258
<<
ITK_COORDINATE_PrimaryMinor
)
259
+ (
ITK_COORDINATE_Inferior
<<
ITK_COORDINATE_SecondaryMinor
)
260
+ (
ITK_COORDINATE_Right
<<
ITK_COORDINATE_TertiaryMinor
),
261
ITK_COORDINATE_ORIENTATION_ASR
= (
ITK_COORDINATE_Anterior
262
<<
ITK_COORDINATE_PrimaryMinor
)
263
+ (
ITK_COORDINATE_Superior
<<
ITK_COORDINATE_SecondaryMinor
)
264
+ (
ITK_COORDINATE_Right
<<
ITK_COORDINATE_TertiaryMinor
),
265
ITK_COORDINATE_ORIENTATION_PIL
= (
ITK_COORDINATE_Posterior
266
<<
ITK_COORDINATE_PrimaryMinor
)
267
+ (
ITK_COORDINATE_Inferior
<<
ITK_COORDINATE_SecondaryMinor
)
268
+ (
ITK_COORDINATE_Left
<<
ITK_COORDINATE_TertiaryMinor
),
269
ITK_COORDINATE_ORIENTATION_PSL
= (
ITK_COORDINATE_Posterior
270
<<
ITK_COORDINATE_PrimaryMinor
)
271
+ (
ITK_COORDINATE_Superior
<<
ITK_COORDINATE_SecondaryMinor
)
272
+ (
ITK_COORDINATE_Left
<<
ITK_COORDINATE_TertiaryMinor
),
273
ITK_COORDINATE_ORIENTATION_AIL
= (
ITK_COORDINATE_Anterior
274
<<
ITK_COORDINATE_PrimaryMinor
)
275
+ (
ITK_COORDINATE_Inferior
<<
ITK_COORDINATE_SecondaryMinor
)
276
+ (
ITK_COORDINATE_Left
<<
ITK_COORDINATE_TertiaryMinor
),
277
ITK_COORDINATE_ORIENTATION_ASL
= (
ITK_COORDINATE_Anterior
278
<<
ITK_COORDINATE_PrimaryMinor
)
279
+ (
ITK_COORDINATE_Superior
<<
ITK_COORDINATE_SecondaryMinor
)
280
+ (
ITK_COORDINATE_Left
<<
ITK_COORDINATE_TertiaryMinor
)
281
}
ValidCoordinateOrientationFlags
;
282
// ^^^
283
// |||
284
// ||\Sequential indexes are separated by (planes=rows*columns) memory
285
// locations
286
// |\Sequential indexes are separated by rows memory locations (sweep out
287
// a plane)
288
// \Sequential indexes are adjacent memory locations (sweep out a row)
289
290
#ifndef __TEMPORARILY_INCLUDED_IN_COMPILATIONS__
291
typedef
enum
{
293
/* is Inferior Right Posterior */
294
296
/* is Inferior Right Anterior */
297
299
/* is Inferior Left Posterior */
300
302
/* is Inferior Left Anterior */
303
305
/* is Superior Right Posterior */
306
308
/* is Superior Right Anterior */
309
311
/* is Superior Left Posterior */
312
314
/* is Superior Left Anterior */
315
}
ValidOriginFlags
;
316
#endif
317
}
// end of namespace SpatialOrientation
318
}
// end namespace itk
319
320
#endif
321
Generated on Sun Dec 9 2012 01:27:40 for ITK by
1.8.2