Debian Codegraph @

conversion/dicomserver/siemens_dicom_to_minc.h

raw symbols SCIP
1 /* ----------------------------- MNI Header -----------------------------------
2 @NAME : siemens_dicom_to_minc.h
3 @DESCRIPTION: Header file for siemens_dicom_to_minc.h
4 @METHOD :
5 @GLOBALS :
6 @CALLS :
7 @CREATED : January 28, 1997 (Peter Neelin)
8 @MODIFIED :
9 * $Log: siemens_dicom_to_minc.h,v $
10 * Revision 6.1 1999-10-29 17:51:59 neelin
11 * Fixed Log keyword
12 *
13 * Revision 6.0 1997/09/12 13:24:27 neelin
14 * Release of minc version 0.6
15 *
16 * Revision 5.0 1997/08/21 13:25:26 neelin
17 * Release of minc version 0.5
18 *
19 * Revision 4.0 1997/05/07 20:06:20 neelin
20 * Release of minc version 0.4
21 *
22 * Revision 1.1 1997/03/04 20:56:47 neelin
23 * Initial revision
24 *
25 @COPYRIGHT :
26 Copyright 1997 Peter Neelin, McConnell Brain Imaging Centre,
27 Montreal Neurological Institute, McGill University.
28 Permission to use, copy, modify, and distribute this
29 software and its documentation for any purpose and without
30 fee is hereby granted, provided that the above copyright
31 notice appear in all copies. The author and McGill University
32 make no representations about the suitability of this
33 software for any purpose. It is provided "as is" without
34 express or implied warranty.
35 ---------------------------------------------------------------------------- */
36
37 #include <minc.h>
38
39 /* General constants */
40 #define SECONDS_PER_MINUTE 60
41 #define MINUTES_PER_HOUR 60
42 #define SECONDS_PER_HOUR (MINUTES_PER_HOUR*SECONDS_PER_MINUTE)
43 #define HOURS_PER_DAY 24
44 #define SECONDS_PER_DAY (HOURS_PER_DAY*SECONDS_PER_HOUR)
45 #define MS_PER_SECOND 1000
46 #define COORDINATE_EPSILON (100.0*FLT_EPSILON)
47
48 /* Default value for ncopts */
49 #define NCOPTS_DEFAULT NC_VERBOSE
50
51 /* MINC variable for dicom elements */
52 #define DICOM_ROOT_VAR "dicom_groups"
53
54 /* Possible MRI dimensions */
55 typedef enum { SLICE = 0, ECHO, TIME, PHASE, CHEM_SHIFT, MRI_NDIMS } Mri_Index;
56
57 /* World dimensions */
58 typedef enum { XCOORD = 0, YCOORD, ZCOORD, WORLD_NDIMS } World_Index;
59
60 /* Volume dimensions */
61 typedef enum { VSLICE = 0, VROW, VCOLUMN, VOL_NDIMS } Volume_Index;
62
63 /* Orientations */
64 typedef enum {TRANSVERSE = 0, SAGITTAL, CORONAL, NUM_ORIENTATIONS} Orientation;
65
66 /* String type */
67 typedef char Cstring[256];
68
69 /* Structure for general info about files */
70 typedef struct {
71 int initialized;
72 int study_id;
73 int acq_id; /* Time of scan */
74 int rec_num;
75 int image_type;
76 Cstring image_type_string;
77 int nrows;
78 int ncolumns;
79 int default_index[MRI_NDIMS]; /* Index for dimensions with size == 1 */
80 int size[MRI_NDIMS]; /* Size of dimension across these files */
81 int total_size[MRI_NDIMS]; /* Size of dimension across acquisition */
82 int *indices[MRI_NDIMS]; /* List of indices found for each dimension.
83 Only allocated when size > 1 */
84 int search_start[MRI_NDIMS]; /* Indices into lists for starting searches */
85 double *coordinates[MRI_NDIMS]; /* Array indicating coordinate of each
86 index in indices array */
87 int image_index[MRI_NDIMS]; /* Mapping from MRI dim to output image dim */
88 World_Index slice_world;
89 World_Index row_world;
90 World_Index column_world;
91 double step[WORLD_NDIMS];
92 double start[WORLD_NDIMS];
93 double dircos[WORLD_NDIMS][WORLD_NDIMS];
94 nc_type datatype;
95 int is_signed;
96 double pixel_min;
97 double pixel_max;
98 Cstring units;
99 double window_min;
100 double window_max;
101 struct {
102 Cstring name;
103 Cstring identification;
104 Cstring birth_date;
105 Cstring sex;
106 double weight;
107 } patient;
108 struct {
109 Cstring start_time;
110 Cstring modality;
111 Cstring manufacturer;
112 Cstring model;
113 Cstring institution;
114 Cstring station_id;
115 Cstring ref_physician;
116 Cstring procedure;
117 Cstring study_id;
118 Cstring acquisition_id;
119 } study;
120 struct {
121 Cstring scan_seq;
122 double rep_time;
123 double echo_time;
124 double inv_time;
125 double flip_angle;
126 double num_avg;
127 double imaging_freq;
128 Cstring imaged_nucl;
129 Cstring comments;
130 } acq;
131 Acr_Group group_list;
132 } General_Info;
133
134 /* Structure for file-specific info */
135 typedef struct {
136 int valid;
137 int bits_alloc;
138 int bits_stored;
139 int index[MRI_NDIMS];
140 double pixel_max;
141 double pixel_min;
142 double slice_max;
143 double slice_min;
144 double window_max;
145 double window_min;
146 double coordinate[MRI_NDIMS];
147 } File_Info;
148
149 /* Structure for image data */
150 typedef struct {
151 int free;
152 int nrows;
153 int ncolumns;
154 unsigned short *data;
155 } Image_Data;
156
157 /* Structure for sorting dimensions */
158 typedef struct {
159 int identifier;
160 int original_index;
161 double value;
162 } Sort_Element;