aimsdata  5.0.5
Neuroimaging data handling
ge_imghdr.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 /* (ghost) 11-Nov-91 */
35 
36 #ifndef _GE_IMGHDR_H_
37 #define _GE_IMGHDR_H_
38 
39 #define RASPOINT float
40 #define REFCHANTYPE short int
41 #define IMATRIXTYPE short int
42 #define DIMXYTYPE float
43 #define PIXSIZETYPE float
44 #define BLOCK char
45 
46 
47 typedef struct imghdr{
48  int img_magic; /* image file unique magic number */
49  int img_hdr_length; /* length of header, also byte displacement to the 'pixel data area' */
50  int img_width; /* x-axis pixel count (image width, for example: 128, 256, 512) */
51  int img_height; /* y-axis pixel count (image height) */
52  int img_depth; /* number of bits in an uncompressed pixel (1, 8, 16, or 24 bits).
53  Note: NOT magnitude resolution (CT is 16 not 12) */
54  int img_compress; /* Fomm of compression and packing applied to file, where:
55  1 = IC_RECT Nor~compressed, normal rectangular image.
56  2 = IC_PACKED Image is line length map packed.
57  3 = IC_COMPRESSED Image is compressed via DCPM only
58  4 = IC_COMPACK Image is compressed and packed. */
59  int img_dwindow; /* default window width (stored image value range) */
60  int img_dievel; /* default level value (stored image value magnitude) */
61  int img_bgshade; /* default background shade for non-pixels during unpack */
62  int img_ovrtiow; /* pixel value to substitute when overtiow occcurs in GIP */
63  int img_undflow; /* pixel value to substitute when underflow occcurs in GIP */
64  int img_top_offset; /* number of (blank) lines at the top of the image.*/
65  int img_bot_offset; /* number of (blank) lines at the bottom of the image */
66  short img_version; /* version of the header structure IMG_HDR_VERSION */
67  unsigned short img_checksum; /* 16 bit end_around_carry sum of true image pixels a value of
68  zero indicates the checksum is not defined for this file */
69  int img_p_id; /* a byte disp to 'unique image identifier text table' */
70  int img_l_id; /* byte length of 'unique image identifier text table' */
71  int img_p_unpack; /* a byte disp to 'unpack control table '*/
72  int img_l_unpack; /* byte length of 'unpack control table' */
73  int img_p_compress; /* a byte disp to 'compression seed table' */
74  int img_l_compress; /* byte length of 'compression seed table' */
75  int img_p_histo; /* a byte disp to 'histogram control table' */
76  int img_l_histo; /* byte length of 'histogram control table' */
77  int img_p_text; /* a byte disp to 'text plane data' */
78  int img_l_text; /* byte length of 'text plane data' */
79  int img_p_graphics; /* a byte disp to 'graphics plane data' */
80  int img_l_graphics; /* byte length of 'graphks plane data' */
81  int img_p_dbHdr; /* a byte disp to 'data base header data' */
82  int img_l_dbHdr; /* byte length of 'data base header data' */
83  int img_level; /* value to add to the actual pixel d ata values to get the correct
84  annotation value. For CT, physical 0 means -1024 Hounsfield number. */
85  int img_p_user; /* byte displacement to 'user defined data' */
86  int img_l_user; /* byte length of 'user defined data' */
87  int img_p_suite; /* byte displacement to 'suite header data' */
88  int img_l_suite; /* byte length of 'suite header data' */
89  int img_p_exam; /* byte displacement to 'exam header data' */
90  int img_l_exam; /* byte length of 'exam' header data' */
91  int img_p_series; /* byte displacement to 'series header data' */
92  int img_l_series; /* byte length of 'series header data' */
93  int img_p_image; /* byte displacement to 'image header data' */
94  int img_l_image; /* byte iength of 'image header data' */
95 } ImgHdr;
96 
97 #endif
98 
int img_l_exam
Definition: ge_imghdr.h:90
int img_p_text
Definition: ge_imghdr.h:77
int img_dwindow
Definition: ge_imghdr.h:59
int img_dievel
Definition: ge_imghdr.h:60
int img_l_graphics
Definition: ge_imghdr.h:80
int img_p_series
Definition: ge_imghdr.h:91
int img_l_compress
Definition: ge_imghdr.h:74
int img_p_dbHdr
Definition: ge_imghdr.h:81
int img_bgshade
Definition: ge_imghdr.h:61
int img_hdr_length
Definition: ge_imghdr.h:49
int img_l_dbHdr
Definition: ge_imghdr.h:82
int img_l_series
Definition: ge_imghdr.h:92
int img_compress
Definition: ge_imghdr.h:54
int img_top_offset
Definition: ge_imghdr.h:64
int img_l_user
Definition: ge_imghdr.h:86
int img_p_suite
Definition: ge_imghdr.h:87
int img_p_unpack
Definition: ge_imghdr.h:71
struct imghdr ImgHdr
int img_l_image
Definition: ge_imghdr.h:94
int img_height
Definition: ge_imghdr.h:51
int img_ovrtiow
Definition: ge_imghdr.h:62
unsigned short img_checksum
Definition: ge_imghdr.h:67
int img_level
Definition: ge_imghdr.h:83
int img_l_text
Definition: ge_imghdr.h:78
int img_p_compress
Definition: ge_imghdr.h:73
int img_l_unpack
Definition: ge_imghdr.h:72
int img_p_graphics
Definition: ge_imghdr.h:79
int img_l_id
Definition: ge_imghdr.h:70
int img_magic
Definition: ge_imghdr.h:48
int img_p_histo
Definition: ge_imghdr.h:75
int img_depth
Definition: ge_imghdr.h:52
int img_l_suite
Definition: ge_imghdr.h:88
int img_width
Definition: ge_imghdr.h:50
int img_undflow
Definition: ge_imghdr.h:63
int img_p_image
Definition: ge_imghdr.h:93
int img_p_id
Definition: ge_imghdr.h:69
int img_p_user
Definition: ge_imghdr.h:85
int img_p_exam
Definition: ge_imghdr.h:89
int img_l_histo
Definition: ge_imghdr.h:76
short img_version
Definition: ge_imghdr.h:66
int img_bot_offset
Definition: ge_imghdr.h:65