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
77 ITK_CLANG_PRAGMA_PUSH
78 ITK_CLANG_SUPPRESS_Wduplicate_enum
79 enum class IOComponent : uint8_t
80 {
100 UINT32 = std::is_same_v<uint32_t, unsigned long> ? ULONG : UINT,
101 INT32 = std::is_same_v<int32_t, long> ? LONG : INT,
102 UINT64 = std::is_same_v<uint64_t, unsigned long> ? ULONG : ULONGLONG,
103 INT64 = std::is_same_v<int64_t, long> ? LONG : LONGLONG,
106 };
107 ITK_CLANG_PRAGMA_POP
108
114 enum class IOFile : uint8_t
115 {
116 ASCII = 0,
119 // for backward compatibility
120 BINARY = 1, // Spelling difference between IOMeshBase and IOImageBase
121 TYPENOTAPPLICABLE = 2 // Spelling difference between IOMeshBase and IOImageBase
122 };
123
128 enum class IOFileMode : uint8_t
129 {
132 };
133
145
164
165}; // CommonEnums
166
167// Convenience
174
175#if !defined(ITK_LEGACY_REMOVE)
177using IOPixelType = CommonEnums::IOPixel;
178using IOComponentType = CommonEnums::IOComponent;
179using IOFileType = CommonEnums::IOFile;
180using IOFileModeType = CommonEnums::IOFileMode;
181using IOByteOrderType = CommonEnums::IOByteOrder;
182using CellGeometryType = CommonEnums::CellGeometry;
183#endif
184
185// Define how to print enumeration
186extern ITKCommon_EXPORT std::ostream &
187 operator<<(std::ostream & out, IOPixelEnum value);
188extern ITKCommon_EXPORT std::ostream &
189 operator<<(std::ostream & out, IOComponentEnum value);
190extern ITKCommon_EXPORT std::ostream &
191 operator<<(std::ostream & out, IOFileEnum value);
192extern ITKCommon_EXPORT std::ostream &
193 operator<<(std::ostream & out, IOFileModeEnum value);
194extern ITKCommon_EXPORT std::ostream &
195 operator<<(std::ostream & out, IOByteOrderEnum value);
196extern ITKCommon_EXPORT std::ostream &
197 operator<<(std::ostream & out, CellGeometryEnum value);
198
217extern ITKCommon_EXPORT std::ostream &
218 operator<<(std::ostream & out, MeshEnums::MeshClassCellsAllocationMethod value);
224{
225public:
230 enum class Octree : uint8_t
231 {
234#if !defined(ITK_LEGACY_REMOVE)
235 SAGITAL_PLANE [[deprecated("Use SAGITTAL_PLANE instead")]] = SAGITTAL_PLANE,
236#endif
239 };
240
243 enum class LeafIdentifier : uint8_t
244 {
245 ZERO = 0,
246 ONE = 1,
247 TWO = 2,
248 THREE = 3,
249 FOUR = 4,
250 FIVE = 5,
251 SIX = 6,
253 };
254};
255
256// Define how to print enumeration
257extern ITKCommon_EXPORT std::ostream &
258 operator<<(std::ostream & out, const OctreeEnums::Octree value);
259extern ITKCommon_EXPORT std::ostream &
260 operator<<(std::ostream & out, const OctreeEnums::LeafIdentifier value);
265{
266public:
275};
276
277extern ITKCommon_EXPORT std::ostream &
278 operator<<(std::ostream & out, const ObjectEnums::RegionEnum value);
279
284{
285public:
296};
297extern ITKCommon_EXPORT std::ostream &
298 operator<<(std::ostream & out, const ObjectFactoryEnums::InsertionPosition value);
299
300} // namespace itk
301
302#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