ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
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#include <type_traits>
26
27namespace itk
28{
29
40{
41public:
42 // Used in Input/Output for Images/Mesh/Transform types
68
75 ITK_CLANG_PRAGMA_PUSH
76 ITK_CLANG_SUPPRESS_Wduplicate_enum
77 enum class IOComponent : uint8_t
78 {
97 UINT32 = std::is_same_v<uint32_t, unsigned long> ? ULONG : UINT,
98 INT32 = std::is_same_v<int32_t, long> ? LONG : INT,
99 UINT64 = std::is_same_v<uint64_t, unsigned long> ? ULONG : ULONGLONG,
100 INT64 = std::is_same_v<int64_t, long> ? LONG : LONGLONG,
103 };
104 ITK_CLANG_PRAGMA_POP
105
111 enum class IOFile : uint8_t
112 {
113 ASCII = 0,
116 // for backward compatibility
117 BINARY = 1, // Spelling difference between IOMeshBase and IOImageBase
118 TYPENOTAPPLICABLE = 2 // Spelling difference between IOMeshBase and IOImageBase
119 };
120
125 enum class IOFileMode : uint8_t
126 {
129 };
130
142
161
162}; // CommonEnums
163
164// Convenience
171
172#if !defined(ITK_LEGACY_REMOVE)
174using IOPixelType = CommonEnums::IOPixel;
175using IOComponentType = CommonEnums::IOComponent;
176using IOFileType = CommonEnums::IOFile;
177using IOFileModeType = CommonEnums::IOFileMode;
178using IOByteOrderType = CommonEnums::IOByteOrder;
179using CellGeometryType = CommonEnums::CellGeometry;
180#endif
181
182// Define how to print enumeration
183extern ITKCommon_EXPORT std::ostream &
184 operator<<(std::ostream & out, IOPixelEnum value);
185extern ITKCommon_EXPORT std::ostream &
186 operator<<(std::ostream & out, IOComponentEnum value);
187extern ITKCommon_EXPORT std::ostream &
188 operator<<(std::ostream & out, IOFileEnum value);
189extern ITKCommon_EXPORT std::ostream &
190 operator<<(std::ostream & out, IOFileModeEnum value);
191extern ITKCommon_EXPORT std::ostream &
192 operator<<(std::ostream & out, IOByteOrderEnum value);
193extern ITKCommon_EXPORT std::ostream &
194 operator<<(std::ostream & out, CellGeometryEnum value);
195
214extern ITKCommon_EXPORT std::ostream &
215 operator<<(std::ostream & out, MeshEnums::MeshClassCellsAllocationMethod value);
221{
222public:
227 enum class Octree : uint8_t
228 {
231#if !defined(ITK_LEGACY_REMOVE)
232 SAGITAL_PLANE [[deprecated("Use SAGITTAL_PLANE instead")]] = SAGITTAL_PLANE,
233#endif
236 };
237
240 enum class LeafIdentifier : uint8_t
241 {
242 ZERO = 0,
243 ONE = 1,
244 TWO = 2,
245 THREE = 3,
246 FOUR = 4,
247 FIVE = 5,
248 SIX = 6,
250 };
251};
252
253// Define how to print enumeration
254extern ITKCommon_EXPORT std::ostream &
255 operator<<(std::ostream & out, const OctreeEnums::Octree value);
256extern ITKCommon_EXPORT std::ostream &
257 operator<<(std::ostream & out, const OctreeEnums::LeafIdentifier value);
262{
263public:
272};
273
274extern ITKCommon_EXPORT std::ostream &
275 operator<<(std::ostream & out, const ObjectEnums::RegionEnum value);
276
281{
282public:
293};
294extern ITKCommon_EXPORT std::ostream &
295 operator<<(std::ostream & out, const ObjectFactoryEnums::InsertionPosition value);
296
297} // namespace itk
298
299#endif // itkCommonEnums_h
Common enums used across the toolkit.
@ SAGITTAL_PLANE
The plane is Sagittal.
@ UNKNOWN_PLANE
The plane is Unknown.
@ CORONAL_PLANE
The plane is Coronal.
@ TRANSVERSE_PLANE
The plane is Transverse.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
CommonEnums::IOComponent IOComponentEnum
ITKCommon_EXPORT std::ostream & operator<<(std::ostream &out, typename AnatomicalOrientation::CoordinateEnum value)
CommonEnums::IOFile IOFileEnum
CommonEnums::IOByteOrder IOByteOrderEnum
CommonEnums::CellGeometry CellGeometryEnum
CommonEnums::IOPixel IOPixelEnum
CommonEnums::IOFileMode IOFileModeEnum