ITK  5.4.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
49  enum class IOPixel : uint8_t
50  {
52  SCALAR,
53  RGB,
54  RGBA,
55  OFFSET,
56  VECTOR,
57  POINT,
61  COMPLEX,
62  FIXEDARRAY,
63  ARRAY,
64  MATRIX,
67  };
68 
76  enum class IOComponent : uint8_t
77  {
79  UCHAR,
80  CHAR,
81  USHORT,
82  SHORT,
83  UINT,
84  INT,
85  ULONG,
86  LONG,
87  LONGLONG,
88  ULONGLONG,
89  FLOAT,
90  DOUBLE,
91  LDOUBLE
92  };
93 
100  enum class IOFile : uint8_t
101  {
102  ASCII = 0,
103  Binary = 1,
104  TypeNotApplicable = 2,
105  // for backward compatibility
106  BINARY = 1, // Spelling difference between IOMeshBase and IOImageBase
107  TYPENOTAPPLICABLE = 2 // Spelling difference between IOMeshBase and IOImageBase
108  };
109 
115  enum class IOFileMode : uint8_t
116  {
117  ReadMode,
118  WriteMode
119  };
120 
127  enum class IOByteOrder : uint8_t
128  {
129  BigEndian,
130  LittleEndian,
132  };
133 
138  enum class CellGeometry : uint8_t
139  {
140  VERTEX_CELL = 0,
141  LINE_CELL = 1,
142  TRIANGLE_CELL = 2,
143  QUADRILATERAL_CELL = 3,
144  POLYGON_CELL = 4,
145  TETRAHEDRON_CELL = 5,
146  HEXAHEDRON_CELL = 6,
149  LAST_ITK_CELL = 9,
150  POLYLINE_CELL = 10,
151  MAX_ITK_CELLS = 255
152  };
153 
154 }; // CommonEnums
155 
156 // Convenience
163 
164 #if !defined(ITK_LEGACY_REMOVE)
165 
166 using IOPixelType = CommonEnums::IOPixel;
167 using IOComponentType = CommonEnums::IOComponent;
168 using IOFileType = CommonEnums::IOFile;
169 using IOFileModeType = CommonEnums::IOFileMode;
170 using IOByteOrderType = CommonEnums::IOByteOrder;
171 using CellGeometryType = CommonEnums::CellGeometry;
172 #endif
173 // Define how to print enumeration
174 extern ITKCommon_EXPORT std::ostream &
175  operator<<(std::ostream & out, IOPixelEnum value);
176 extern ITKCommon_EXPORT std::ostream &
177  operator<<(std::ostream & out, IOComponentEnum value);
178 extern ITKCommon_EXPORT std::ostream &
179  operator<<(std::ostream & out, IOFileEnum value);
180 extern ITKCommon_EXPORT std::ostream &
181  operator<<(std::ostream & out, IOFileModeEnum value);
182 extern ITKCommon_EXPORT std::ostream &
183  operator<<(std::ostream & out, IOByteOrderEnum value);
184 extern ITKCommon_EXPORT std::ostream &
185  operator<<(std::ostream & out, CellGeometryEnum value);
192 {
193 public:
198  enum class MeshClassCellsAllocationMethod : uint8_t
199  {
204  };
205 };
206 extern ITKCommon_EXPORT std::ostream &
207  operator<<(std::ostream & out, MeshEnums::MeshClassCellsAllocationMethod value);
213 {
214 public:
220  enum class Octree : uint8_t
221  {
222  UNKNOWN_PLANE,
223  SAGITAL_PLANE,
224  CORONAL_PLANE,
226  };
227 
228  /***
229  * \class LeafIdentifier
230  * \ingroup ITKCommon
231  */
232  enum class LeafIdentifier : uint8_t
233  {
234  ZERO = 0,
235  ONE = 1,
236  TWO = 2,
237  THREE = 3,
238  FOUR = 4,
239  FIVE = 5,
240  SIX = 6,
241  SEVEN = 7
242  };
243 };
244 
245 // Define how to print enumeration
246 extern ITKCommon_EXPORT std::ostream &
247  operator<<(std::ostream & out, const OctreeEnums::Octree value);
248 extern ITKCommon_EXPORT std::ostream &
249  operator<<(std::ostream & out, const OctreeEnums::LeafIdentifier value);
254 {
255 public:
259  enum class RegionEnum : uint8_t
260  {
263  };
264 };
265 
266 extern ITKCommon_EXPORT std::ostream &
267  operator<<(std::ostream & out, const ObjectEnums::RegionEnum value);
268 
273 {
274 public:
280  enum class InsertionPosition : uint8_t
281  {
285  };
286 };
287 extern ITKCommon_EXPORT std::ostream &
288  operator<<(std::ostream & out, const ObjectFactoryEnums::InsertionPosition value);
289 
290 } // namespace itk
291 
292 #endif // itkCommonEnums_h
itk::CommonEnums::IOByteOrder::LittleEndian
itk::CommonEnums::IOComponent::CHAR
itk::CommonEnums::IOPixel::RGBA
itk::CommonEnums::IOPixel::OFFSET
itk::CommonEnums::IOFile
IOFile
Definition: itkCommonEnums.h:100
itk::CommonEnums::IOFile::BINARY
itk::OctreeEnums::Octree
Octree
Definition: itkCommonEnums.h:220
itk::OctreeEnums::Octree::UNKNOWN_PLANE
The plane is Unknown.
itk::CommonEnums::IOByteOrder::BigEndian
IOFile
itk::OctreeEnums::LeafIdentifier::FOUR
itk::CommonEnums::IOComponent::USHORT
itk::CommonEnums::CellGeometry::MAX_ITK_CELLS
itk::CommonEnums::IOPixel::ARRAY
itk::CommonEnums::IOByteOrder
IOByteOrder
Definition: itkCommonEnums.h:127
itk::operator<<
std::ostream & operator<<(std::ostream &os, const Array< TValue > &arr)
Definition: itkArray.h:216
itk::CommonEnums::IOFile::TypeNotApplicable
itk::CommonEnums::IOFile::Binary
itk::CommonEnums::CellGeometry::LINE_CELL
itk::CommonEnums
Common enums used across the toolkit.
Definition: itkCommonEnums.h:38
itk::CommonEnums::IOComponent::SHORT
itk::CommonEnums::CellGeometry::VERTEX_CELL
itk::OctreeEnums::Octree::CORONAL_PLANE
The plane is Coronal.
itk::CommonEnums::IOPixel::VECTOR
itk::CommonEnums::IOPixel::SCALAR
itk::CommonEnums::CellGeometry::TRIANGLE_CELL
itk::CommonEnums::IOFileMode
IOFileMode
Definition: itkCommonEnums.h:115
IOByteOrder
itk::CommonEnums::IOComponent::ULONG
itk::CommonEnums::IOComponent::UINT
InsertionPosition
itk::ObjectFactoryEnums::InsertionPosition::INSERT_AT_BACK
itk::OctreeEnums::LeafIdentifier
LeafIdentifier
Definition: itkCommonEnums.h:231
itk::OctreeEnums::Octree::SAGITAL_PLANE
The plane is Sagittal.
itk::ObjectFactoryEnums
Definition: itkCommonEnums.h:272
CellGeometry
itk::OctreeEnums::LeafIdentifier::THREE
IOFileMode
itk::CommonEnums::CellGeometry::QUADRATIC_TRIANGLE_CELL
itk::CommonEnums::IOPixel::COVARIANTVECTOR
itk::MeshEnums::MeshClassCellsAllocationMethod::CellsAllocatedDynamicallyCellByCell
itk::CommonEnums::CellGeometry::POLYLINE_CELL
itk::CommonEnums::IOPixel::SYMMETRICSECONDRANKTENSOR
itk::CommonEnums::IOComponent
IOComponent
Definition: itkCommonEnums.h:76
itk::OctreeEnums::Octree::TRANSVERSE_PLANE
The plane is Transverse.
itk::CommonEnums::CellGeometry::HEXAHEDRON_CELL
itk::CommonEnums::IOComponent::UCHAR
itk::OctreeEnums::LeafIdentifier::FIVE
itk::ObjectEnums::RegionEnum::ITK_STRUCTURED_REGION
itk::ObjectEnums::RegionEnum
RegionEnum
Definition: itkCommonEnums.h:259
itk::CommonEnums::IOPixel
IOPixel
Definition: itkCommonEnums.h:49
itk::CommonEnums::IOComponent::DOUBLE
itk::OctreeEnums::LeafIdentifier::SIX
itk::ObjectFactoryEnums::InsertionPosition::INSERT_AT_FRONT
itk::CommonEnums::IOComponent::LONGLONG
itk::OctreeEnums::LeafIdentifier::ZERO
itk::CommonEnums::IOPixel::DIFFUSIONTENSOR3D
itk::MeshEnums::MeshClassCellsAllocationMethod
MeshClassCellsAllocationMethod
Definition: itkCommonEnums.h:198
itk::CommonEnums::CellGeometry::QUADRATIC_EDGE_CELL
itk::CommonEnums::IOPixel::FIXEDARRAY
itk::CommonEnums::IOPixel::MATRIX
itk::CommonEnums::IOComponent::LONG
MeshClassCellsAllocationMethod
itk::CommonEnums::IOPixel::RGB
itk::CommonEnums::IOFileMode::WriteMode
itk::ObjectEnums
Definition: itkCommonEnums.h:253
RegionEnum
itk::CommonEnums::IOByteOrder::OrderNotApplicable
itk::CommonEnums::IOPixel::POINT
itk::CommonEnums::IOComponent::ULONGLONG
itk::CommonEnums::IOComponent::INT
itk::ObjectEnums::RegionEnum::ITK_UNSTRUCTURED_REGION
itk::ObjectFactoryEnums::InsertionPosition::INSERT_AT_POSITION
itkIntTypes.h
itk::CommonEnums::CellGeometry
CellGeometry
Definition: itkCommonEnums.h:138
itk::OctreeEnums::LeafIdentifier::ONE
IOComponent
itk::MeshEnums
Definition: itkCommonEnums.h:191
itk::OctreeEnums
Definition: itkCommonEnums.h:212
Octree
itk::CommonEnums::IOPixel::VARIABLESIZEMATRIX
itk::MeshEnums::MeshClassCellsAllocationMethod::CellsAllocatedAsStaticArray
itk::CommonEnums::CellGeometry::TETRAHEDRON_CELL
itk::CommonEnums::IOPixel::UNKNOWNPIXELTYPE
itk::MeshEnums::MeshClassCellsAllocationMethod::CellsAllocationMethodUndefined
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::CommonEnums::IOPixel::COMPLEX
itk::CommonEnums::IOFile::ASCII
itk::CommonEnums::IOComponent::UNKNOWNCOMPONENTTYPE
itk::ObjectFactoryEnums::InsertionPosition
InsertionPosition
Definition: itkCommonEnums.h:280
IOPixel
itk::OctreeEnums::LeafIdentifier::TWO
itk::CommonEnums::IOFile::TYPENOTAPPLICABLE
itk::OctreeEnums::LeafIdentifier::SEVEN
itk::CommonEnums::CellGeometry::POLYGON_CELL
itk::CommonEnums::IOComponent::FLOAT
itk::CommonEnums::IOPixel::VARIABLELENGTHVECTOR
itk::CommonEnums::IOComponent::LDOUBLE
itk::CommonEnums::CellGeometry::LAST_ITK_CELL
itk::CommonEnums::IOFileMode::ReadMode
itk::MeshEnums::MeshClassCellsAllocationMethod::CellsAllocatedAsADynamicArray
itk::CommonEnums::CellGeometry::QUADRILATERAL_CELL