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