nifti1_io
|
00001 #ifndef _DBH_H_ 00002 #define _DBH_H_ 00003 00004 /* 00005 * 00006 * (c) Copyright, 1986-1994 00007 * Biomedical Imaging Resource 00008 * Mayo Foundation 00009 * 00010 * dbh.h 00011 * 00012 * 00013 * database sub-definitions 00014 */ 00015 00016 struct header_key /* header_key */ 00017 { /* off + size*/ 00018 int sizeof_hdr; /* 0 + 4 */ 00019 char data_type[10]; /* 4 + 10 */ 00020 char db_name[18]; /* 14 + 18 */ 00021 int extents; /* 32 + 4 */ 00022 short int session_error; /* 36 + 2 */ 00023 char regular; /* 38 + 1 */ 00024 char hkey_un0; /* 39 + 1 */ 00025 }; /* total=40 */ 00026 00027 struct image_dimension /* image_dimension */ 00028 { /* off + size*/ 00029 short int dim[8]; /* 0 + 16 */ 00030 char vox_units[4]; /* 16 + 4 */ 00031 char cal_units[8]; /* 20 + 4 */ 00032 short int unused1; /* 24 + 2 */ 00033 short int datatype; /* 30 + 2 */ 00034 short int bitpix; /* 32 + 2 */ 00035 short int dim_un0; /* 34 + 2 */ 00036 float pixdim[8]; /* 36 + 32 */ 00037 /* 00038 pixdim[] specifies the voxel dimensions: 00039 pixdim[1] - voxel width 00040 pixdim[2] - voxel height 00041 pixdim[3] - interslice distance 00042 ..etc 00043 */ 00044 float vox_offset; /* 68 + 4 */ 00045 float funused1; /* 72 + 4 */ 00046 float funused2; /* 76 + 4 */ 00047 float funused3; /* 80 + 4 */ 00048 float cal_max; /* 84 + 4 */ 00049 float cal_min; /* 88 + 4 */ 00050 int compressed; /* 92 + 4 */ 00051 int verified; /* 96 + 4 */ 00052 int glmax, glmin; /* 100 + 8 */ 00053 }; /* total=108 */ 00054 00055 struct data_history /* data_history */ 00056 { /* off + size*/ 00057 char descrip[80]; /* 0 + 80 */ 00058 char aux_file[24]; /* 80 + 24 */ 00059 char orient; /* 104 + 1 */ 00060 char originator[10]; /* 105 + 10 */ 00061 char generated[10]; /* 115 + 10 */ 00062 char scannum[10]; /* 125 + 10 */ 00063 char patient_id[10]; /* 135 + 10 */ 00064 char exp_date[10]; /* 145 + 10 */ 00065 char exp_time[10]; /* 155 + 10 */ 00066 char hist_un0[3]; /* 165 + 3 */ 00067 int views; /* 168 + 4 */ 00068 int vols_added; /* 172 + 4 */ 00069 int start_field; /* 176 + 4 */ 00070 int field_skip; /* 180 + 4 */ 00071 int omax,omin; /* 184 + 8 */ 00072 int smax,smin; /* 192 + 8 */ 00073 }; /* total=200 */ 00074 00075 struct dsr /* dsr */ 00076 { /* off + size*/ 00077 struct header_key hk; /* 0 + 40 */ 00078 struct image_dimension dime; /* 40 + 108 */ 00079 struct data_history hist; /* 148 + 200 */ 00080 }; /* total=348 */ 00081 00082 /* Acceptable values for hdr.dime.datatype */ 00083 00084 #define DT_NONE 0 00085 #define DT_UNKNOWN 0 00086 #define DT_BINARY 1 00087 #define DT_UNSIGNED_CHAR 2 00088 #define DT_SIGNED_SHORT 4 00089 #define DT_SIGNED_INT 8 00090 #define DT_FLOAT 16 00091 #define DT_COMPLEX 32 00092 #define DT_DOUBLE 64 00093 #define DT_RGB 128 00094 #define DT_ALL 255 00095 00096 typedef struct 00097 { 00098 float real; 00099 float imag; 00100 } COMPLEX; 00101 00102 #endif