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 
26 namespace itk
27 {
28 
39 {
40 public:
41  // Used in Input/Output for Images/Mesh/Transform types
48  enum class IOPixel : uint8_t
49  {
51  SCALAR,
52  RGB,
53  RGBA,
54  OFFSET,
55  VECTOR,
56  POINT,
60  COMPLEX,
61  FIXEDARRAY,
62  ARRAY,
63  MATRIX,
66  };
67 
74  enum class IOComponent : uint8_t
75  {
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,
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,
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)
159 
160 using IOPixelType = CommonEnums::IOPixel;
161 using IOComponentType = CommonEnums::IOComponent;
162 using IOFileType = CommonEnums::IOFile;
163 using IOFileModeType = CommonEnums::IOFileMode;
164 using IOByteOrderType = CommonEnums::IOByteOrder;
165 using CellGeometryType = CommonEnums::CellGeometry;
166 #endif
167 // Define how to print enumeration
168 extern ITKCommon_EXPORT std::ostream &
169  operator<<(std::ostream & out, IOPixelEnum value);
170 extern ITKCommon_EXPORT std::ostream &
171  operator<<(std::ostream & out, IOComponentEnum value);
172 extern ITKCommon_EXPORT std::ostream &
173  operator<<(std::ostream & out, IOFileEnum value);
174 extern ITKCommon_EXPORT std::ostream &
175  operator<<(std::ostream & out, IOFileModeEnum value);
176 extern ITKCommon_EXPORT std::ostream &
177  operator<<(std::ostream & out, IOByteOrderEnum value);
178 extern ITKCommon_EXPORT std::ostream &
179  operator<<(std::ostream & out, CellGeometryEnum value);
186 {
187 public:
192  enum class MeshClassCellsAllocationMethod : uint8_t
193  {
198  };
199 };
200 extern ITKCommon_EXPORT std::ostream &
201  operator<<(std::ostream & out, MeshEnums::MeshClassCellsAllocationMethod value);
202 
208 {
209 public:
210 
215  enum class Octree : uint8_t
216  {
217  UNKNOWN_PLANE,
218  SAGITAL_PLANE,
219  CORONAL_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
240 extern ITKCommon_EXPORT std::ostream &
241  operator<<(std::ostream & out, const OctreeEnums::Octree value);
242 extern ITKCommon_EXPORT std::ostream &
243  operator<<(std::ostream & out, const OctreeEnums::LeafIdentifier value);
248 {
249 public:
253  enum class RegionEnum : uint8_t
254  {
257  };
258 };
259 
260 extern ITKCommon_EXPORT std::ostream &
261  operator<<(std::ostream & out, const ObjectEnums::RegionEnum value);
262 
267 {
268 public:
273  enum class InsertionPosition : uint8_t
274  {
278  };
279 };
280 extern ITKCommon_EXPORT std::ostream &
281  operator<<(std::ostream & out, const ObjectFactoryEnums::InsertionPosition value);
282 
283 } // namespace itk
284 
285 #endif // itkCommonEnums_h
itk::CommonEnums::IOComponent::UNKNOWNCOMPONENTTYPE
itk::CommonEnums::CellGeometry::LINE_CELL
itk::CommonEnums::CellGeometry::POLYGON_CELL
itk::CommonEnums::IOComponent::FLOAT
itk::CommonEnums::IOFileMode
IOFileMode
Definition: itkCommonEnums.h:111
itk::OctreeEnums::Octree::CORONAL_PLANE
The plane is Coronal.
itk::CommonEnums::IOFile::TYPENOTAPPLICABLE
itk::OctreeEnums::LeafIdentifier::ONE
itk::CommonEnums::IOPixel::VARIABLESIZEMATRIX
itk::OctreeEnums::LeafIdentifier::FIVE
itk::CommonEnums::CellGeometry::QUADRATIC_EDGE_CELL
itk::CommonEnums::CellGeometry::HEXAHEDRON_CELL
itk::OctreeEnums::LeafIdentifier::SIX
itk::CommonEnums::IOComponent::LDOUBLE
itk::CommonEnums::IOPixel::ARRAY
itk::CommonEnums
Common enums used across the toolkit.
Definition: itkCommonEnums.h:38
itk::CommonEnums::IOComponent::LONGLONG
itk::CommonEnums::IOComponent::INT
itk::MeshEnums::MeshClassCellsAllocationMethod::CellsAllocatedDynamicallyCellByCell
itk::OctreeEnums::LeafIdentifier::FOUR
itk::CommonEnums::IOByteOrder::BigEndian
itk::OctreeEnums::LeafIdentifier
LeafIdentifier
Definition: itkCommonEnums.h:226
itk::ObjectEnums::RegionEnum::ITK_STRUCTURED_REGION
itk::CommonEnums::IOComponent::CHAR
itk::ObjectFactoryEnums
Definition: itkCommonEnums.h:266
itk::OctreeEnums::LeafIdentifier::SEVEN
itk::CommonEnums::IOComponent::SHORT
itk::CommonEnums::IOFileMode::ReadMode
itk::ObjectFactoryEnums::InsertionPosition
InsertionPosition
Definition: itkCommonEnums.h:273
itk::operator<<
ITKCommon_EXPORT std::ostream & operator<<(std::ostream &out, typename AnatomicalOrientation::CoordinateEnum value)
itk::CommonEnums::IOFile::ASCII
itk::CommonEnums::IOByteOrder::LittleEndian
itk::CommonEnums::IOComponent::DOUBLE
itk::CommonEnums::IOPixel::POINT
itk::OctreeEnums::Octree
Octree
Definition: itkCommonEnums.h:215
itk::CommonEnums::IOPixel::COVARIANTVECTOR
itk::CommonEnums::IOByteOrder::OrderNotApplicable
itk::CommonEnums::IOPixel
IOPixel
Definition: itkCommonEnums.h:48
itk::OctreeEnums::LeafIdentifier::ZERO
itk::MeshEnums::MeshClassCellsAllocationMethod::CellsAllocationMethodUndefined
itk::CommonEnums::IOComponent
IOComponent
Definition: itkCommonEnums.h:74
itk::CommonEnums::CellGeometry
CellGeometry
Definition: itkCommonEnums.h:132
itk::OctreeEnums::Octree::TRANSVERSE_PLANE
The plane is Transverse.
itk::CommonEnums::CellGeometry::POLYLINE_CELL
itk::ObjectEnums
Definition: itkCommonEnums.h:247
itk::ObjectFactoryEnums::InsertionPosition::INSERT_AT_BACK
itk::CommonEnums::CellGeometry::MAX_ITK_CELLS
itk::CommonEnums::IOPixel::MATRIX
itk::CommonEnums::IOFile
IOFile
Definition: itkCommonEnums.h:97
itk::CommonEnums::IOPixel::COMPLEX
itk::ObjectFactoryEnums::InsertionPosition::INSERT_AT_POSITION
itk::ObjectEnums::RegionEnum::ITK_UNSTRUCTURED_REGION
itkIntTypes.h
itk::CommonEnums::IOPixel::VECTOR
itk::CommonEnums::IOPixel::VARIABLELENGTHVECTOR
itk::CommonEnums::IOComponent::ULONG
itk::CommonEnums::CellGeometry::QUADRATIC_TRIANGLE_CELL
itk::MeshEnums
Definition: itkCommonEnums.h:185
itk::CommonEnums::IOComponent::USHORT
itk::OctreeEnums::LeafIdentifier::THREE
itk::ObjectEnums::RegionEnum
RegionEnum
Definition: itkCommonEnums.h:253
itk::OctreeEnums
Definition: itkCommonEnums.h:207
itk::CommonEnums::CellGeometry::QUADRILATERAL_CELL
itk::MeshEnums::MeshClassCellsAllocationMethod
MeshClassCellsAllocationMethod
Definition: itkCommonEnums.h:192
itk::MeshEnums::MeshClassCellsAllocationMethod::CellsAllocatedAsADynamicArray
itk::CommonEnums::IOFile::Binary
itk::OctreeEnums::Octree::UNKNOWN_PLANE
The plane is Unknown.
itk::CommonEnums::CellGeometry::TRIANGLE_CELL
itk::CommonEnums::IOFile::BINARY
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnatomicalOrientation.h:29
itk::CommonEnums::IOComponent::ULONGLONG
itk::OctreeEnums::Octree::SAGITAL_PLANE
The plane is Sagittal.
itk::CommonEnums::IOFileMode::WriteMode
itk::CommonEnums::IOPixel::RGB
itk::CommonEnums::CellGeometry::TETRAHEDRON_CELL
itk::CommonEnums::IOComponent::UCHAR
itk::CommonEnums::IOPixel::FIXEDARRAY
itk::CommonEnums::IOPixel::SCALAR
itk::CommonEnums::IOPixel::SYMMETRICSECONDRANKTENSOR
itk::CommonEnums::IOByteOrder
IOByteOrder
Definition: itkCommonEnums.h:122
itk::OctreeEnums::LeafIdentifier::TWO
itk::CommonEnums::IOComponent::LONG
itk::CommonEnums::IOPixel::OFFSET
itk::ObjectFactoryEnums::InsertionPosition::INSERT_AT_FRONT
itk::CommonEnums::IOPixel::RGBA
itk::CommonEnums::IOFile::TypeNotApplicable
itk::MeshEnums::MeshClassCellsAllocationMethod::CellsAllocatedAsStaticArray
itk::CommonEnums::IOPixel::UNKNOWNPIXELTYPE
itk::CommonEnums::IOPixel::DIFFUSIONTENSOR3D
itk::CommonEnums::CellGeometry::VERTEX_CELL
itk::CommonEnums::CellGeometry::LAST_ITK_CELL
itk::CommonEnums::IOComponent::UINT