ITK  6.0.0
Insight Toolkit
itkCommonEnums.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright NumFOCUS
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 * https://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// Place common enumerations to be used throughout the toolkit in this file
20#ifndef itkCommonEnums_h
21#define itkCommonEnums_h
22
23#include "itkIntTypes.h"
24#include <ostream>
25
26namespace itk
27{
28
39{
40public:
41 // Used in Input/Output for Images/Mesh/Transform types
48 enum class IOPixel : uint8_t
49 {
50 UNKNOWNPIXELTYPE,
51 SCALAR,
52 RGB,
53 RGBA,
54 OFFSET,
55 VECTOR,
56 POINT,
57 COVARIANTVECTOR,
58 SYMMETRICSECONDRANKTENSOR,
59 DIFFUSIONTENSOR3D,
60 COMPLEX,
61 FIXEDARRAY,
62 ARRAY,
63 MATRIX,
64 VARIABLELENGTHVECTOR,
65 VARIABLESIZEMATRIX
66 };
67
74 enum class IOComponent : uint8_t
75 {
76 UNKNOWNCOMPONENTTYPE,
77 UCHAR,
78 CHAR,
79 USHORT,
80 SHORT,
81 UINT,
82 INT,
83 ULONG,
84 LONG,
85 LONGLONG,
86 ULONGLONG,
87 FLOAT,
88 DOUBLE,
89 LDOUBLE
90 };
91
97 enum class IOFile : uint8_t
98 {
99 ASCII = 0,
100 Binary = 1,
101 TypeNotApplicable = 2,
102 // for backward compatibility
103 BINARY = 1, // Spelling difference between IOMeshBase and IOImageBase
104 TYPENOTAPPLICABLE = 2 // Spelling difference between IOMeshBase and IOImageBase
105 };
106
111 enum class IOFileMode : uint8_t
112 {
113 ReadMode,
114 WriteMode
115 };
116
122 enum class IOByteOrder : uint8_t
123 {
124 BigEndian,
125 LittleEndian,
126 OrderNotApplicable
127 };
128
132 enum class CellGeometry : uint8_t
133 {
134 VERTEX_CELL = 0,
135 LINE_CELL = 1,
136 TRIANGLE_CELL = 2,
137 QUADRILATERAL_CELL = 3,
138 POLYGON_CELL = 4,
139 TETRAHEDRON_CELL = 5,
140 HEXAHEDRON_CELL = 6,
141 QUADRATIC_EDGE_CELL = 7,
142 QUADRATIC_TRIANGLE_CELL = 8,
143 LAST_ITK_CELL = 9,
144 POLYLINE_CELL = 10,
145 MAX_ITK_CELLS = 255
146 };
147
148}; // CommonEnums
149
150// Convenience
157
158#if !defined(ITK_LEGACY_REMOVE)
160using IOPixelType = CommonEnums::IOPixel;
161using IOComponentType = CommonEnums::IOComponent;
162using IOFileType = CommonEnums::IOFile;
163using IOFileModeType = CommonEnums::IOFileMode;
164using IOByteOrderType = CommonEnums::IOByteOrder;
165using CellGeometryType = CommonEnums::CellGeometry;
166#endif
167// Define how to print enumeration
168extern ITKCommon_EXPORT std::ostream &
169 operator<<(std::ostream & out, IOPixelEnum value);
170extern ITKCommon_EXPORT std::ostream &
171 operator<<(std::ostream & out, IOComponentEnum value);
172extern ITKCommon_EXPORT std::ostream &
173 operator<<(std::ostream & out, IOFileEnum value);
174extern ITKCommon_EXPORT std::ostream &
175 operator<<(std::ostream & out, IOFileModeEnum value);
176extern ITKCommon_EXPORT std::ostream &
177 operator<<(std::ostream & out, IOByteOrderEnum value);
178extern ITKCommon_EXPORT std::ostream &
179 operator<<(std::ostream & out, CellGeometryEnum value);
186{
187public:
193 {
194 CellsAllocationMethodUndefined,
195 CellsAllocatedAsStaticArray,
196 CellsAllocatedAsADynamicArray,
197 CellsAllocatedDynamicallyCellByCell
198 };
199};
200extern ITKCommon_EXPORT std::ostream &
201 operator<<(std::ostream & out, MeshEnums::MeshClassCellsAllocationMethod value);
202
208{
209public:
210
215 enum class Octree : uint8_t
216 {
217 UNKNOWN_PLANE,
218 SAGITAL_PLANE,
219 CORONAL_PLANE,
220 TRANSVERSE_PLANE
221 };
222
226 enum class LeafIdentifier : uint8_t
227 {
228 ZERO = 0,
229 ONE = 1,
230 TWO = 2,
231 THREE = 3,
232 FOUR = 4,
233 FIVE = 5,
234 SIX = 6,
235 SEVEN = 7
236 };
237};
238
239// Define how to print enumeration
240extern ITKCommon_EXPORT std::ostream &
241 operator<<(std::ostream & out, const OctreeEnums::Octree value);
242extern ITKCommon_EXPORT std::ostream &
243 operator<<(std::ostream & out, const OctreeEnums::LeafIdentifier value);
248{
249public:
253 enum class RegionEnum : uint8_t
254 {
255 ITK_UNSTRUCTURED_REGION,
256 ITK_STRUCTURED_REGION
257 };
258};
259
260extern ITKCommon_EXPORT std::ostream &
261 operator<<(std::ostream & out, const ObjectEnums::RegionEnum value);
262
267{
268public:
273 enum class InsertionPosition : uint8_t
274 {
275 INSERT_AT_FRONT,
276 INSERT_AT_BACK,
277 INSERT_AT_POSITION
278 };
279};
280extern ITKCommon_EXPORT std::ostream &
281 operator<<(std::ostream & out, const ObjectFactoryEnums::InsertionPosition value);
282
283} // namespace itk
284
285#endif // itkCommonEnums_h
Common enums used across the toolkit.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
ITKCommon_EXPORT std::ostream & operator<<(std::ostream &out, typename AnatomicalOrientation::CoordinateEnum value)