ITK  6.0.0
Insight Toolkit
itkIOCommon.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#ifndef itkIOCommon_h
19#define itkIOCommon_h
20#include "ITKIOImageBaseExport.h"
21
22
23#include "itkIntTypes.h"
24#include "itkProcessObject.h"
26
27namespace itk
28{
34{
35public:
41 enum class AtomicPixel : uint8_t
42 {
43 ITK_UCHAR, // aka uint8_t
45 ITK_USHORT, // aka uint16_t
47 ITK_UINT, // aka uint32_t
48 ITK_INT,
49 ITK_ULONG, // aka uint64_t
53 };
54};
55// Define how to print enumeration
56extern ITKIOImageBase_EXPORT std::ostream &
57 operator<<(std::ostream & out, const IOCommonEnums::AtomicPixel value);
58
65 enum class AtomicPixel : uint8_t
66 {
67 ITK_UCHAR, // aka uint8_t
69 ITK_USHORT, // aka uint16_t
71 ITK_UINT, // aka uint32_t
72 ITK_INT,
73 ITK_ULONG, // aka uint64_t
77 };
78};
79// Define how to print enumeration
80extern ITKIOImageBase_EXPORT std::ostream &
81 operator<<(std::ostream & out, const IOCommonEnums::AtomicPixel value);
82 * \brief Centralized functionality for IO classes.
83 *
84 * This class provides encapsulated functionality to support the IO classes.
85 *
86 * \ingroup IOFilters
87 *
88 * \ingroup ITKIOImageBase
89 */
90class ITKIOImageBase_EXPORT IOCommon
91{
92public:
94 {
95
97 MAX_FILENAMELIST_SIZE = 512
98 };
99
101#if !defined(ITK_LEGACY_REMOVE)
103 static constexpr AtomicPixelEnum ITK_UCHAR = AtomicPixelEnum::ITK_UCHAR;
104 static constexpr AtomicPixelEnum ITK_CHAR = AtomicPixelEnum::ITK_CHAR;
105 static constexpr AtomicPixelEnum ITK_USHORT = AtomicPixelEnum::ITK_USHORT;
106 static constexpr AtomicPixelEnum ITK_SHORT = AtomicPixelEnum::ITK_SHORT;
107 static constexpr AtomicPixelEnum ITK_UINT = AtomicPixelEnum::ITK_UINT;
108 static constexpr AtomicPixelEnum ITK_INT = AtomicPixelEnum::ITK_INT;
109 static constexpr AtomicPixelEnum ITK_ULONG = AtomicPixelEnum::ITK_ULONG;
110 static constexpr AtomicPixelEnum ITK_LONG = AtomicPixelEnum::ITK_LONG;
111 static constexpr AtomicPixelEnum ITK_FLOAT = AtomicPixelEnum::ITK_FLOAT;
112 static constexpr AtomicPixelEnum ITK_DOUBLE = AtomicPixelEnum::ITK_DOUBLE;
113#endif
114
115
117 static std::string
119
121 static unsigned int
123};
124
125extern ITKIOImageBase_EXPORT const char * const ITK_OnDiskStorageTypeName;
126extern ITKIOImageBase_EXPORT const char * const ITK_ImageFileBaseName;
127extern ITKIOImageBase_EXPORT const char * const ITK_VoxelUnits;
128extern ITKIOImageBase_EXPORT const char * const ITK_OnDiskBitPerPixel;
129extern ITKIOImageBase_EXPORT const char * const SPM_ROI_SCALE;
130extern ITKIOImageBase_EXPORT const char * const ITK_FileNotes;
131extern ITKIOImageBase_EXPORT const char * const ITK_Origin;
132extern ITKIOImageBase_EXPORT const char * const ITK_Spacing;
133extern ITKIOImageBase_EXPORT const char * const ITK_ZDirection;
134extern ITKIOImageBase_EXPORT const char * const ITK_FileOriginator;
135extern ITKIOImageBase_EXPORT const char * const ITK_OriginationDate;
136extern ITKIOImageBase_EXPORT const char * const ITK_PatientID;
137extern ITKIOImageBase_EXPORT const char * const ITK_ExperimentDate;
138extern ITKIOImageBase_EXPORT const char * const ITK_ExperimentTime;
139extern ITKIOImageBase_EXPORT const char * const ITK_InputFilterName;
140extern ITKIOImageBase_EXPORT const char * const ITK_NumberOfDimensions;
141extern ITKIOImageBase_EXPORT const char * const ITK_ImageType;
142extern ITKIOImageBase_EXPORT const char * const ITK_PatientName;
143extern ITKIOImageBase_EXPORT const char * const ITK_ScanID;
144extern ITKIOImageBase_EXPORT const char * const ROI_NAME;
145extern ITKIOImageBase_EXPORT const char * const ROI_X_SIZE;
146extern ITKIOImageBase_EXPORT const char * const ROI_X_RESOLUTION;
147extern ITKIOImageBase_EXPORT const char * const ROI_Y_SIZE;
148extern ITKIOImageBase_EXPORT const char * const ROI_Y_RESOLUTION;
149extern ITKIOImageBase_EXPORT const char * const ROI_Z_SIZE;
150extern ITKIOImageBase_EXPORT const char * const ROI_Z_RESOLUTION;
151extern ITKIOImageBase_EXPORT const char * const ROI_NUM_SEGMENTS;
152extern ITKIOImageBase_EXPORT const char * const ROI_PLANE;
153extern ITKIOImageBase_EXPORT const char * const ROI_SCAN_ID;
154} // end namespace itk
155
156#endif // itkIOCommon_h
static std::string AtomicPixelTypeToString(const AtomicPixelEnum pixelType)
static unsigned int ComputeSizeOfAtomicPixelType(const AtomicPixelEnum pixelType)
IOCommonEnums::AtomicPixel AtomicPixelEnum
Definition: itkIOCommon.h:100
Contains all enum classes used by IOCommon class.
Definition: itkIOCommon.h:34
ITKIOImageBase_EXPORT const char *const ITK_ImageType
ITKIOImageBase_EXPORT const char *const ROI_X_RESOLUTION
ITKIOImageBase_EXPORT const char *const ITK_Spacing
ITKIOImageBase_EXPORT const char *const ITK_NumberOfDimensions
ITKIOImageBase_EXPORT const char *const ITK_ZDirection
ITKIOImageBase_EXPORT const char *const ITK_ImageFileBaseName
ITKIOImageBase_EXPORT const char *const ROI_Z_SIZE
ITKIOImageBase_EXPORT const char *const ITK_OnDiskStorageTypeName
ITKIOImageBase_EXPORT const char *const ITK_InputFilterName
ITKIOImageBase_EXPORT const char *const ROI_Z_RESOLUTION
ITKIOImageBase_EXPORT const char *const ITK_ExperimentTime
ITKIOImageBase_EXPORT const char *const ROI_NAME
ITKIOImageBase_EXPORT const char *const ITK_OriginationDate
ITKIOImageBase_EXPORT const char *const ITK_OnDiskBitPerPixel
ITKIOImageBase_EXPORT const char *const ITK_ExperimentDate
ITKIOImageBase_EXPORT const char *const ITK_PatientName
ITKIOImageBase_EXPORT const char *const ITK_ScanID
ITKIOImageBase_EXPORT const char *const ROI_NUM_SEGMENTS
ITKIOImageBase_EXPORT const char *const ROI_SCAN_ID
ITKIOImageBase_EXPORT const char *const ROI_X_SIZE
ITKIOImageBase_EXPORT const char *const ITK_FileNotes
ITKIOImageBase_EXPORT const char *const ITK_PatientID
ITKIOImageBase_EXPORT std::ostream & operator<<(std::ostream &out, const IOCommonEnums::AtomicPixel value)
ITKIOImageBase_EXPORT const char *const ITK_FileOriginator
ITKIOImageBase_EXPORT const char *const ROI_Y_RESOLUTION
ITKIOImageBase_EXPORT const char *const SPM_ROI_SCALE
ITKIOImageBase_EXPORT const char *const ITK_Origin
ITKIOImageBase_EXPORT const char *const ITK_VoxelUnits
ITKIOImageBase_EXPORT const char *const ROI_PLANE
ITKIOImageBase_EXPORT const char *const ROI_Y_SIZE
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
ITKCommon_EXPORT std::ostream & operator<<(std::ostream &out, typename AnatomicalOrientation::CoordinateEnum value)
AtomicPixel
Definition: itkIOCommon.h:66