| 1 |
|
| 2 |
/* |
| 3 |
* |
| 4 |
* (c) Copyright, 1986-1995 |
| 5 |
* Biomedical Imaging Resource |
| 6 |
* Mayo Foundation |
| 7 |
* |
| 8 |
* dbh.h |
| 9 |
* |
| 10 |
* |
| 11 |
* database sub-definitions |
| 12 |
*/ |
| 13 |
|
| 14 |
struct header_key /* header_key */ |
| 15 |
{ /* off + size*/ |
| 16 |
int sizeof_hdr; /* 0 + 4 */ |
| 17 |
char data_type[10]; /* 4 + 10 */ |
| 18 |
char db_name[18]; /* 14 + 18 */ |
| 19 |
int extents; /* 32 + 4 */ |
| 20 |
short int session_error; /* 36 + 2 */ |
| 21 |
char regular; /* 38 + 1 */ |
| 22 |
char hkey_un0; /* 39 + 1 */ |
| 23 |
}; /* total=40 */ |
| 24 |
|
| 25 |
struct image_dimension /* image_dimension */ |
| 26 |
{ /* off + size*/ |
| 27 |
short int dim[8]; /* 0 + 16 */ |
| 28 |
char vox_units[4]; /* 16 + 4 */ |
| 29 |
char cal_units[8]; /* 20 + 4 */ |
| 30 |
short int unused1; /* 24 + 2 */ |
| 31 |
short int datatype; /* 30 + 2 */ |
| 32 |
short int bitpix; /* 32 + 2 */ |
| 33 |
short int dim_un0; /* 34 + 2 */ |
| 34 |
float pixdim[8]; /* 36 + 32 */ |
| 35 |
/* |
| 36 |
pixdim[] specifies the voxel dimensions: |
| 37 |
pixdim[1] - voxel width |
| 38 |
pixdim[2] - voxel height |
| 39 |
pixdim[3] - interslice distance |
| 40 |
..etc |
| 41 |
*/ |
| 42 |
float vox_offset; /* 68 + 4 */ |
| 43 |
float funused1; /* 72 + 4 */ |
| 44 |
float funused2; /* 76 + 4 */ |
| 45 |
float funused3; /* 80 + 4 */ |
| 46 |
float cal_max; /* 84 + 4 */ |
| 47 |
float cal_min; /* 88 + 4 */ |
| 48 |
int compressed; /* 92 + 4 */ |
| 49 |
int verified; /* 96 + 4 */ |
| 50 |
int glmax, glmin; /* 100 + 8 */ |
| 51 |
}; /* total=108 */ |
| 52 |
|
| 53 |
struct data_history /* data_history */ |
| 54 |
{ /* off + size*/ |
| 55 |
char descrip[80]; /* 0 + 80 */ |
| 56 |
char aux_file[24]; /* 80 + 24 */ |
| 57 |
char orient; /* 104 + 1 */ |
| 58 |
char originator[10]; /* 105 + 10 */ |
| 59 |
char generated[10]; /* 115 + 10 */ |
| 60 |
char scannum[10]; /* 125 + 10 */ |
| 61 |
char patient_id[10]; /* 135 + 10 */ |
| 62 |
char exp_date[10]; /* 145 + 10 */ |
| 63 |
char exp_time[10]; /* 155 + 10 */ |
| 64 |
char hist_un0[3]; /* 165 + 3 */ |
| 65 |
int views; /* 168 + 4 */ |
| 66 |
int vols_added; /* 172 + 4 */ |
| 67 |
int start_field; /* 176 + 4 */ |
| 68 |
int field_skip; /* 180 + 4 */ |
| 69 |
int omax,omin; /* 184 + 8 */ |
| 70 |
int smax,smin; /* 192 + 8 */ |
| 71 |
}; /* total=200 */ |
| 72 |
|
| 73 |
struct dsr /* dsr */ |
| 74 |
{ /* off + size*/ |
| 75 |
struct header_key hk; /* 0 + 40 */ |
| 76 |
struct image_dimension dime; /* 40 + 108 */ |
| 77 |
struct data_history hist; /* 148 + 200 */ |
| 78 |
}; /* total=348 */ |
| 79 |
|
| 80 |
|
| 81 |
|
| 82 |
#define DT_NONE 0 |
| 83 |
#define DT_UNKNOWN 0 |
| 84 |
#define DT_BINARY 1 |
| 85 |
#define DT_UNSIGNED_CHAR 2 |
| 86 |
#define DT_SIGNED_SHORT 4 |
| 87 |
#define DT_SIGNED_INT 8 |
| 88 |
#define DT_FLOAT 16 |
| 89 |
#define DT_COMPLEX 32 |
| 90 |
#define DT_DOUBLE 64 |
| 91 |
#define DT_RGB 128 |
| 92 |
#define DT_ALL 255 |
| 93 |
|