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
00028
namespace itk
00029 {
00030
00039 class ITK_EXPORT IOCommon
00040 {
00041
public:
00057 typedef enum {
00058 ITK_ORIENTATION_IRP_TRANSVERSE=0,
00059 ITK_ORIENTATION_IRP_CORONAL =1,
00060 ITK_ORIENTATION_IRP_SAGITTAL =2,
00061 ITK_ORIENTATION_IRA_TRANSVERSE_FLIPPED=3,
00062 ITK_ORIENTATION_SRP_CORONAL_FLIPPED=4,
00063 ITK_ORIENTATION_ILP_SAGITTAL_FLIPPED=5
00064 } ValidOrientationFlags;
00065
typedef enum
00066 {
00067 ITK_MAXPATHLEN =2048,
00068 MAX_FILENAMELIST_SIZE = 512
00069 } SysConstants;
00070
typedef enum
00071 {
00072 ITK_UCHAR,
00073 ITK_CHAR,
00074 ITK_USHORT,
00075 ITK_SHORT,
00076 ITK_UINT,
00077 ITK_INT,
00078 ITK_ULONG,
00079 ITK_LONG,
00080 ITK_FLOAT,
00081 ITK_DOUBLE
00082 } AtomicPixelType;
00083
00085
static std::string AtomicPixelTypeToString(
const AtomicPixelType pixelType);
00086
00088
static unsigned int ComputeSizeOfAtomicPixelType(
const AtomicPixelType pixelType);
00089
00091
static char* ExtractFilePath (
const char* fileName);
00092
00094
static char* ExtractFileExtension (
const char* fileName);
00095
00097
static char* ExtractFileName (
const char* fileName);
00098
00101
static bool FileExists(
const char* filename);
00102
00103 };
00104
00105
00106
extern const char *
const ITK_OnDiskStorageTypeName ;
00107
extern const char *
const ITK_ImageFileBaseName ;
00108
extern const char *
const ITK_VoxelUnits;
00109
extern const char *
const ITK_OnDiskBitPerPixel;
00110
extern const char *
const SPM_ROI_SCALE;
00111
extern const char *
const ITK_FileNotes;
00112
extern const char *
const ITK_Orientation;
00113
extern const char *
const ITK_FileOriginator;
00114
extern const char *
const ITK_OriginationDate;
00115
extern const char *
const ITK_PatientID;
00116
extern const char *
const ITK_ExperimentDate;
00117
extern const char *
const ITK_ExperimentTime;
00118
extern const char *
const ITK_InputFilterName;
00119
extern const char *
const ROI_NAME;
00120
extern const char *
const ROI_X_SIZE;
00121
extern const char *
const ROI_X_RESOLUTION;
00122
extern const char *
const ROI_Y_SIZE;
00123
extern const char *
const ROI_Y_RESOLUTION;
00124
extern const char *
const ROI_Z_SIZE;
00125
extern const char *
const ROI_Z_RESOLUTION;
00126
extern const char *
const ROI_NUM_SEGMENTS;
00127
extern const char *
const ROI_PLANE;
00128
extern const char *
const ROI_SCAN_ID;
00129 }
00130
00131
#endif // __itkIOCommon_h