Debian Codegraph @

conversion/ana2mnc/doc/spm_dbh.h

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