00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkIOCommon_h
00018 #define __itkIOCommon_h
00019
00020 #ifdef _MSC_VER
00021 #pragma warning ( disable : 4786 )
00022 #endif
00023
00024 #include "itkIntTypes.h"
00025 #include "itkProcessObject.h"
00026 #include "itkObjectFactory.h"
00027 #include "itkSpatialOrientation.h"
00028
00029 namespace itk
00030 {
00031
00040 class ITK_EXPORT IOCommon
00041 {
00042 public:
00043 typedef enum
00044 {
00046 MAX_FILENAMELIST_SIZE = 512
00047 } SysConstants;
00048 typedef enum
00049 {
00050 ITK_UCHAR,
00051 ITK_CHAR,
00052 ITK_USHORT,
00053 ITK_SHORT,
00054 ITK_UINT,
00055 ITK_INT,
00056 ITK_ULONG,
00057 ITK_LONG,
00058 ITK_FLOAT,
00059 ITK_DOUBLE
00060 } AtomicPixelType;
00061
00063 static std::string AtomicPixelTypeToString(const AtomicPixelType pixelType);
00064
00066 static unsigned int ComputeSizeOfAtomicPixelType(const AtomicPixelType pixelType);
00067
00069 static char* ExtractFilePath (const char* fileName);
00070
00072 static char* ExtractFileExtension (const char* fileName);
00073
00075 static char* ExtractFileName (const char* fileName);
00076
00079 static bool FileExists(const char* filename);
00080
00081 };
00082
00083
00084 extern const char *const ITK_OnDiskStorageTypeName ;
00085 extern const char *const ITK_ImageFileBaseName ;
00086 extern const char *const ITK_VoxelUnits;
00087 extern const char *const ITK_OnDiskBitPerPixel;
00088 extern const char *const SPM_ROI_SCALE;
00089 extern const char *const ITK_FileNotes;
00090 #define ITKIO_DEPRECATED_METADATA_ORIENTATION
00091 #if defined(ITKIO_DEPRECATED_METADATA_ORIENTATION)
00092 extern const char *const ITK_CoordinateOrientation;
00093 #endif
00094 extern const char *const ITK_Origin;
00095 extern const char *const ITK_Spacing;
00096 extern const char *const ITK_FileOriginator;
00097 extern const char *const ITK_OriginationDate;
00098 extern const char *const ITK_PatientID;
00099 extern const char *const ITK_ExperimentDate;
00100 extern const char *const ITK_ExperimentTime;
00101 extern const char *const ITK_InputFilterName;
00102 extern const char *const ITK_NumberOfDimensions;
00103 extern const char *const ITK_ImageType;
00104 extern const char *const ITK_PatientName;
00105 extern const char *const ITK_ScanID;
00106 extern const char *const ROI_NAME;
00107 extern const char *const ROI_X_SIZE;
00108 extern const char *const ROI_X_RESOLUTION;
00109 extern const char *const ROI_Y_SIZE;
00110 extern const char *const ROI_Y_RESOLUTION;
00111 extern const char *const ROI_Z_SIZE;
00112 extern const char *const ROI_Z_RESOLUTION;
00113 extern const char *const ROI_NUM_SEGMENTS;
00114 extern const char *const ROI_PLANE;
00115 extern const char *const ROI_SCAN_ID;
00116 }
00117
00118 #endif // __itkIOCommon_h
00119