aimsdata
4.7.0
Neuroimaging data handling
dbh.h
Go to the documentation of this file.
1
/* This software and supporting documentation are distributed by
2
* Institut Federatif de Recherche 49
3
* CEA/NeuroSpin, Batiment 145,
4
* 91191 Gif-sur-Yvette cedex
5
* France
6
*
7
* This software is governed by the CeCILL-B license under
8
* French law and abiding by the rules of distribution of free software.
9
* You can use, modify and/or redistribute the software under the
10
* terms of the CeCILL-B license as circulated by CEA, CNRS
11
* and INRIA at the following URL "http://www.cecill.info".
12
*
13
* As a counterpart to the access to the source code and rights to copy,
14
* modify and redistribute granted by the license, users are provided only
15
* with a limited warranty and the software's author, the holder of the
16
* economic rights, and the successive licensors have only limited
17
* liability.
18
*
19
* In this respect, the user's attention is drawn to the risks associated
20
* with loading, using, modifying and/or developing or reproducing the
21
* software by the user in light of its specific status of free software,
22
* that may mean that it is complicated to manipulate, and that also
23
* therefore means that it is reserved for developers and experienced
24
* professionals having in-depth computer knowledge. Users are therefore
25
* encouraged to load and test the software's suitability as regards their
26
* requirements in conditions enabling the security of their systems and/or
27
* data to be ensured and, more generally, to use and operate it in the
28
* same conditions as regards security.
29
*
30
* The fact that you are presently reading this means that you have had
31
* knowledge of the CeCILL-B license and that you accept its terms.
32
*/
33
34
struct
header_key
/* header_key */
35
{
/* off + size*/
36
int
sizeof_hdr
;
/* 0 + 4 */
37
char
data_type
[10];
/* 4 + 10 */
38
char
db_name
[18];
/* 14 + 18 */
39
int
extents
;
/* 32 + 4 */
40
short
int
session_error
;
/* 36 + 2 */
41
char
regular
;
/* 38 + 1 */
42
char
hkey_un0
;
/* 39 + 1 */
43
};
/* total=40 */
44
45
struct
image_dimension
/* image_dimension */
46
{
/* off + size*/
47
short
int
dim[8];
/* 0 + 16 */
48
char
vox_units[4];
/* 16 + 4 */
49
char
cal_units[8];
/* 20 + 4 */
50
short
int
unused1
;
/* 24 + 2 */
51
short
int
datatype
;
/* 30 + 2 */
52
short
int
bitpix
;
/* 32 + 2 */
53
short
int
dim_un0
;
/* 34 + 2 */
54
float
pixdim[8];
/* 36 + 32 */
55
/*
56
pixdim[] specifies the voxel dimensions:
57
pixdim[1] - voxel width
58
pixdim[2] - voxel height
59
pixdim[3] - interslice distance
60
..etc
61
*/
62
float
vox_offset
;
/* 68 + 4 */
63
float
roi_scale
;
/* 72 + 4 */
64
float
funused1
;
/* 76 + 4 */
65
float
funused2
;
/* 80 + 4 */
66
float
cal_max
;
/* 84 + 4 */
67
float
cal_min
;
/* 88 + 4 */
68
int
compressed
;
/* 92 + 4 */
69
int
verified
;
/* 96 + 4 */
70
int
glmax,
glmin
;
/* 100 + 8 */
71
};
/* total=108 */
72
73
struct
data_history
/* data_history */
74
{
/* off + size*/
75
char
descrip[80];
/* 0 + 80 */
76
char
aux_file[24];
/* 80 + 24 */
77
char
orient
;
/* 104 + 1 */
78
char
originator[10];
/* 105 + 10 */
79
char
generated[10];
/* 115 + 10 */
80
char
scannum[10];
/* 125 + 10 */
81
char
patient_id[10];
/* 135 + 10 */
82
char
exp_date[10];
/* 145 + 10 */
83
char
exp_time[10];
/* 155 + 10 */
84
char
hist_un0[3];
/* 165 + 3 */
85
int
views
;
/* 168 + 4 */
86
int
vols_added
;
/* 172 + 4 */
87
int
start_field
;
/* 176 + 4 */
88
int
field_skip
;
/* 180 + 4 */
89
int
omax,
omin
;
/* 184 + 8 */
90
int
smax,
smin
;
/* 192 + 8 */
91
};
/* total=200 */
92
93
struct
dsr
/* dsr */
94
{
/* off + size*/
95
struct
header_key
hk;
/* 0 + 40 */
96
struct
image_dimension
dime;
/* 40 + 108 */
97
struct
data_history
hist;
/* 148 + 200 */
98
};
/* total=348 */
99
100
/* Acceptable values for hdr.dime.datatype */
101
102
#define DT_NONE 0
103
#define DT_UNKNOWN 0
104
#define DT_BINARY 1
105
#define DT_UNSIGNED_CHAR 2
106
#define DT_SIGNED_SHORT 4
107
#define DT_SIGNED_INT 8
108
#define DT_FLOAT 16
109
#define DT_COMPLEX 32
110
#define DT_DOUBLE 64
111
#define DT_RGB 128
112
#define DT_ALL 255
113
114
typedef
struct
115
{
116
float
real
;
117
float
imag
;
118
}
COMPLEX
;
119
image_dimension::dim_un0
short int dim_un0
Definition:
dbh.h:53
data_history::start_field
int start_field
Definition:
dbh.h:87
image_dimension::unused1
short int unused1
Definition:
dbh.h:50
image_dimension::roi_scale
float roi_scale
Definition:
dbh.h:63
COMPLEX::imag
float imag
Definition:
dbh.h:117
COMPLEX::real
float real
Definition:
dbh.h:116
header_key::data_type
char data_type[10]
Definition:
dbh.h:37
image_dimension::funused1
float funused1
Definition:
dbh.h:64
data_history::vols_added
int vols_added
Definition:
dbh.h:86
dsr
Definition:
dbh.h:93
header_key::extents
int extents
Definition:
dbh.h:39
data_history
Definition:
dbh.h:73
header_key::db_name
char db_name[18]
Definition:
dbh.h:38
image_dimension::cal_max
float cal_max
Definition:
dbh.h:66
header_key::session_error
short int session_error
Definition:
dbh.h:40
data_history::omin
int omin
Definition:
dbh.h:89
image_dimension::funused2
float funused2
Definition:
dbh.h:65
image_dimension::verified
int verified
Definition:
dbh.h:69
data_history::field_skip
int field_skip
Definition:
dbh.h:88
image_dimension::vox_offset
float vox_offset
Definition:
dbh.h:62
image_dimension::datatype
short int datatype
Definition:
dbh.h:51
image_dimension
Definition:
dbh.h:45
header_key::regular
char regular
Definition:
dbh.h:41
image_dimension::bitpix
short int bitpix
Definition:
dbh.h:52
data_history::views
int views
Definition:
dbh.h:85
image_dimension::compressed
int compressed
Definition:
dbh.h:68
header_key::sizeof_hdr
int sizeof_hdr
Definition:
dbh.h:36
image_dimension::glmin
int glmin
Definition:
dbh.h:70
header_key::hkey_un0
char hkey_un0
Definition:
dbh.h:42
data_history::smin
int smin
Definition:
dbh.h:90
data_history::orient
char orient
Definition:
dbh.h:77
header_key
Definition:
dbh.h:34
image_dimension::cal_min
float cal_min
Definition:
dbh.h:67
COMPLEX
Definition:
dbh.h:114
aims
io
dbh.h
Generated by
1.8.13