ITK  5.2.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  * http://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  MAX_ITK_CELLS = 255
151  };
152 
153 }; // CommonEnums
154 
155 // Convenience
162 
163 #if !defined(ITK_LEGACY_REMOVE)
164 
165 using IOPixelType = CommonEnums::IOPixel;
166 using IOComponentType = CommonEnums::IOComponent;
167 using IOFileType = CommonEnums::IOFile;
168 using IOFileModeType = CommonEnums::IOFileMode;
169 using IOByteOrderType = CommonEnums::IOByteOrder;
170 using CellGeometryType = CommonEnums::CellGeometry;
171 #endif
172 // Define how to print enumeration
173 extern ITKCommon_EXPORT std::ostream &
174  operator<<(std::ostream & out, IOPixelEnum value);
175 extern ITKCommon_EXPORT std::ostream &
176  operator<<(std::ostream & out, IOComponentEnum value);
177 extern ITKCommon_EXPORT std::ostream &
178  operator<<(std::ostream & out, IOFileEnum value);
179 extern ITKCommon_EXPORT std::ostream &
180  operator<<(std::ostream & out, IOFileModeEnum value);
181 extern ITKCommon_EXPORT std::ostream &
182  operator<<(std::ostream & out, IOByteOrderEnum value);
183 extern ITKCommon_EXPORT std::ostream &
184  operator<<(std::ostream & out, CellGeometryEnum value);
186 
191 {
192 public:
198  {
203  };
204 };
205 extern ITKCommon_EXPORT std::ostream &
206  operator<<(std::ostream & out, MeshEnums::MeshClassCellsAllocationMethod value);
212 {
213 public:
219  enum class Octree : uint8_t
220  {
221  UNKNOWN_PLANE,
222  SAGITAL_PLANE,
223  CORONAL_PLANE,
225  };
226 
227 /***
228  * \class LeafIdentifier
229  * \ingroup ITKCommon
230  */
231  enum class LeafIdentifier : uint8_t
232  {
233  ZERO = 0,
234  ONE = 1,
235  TWO = 2,
236  THREE = 3,
237  FOUR = 4,
238  FIVE = 5,
239  SIX = 6,
240  SEVEN = 7
241  };
242 };
243 
244 // Define how to print enumeration
245 extern ITKCommon_EXPORT std::ostream &
246  operator<<(std::ostream & out, const OctreeEnums::Octree value);
247 extern ITKCommon_EXPORT std::ostream &
248  operator<<(std::ostream & out, const OctreeEnums::LeafIdentifier value);
253 {
254 public:
258  enum class RegionEnum : uint8_t
259  {
262  };
263 };
264 
265 extern ITKCommon_EXPORT std::ostream &
266  operator<<(std::ostream & out, const ObjectEnums::RegionEnum value);
267 
272 {
273 public:
280  {
284  };
285 };
286 extern ITKCommon_EXPORT std::ostream &
287  operator<<(std::ostream & out, const ObjectFactoryEnums::InsertionPosition value);
288 
289 } // namespace itk
290 
291 #endif // itkCommonEnums_h
itk::CommonEnums::IOByteOrder::LittleEndian
itk::CommonEnums::IOComponent::CHAR
itk::CommonEnums::IOPixel::RGBA
itk::uint8_t
::uint8_t uint8_t
Definition: itkIntTypes.h:29
itk::CommonEnums::IOPixel::OFFSET
itk::CommonEnums::IOFile
IOFile
Definition: itkCommonEnums.h:100
itk::CommonEnums::IOFile::BINARY
itk::OctreeEnums::Octree
Octree
Definition: itkCommonEnums.h:219
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:218
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:230
itk::OctreeEnums::Octree::SAGITAL_PLANE
The plane is Sagital.
itk::ObjectFactoryEnums
Definition: itkCommonEnums.h:271
CellGeometry
itk::OctreeEnums::LeafIdentifier::THREE
IOFileMode
itk::CommonEnums::CellGeometry::QUADRATIC_TRIANGLE_CELL
itk::CommonEnums::IOPixel::COVARIANTVECTOR
itk::MeshEnums::MeshClassCellsAllocationMethod::CellsAllocatedDynamicallyCellByCell
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:258
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:197
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:252
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:190
itk::OctreeEnums
Definition: itkCommonEnums.h:211
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:279
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