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:
40 enum class AtomicPixel : uint8_t
41 {
42 ITK_UCHAR, // aka uint8_t
44 ITK_USHORT, // aka uint16_t
46 ITK_UINT, // aka uint32_t
47 ITK_INT,
48 ITK_ULONG, // aka uint64_t
52 };
53};
54// Define how to print enumeration
55extern ITKIOImageBase_EXPORT std::ostream &
56 operator<<(std::ostream & out, const IOCommonEnums::AtomicPixel value);
57
63 enum class AtomicPixel : uint8_t
64 {
65 ITK_UCHAR, // aka uint8_t
67 ITK_USHORT, // aka uint16_t
69 ITK_UINT, // aka uint32_t
70 ITK_INT,
71 ITK_ULONG, // aka uint64_t
75 };
76};
77// Define how to print enumeration
78extern ITKIOImageBase_EXPORT std::ostream &
79 operator<<(std::ostream & out, const IOCommonEnums::AtomicPixel value);
80 * \brief Centralized functionality for IO classes.
81 *
82 * This class provides encapsulated functionality to support the IO classes.
83 *
84 * \ingroup IOFilters
85 *
86 * \ingroup ITKIOImageBase
87 */
88class ITKIOImageBase_EXPORT IOCommon
89{
90public:
92 {
93
95 MAX_FILENAMELIST_SIZE = 512
96 };
97
99#if !defined(ITK_LEGACY_REMOVE)
101 static constexpr AtomicPixelEnum ITK_UCHAR = AtomicPixelEnum::ITK_UCHAR;
102 static constexpr AtomicPixelEnum ITK_CHAR = AtomicPixelEnum::ITK_CHAR;
103 static constexpr AtomicPixelEnum ITK_USHORT = AtomicPixelEnum::ITK_USHORT;
104 static constexpr AtomicPixelEnum ITK_SHORT = AtomicPixelEnum::ITK_SHORT;
105 static constexpr AtomicPixelEnum ITK_UINT = AtomicPixelEnum::ITK_UINT;
106 static constexpr AtomicPixelEnum ITK_INT = AtomicPixelEnum::ITK_INT;
107 static constexpr AtomicPixelEnum ITK_ULONG = AtomicPixelEnum::ITK_ULONG;
108 static constexpr AtomicPixelEnum ITK_LONG = AtomicPixelEnum::ITK_LONG;
109 static constexpr AtomicPixelEnum ITK_FLOAT = AtomicPixelEnum::ITK_FLOAT;
110 static constexpr AtomicPixelEnum ITK_DOUBLE = AtomicPixelEnum::ITK_DOUBLE;
111#endif
112
113
115 static std::string
117
119 static unsigned int
121};
122
123extern const ITKIOImageBase_EXPORT char * const ITK_OnDiskStorageTypeName;
124extern const ITKIOImageBase_EXPORT char * const ITK_ImageFileBaseName;
125extern const ITKIOImageBase_EXPORT char * const ITK_VoxelUnits;
126extern const ITKIOImageBase_EXPORT char * const ITK_OnDiskBitPerPixel;
127extern const ITKIOImageBase_EXPORT char * const SPM_ROI_SCALE;
128extern const ITKIOImageBase_EXPORT char * const ITK_FileNotes;
129extern const ITKIOImageBase_EXPORT char * const ITK_Origin;
130extern const ITKIOImageBase_EXPORT char * const ITK_Spacing;
131extern const ITKIOImageBase_EXPORT char * const ITK_ZDirection;
132extern const ITKIOImageBase_EXPORT char * const ITK_FileOriginator;
133extern const ITKIOImageBase_EXPORT char * const ITK_OriginationDate;
134extern const ITKIOImageBase_EXPORT char * const ITK_PatientID;
135extern const ITKIOImageBase_EXPORT char * const ITK_ExperimentDate;
136extern const ITKIOImageBase_EXPORT char * const ITK_ExperimentTime;
137extern const ITKIOImageBase_EXPORT char * const ITK_InputFilterName;
138extern const ITKIOImageBase_EXPORT char * const ITK_NumberOfDimensions;
139extern const ITKIOImageBase_EXPORT char * const ITK_ImageType;
140extern const ITKIOImageBase_EXPORT char * const ITK_PatientName;
141extern const ITKIOImageBase_EXPORT char * const ITK_ScanID;
142extern const ITKIOImageBase_EXPORT char * const ROI_NAME;
143extern const ITKIOImageBase_EXPORT char * const ROI_X_SIZE;
144extern const ITKIOImageBase_EXPORT char * const ROI_X_RESOLUTION;
145extern const ITKIOImageBase_EXPORT char * const ROI_Y_SIZE;
146extern const ITKIOImageBase_EXPORT char * const ROI_Y_RESOLUTION;
147extern const ITKIOImageBase_EXPORT char * const ROI_Z_SIZE;
148extern const ITKIOImageBase_EXPORT char * const ROI_Z_RESOLUTION;
149extern const ITKIOImageBase_EXPORT char * const ROI_NUM_SEGMENTS;
150extern const ITKIOImageBase_EXPORT char * const ROI_PLANE;
151extern const ITKIOImageBase_EXPORT char * const ROI_SCAN_ID;
152} // end namespace itk
153
154#endif // itkIOCommon_h
static std::string AtomicPixelTypeToString(const AtomicPixelEnum pixelType)
static unsigned int ComputeSizeOfAtomicPixelType(const AtomicPixelEnum pixelType)
IOCommonEnums::AtomicPixel AtomicPixelEnum
Definition: itkIOCommon.h:98
Contains all enum classes used by IOCommon class.
Definition: itkIOCommon.h:34
const ITKIOImageBase_EXPORT char *const ITK_ExperimentDate
const ITKIOImageBase_EXPORT char *const ITK_VoxelUnits
const ITKIOImageBase_EXPORT char *const ROI_Z_RESOLUTION
const ITKIOImageBase_EXPORT char *const ITK_NumberOfDimensions
const ITKIOImageBase_EXPORT char *const ROI_Z_SIZE
const ITKIOImageBase_EXPORT char *const ITK_ImageFileBaseName
const ITKIOImageBase_EXPORT char *const SPM_ROI_SCALE
const ITKIOImageBase_EXPORT char *const ITK_ImageType
const ITKIOImageBase_EXPORT char *const ROI_PLANE
const ITKIOImageBase_EXPORT char *const ITK_FileNotes
const ITKIOImageBase_EXPORT char *const ITK_OriginationDate
const ITKIOImageBase_EXPORT char *const ROI_Y_SIZE
const ITKIOImageBase_EXPORT char *const ROI_X_SIZE
const ITKIOImageBase_EXPORT char *const ITK_Origin
const ITKIOImageBase_EXPORT char *const ROI_SCAN_ID
const ITKIOImageBase_EXPORT char *const ITK_FileOriginator
const ITKIOImageBase_EXPORT char *const ITK_Spacing
const ITKIOImageBase_EXPORT char *const ROI_Y_RESOLUTION
const ITKIOImageBase_EXPORT char *const ITK_PatientName
const ITKIOImageBase_EXPORT char *const ROI_NAME
const ITKIOImageBase_EXPORT char *const ROI_X_RESOLUTION
const ITKIOImageBase_EXPORT char *const ROI_NUM_SEGMENTS
const ITKIOImageBase_EXPORT char *const ITK_OnDiskStorageTypeName
const ITKIOImageBase_EXPORT char *const ITK_ZDirection
ITKIOImageBase_EXPORT std::ostream & operator<<(std::ostream &out, const IOCommonEnums::AtomicPixel value)
const ITKIOImageBase_EXPORT char *const ITK_ScanID
const ITKIOImageBase_EXPORT char *const ITK_ExperimentTime
const ITKIOImageBase_EXPORT char *const ITK_InputFilterName
const ITKIOImageBase_EXPORT char *const ITK_OnDiskBitPerPixel
const ITKIOImageBase_EXPORT char *const ITK_PatientID
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:64