1 /* ----------------------------- MNI Header -----------------------------------
2 @NAME       : spi_element_defs.h
3 @DESCRIPTION: Element definitions for spi
4 @METHOD     :
5 @GLOBALS    :
6 @CALLS      :
7 @CREATED    : November 23, 1993 (Peter Neelin)
8 @MODIFIED   :
9 @COPYRIGHT  :
10               Copyright 1993 Peter Neelin, McConnell Brain Imaging Centre,
11               Montreal Neurological Institute, McGill University.
12 ---------------------------------------------------------------------------- */
13 
14 /* Define standard UID's */
15 #define ACR_MR_IMAGE_STORAGE_UID       "1.2.840.10008.5.1.4.1.1.4"
16 #define ACR_EXPLICIT_VR_BIG_END_UID    "1.2.840.10008.1.2.2"
17 #define ACR_EXPLICIT_VR_LITTLE_END_UID "1.2.840.10008.1.2.1"
18 #define ACR_IMPLICIT_VR_LITTLE_END_UID "1.2.840.10008.1.2"
19 #define ACR_APPLICATION_CONTEXT_UID    "1.2.840.10008.3.1.1.1"
20 
21 /* Define constants for accepting association */
22 #define ACR_ASSOC_RJ_CALLED_AP_TITLE_UNREC 7
23 #define ACR_ASSOC_RJ_NO_REASON 1
24 #define ACR_ASSOC_RJ_PERM 1
25 #define ACR_ASSOC_RJ_USER 1
26 #define ACR_ASSOC_PR_CN_ACCEPT 0
27 #define ACR_ASSOC_PR_CN_REJECT 1
28 #define ACR_PDU_ITEM_USER_INFORMATION 0x50
29 
30 /* Element number for images */
31 #define SPI_IMAGE_ELEMENT 0x0010
32 
33 /* Define recognition codes */
34 #define ACR_RECOGNITION_CODE "ACR-NEMA 1.0"
35 #define SPI_RECOGNITION_CODE "SPI Release 1 "
36 
37 /* Define commands */
38 #define ACR_C_STORE_RQ    0x0001
39 #define ACR_C_STORE_RSP   0x8001
40 #define ACR_UNKNOWN_COMMAND 0x0000
41 #define SENDq               0x0001
42 #define SENDp               0x8001
43 #define CANCELq             0x0FFF
44 #define CANCELp             0x8FFF
45 #define SPI_UNKNOWN_COMMAND 0x0000
46 #define GCBEGINq            0x0028
47 #define GCBEGINp            0x8028
48 #define READYq              0x0008
49 #define READYp              0x8008
50 #define GCENDq              0x0029
51 #define GCENDp              0x8029
52 
53 /* Define dataset type */
54 #define ACR_NULL_DATASET 0x0101
55 
56 /* Define status codes */
57 #define ACR_SUCCESS 0x0000
58 #define ACR_REFUSED 0xaf00
59 #define SPI_MEDIUM_NOT_AVAIL 0xa0000e10
60 
61 /* Define group numbers for message stuff */
62 #define ACR_MESSAGE_GID 0
63 #define SPI_MESSAGE_GID 1
64 #define ACR_IDENTIFYING_GID 0x0008
65 #define ACR_IMAGE_GID 0x0028
66 #define SPI_ACTUAL_IMAGE_GID 0x7fe0
67 #define SPI_SCANDATA_GID 0x8001
68 #define SPI_SPECTRADATA_GID 0x8101
69 #define SPI_RAWDATA_GID 0x8201
70 #define SPI_LABELDATA_GID 0x8301
71 
72 /* Define data object types */
73 #define ACR_IMAGE_OBJECT 0x0000
74 #define ACR_OTHER_OBJECT 0x0100
75 
76 /* Define data object sub-types */
77 #define SPI_SCANDATA_OBJECT    "SCAN_DATA"
78 #define SPI_SPECTRADATA_OBJECT "SPECTRA_DATA"
79 #define SPI_RAWDATA_OBJECT     "RAW_DATA"
80 #define SPI_LABELDATA_OBJECT   "LAB_DATA"
81 
82 /* Define acr-nema constants */
83 #define ACR_MODALITY_MR "MR"
84 
85 /* Define spi constants */
86 #define SPI_TRANSVERSE_ORIENTATION 1
87 #define SPI_SAGITTAL_ORIENTATION   2
88 #define SPI_CORONAL_ORIENTATION    3
89 #define SPI_DEFAULT_IMAGE_TYPE     2
90 
91 /* Element id's for ACR-NEMA */
92 GLOBAL_ELEMENT(ACR_Length_to_eom             , 0x0000, 0x0001, UL);
93 GLOBAL_ELEMENT(ACR_Affected_SOP_class_UID    , 0x0000, 0x0002, UI);
94 GLOBAL_ELEMENT(ACR_Recognition_code          , 0x0000, 0x0010, LO);
95 GLOBAL_ELEMENT(ACR_Command                   , 0x0000, 0x0100, US);
96 GLOBAL_ELEMENT(ACR_Message_id                , 0x0000, 0x0110, US);
97 GLOBAL_ELEMENT(ACR_Message_id_brt            , 0x0000, 0x0120, US);
98 GLOBAL_ELEMENT(ACR_Initiator                 , 0x0000, 0x0200, LO);
99 GLOBAL_ELEMENT(ACR_Receiver                  , 0x0000, 0x0300, LO);
100 GLOBAL_ELEMENT(ACR_Priority                  , 0x0000, 0x0700, US);
101 GLOBAL_ELEMENT(ACR_Dataset_type              , 0x0000, 0x0800, US);
102 GLOBAL_ELEMENT(ACR_Status                    , 0x0000, 0x0900, US);
103 GLOBAL_ELEMENT(ACR_Affected_SOP_instance_UID , 0x0000, 0x1000, UI);
104 
105 GLOBAL_ELEMENT(ACR_Data_set_type             , 0x0008, 0x0040, US);
106 GLOBAL_ELEMENT(ACR_Data_set_subtype          , 0x0008, 0x0041, LO);
107 GLOBAL_ELEMENT(ACR_Patient_name              , 0x0010, 0x0010, PN);
108 GLOBAL_ELEMENT(ACR_Study                     , 0x0020, 0x0010, IS);
109 GLOBAL_ELEMENT(ACR_Series                    , 0x0020, 0x0011, IS);
110 GLOBAL_ELEMENT(ACR_Acquisition               , 0x0020, 0x0012, IS);
111 GLOBAL_ELEMENT(ACR_Image                     , 0x0020, 0x0013, IS);
112 GLOBAL_ELEMENT(ACR_Image_location            , 0x0028, 0x0200, US);
113 GLOBAL_ELEMENT(ACR_Study_date            , 0x0008, 0x0020, DA);
114 GLOBAL_ELEMENT(ACR_Study_time            , 0x0008, 0x0030, TM);
115 GLOBAL_ELEMENT(ACR_Modality              , 0x0008, 0x0060, CS);
116 GLOBAL_ELEMENT(ACR_Manufacturer          , 0x0008, 0x0070, LO);
117 GLOBAL_ELEMENT(ACR_Institution_id        , 0x0008, 0x0080, LO);
118 GLOBAL_ELEMENT(ACR_Referring_physician   , 0x0008, 0x0090, PN);
119 GLOBAL_ELEMENT(ACR_Station_id            , 0x0008, 0x1010, SH);
120 GLOBAL_ELEMENT(ACR_Procedure_description , 0x0008, 0x1030, LO);
121 GLOBAL_ELEMENT(ACR_Manufacturer_model    , 0x0008, 0x1090, LO);
122 GLOBAL_ELEMENT(ACR_Patient_identification, 0x0010, 0x0020, LO);
123 GLOBAL_ELEMENT(ACR_Patient_birth_date    , 0x0010, 0x0030, DA);
124 GLOBAL_ELEMENT(ACR_Patient_sex           , 0x0010, 0x0040, CS);
125 GLOBAL_ELEMENT(ACR_Patient_weight        , 0x0010, 0x1030, DS);
126 GLOBAL_ELEMENT(ACR_Scanning_sequence     , 0x0018, 0x0020, CS);
127 GLOBAL_ELEMENT(ACR_Slice_thickness       , 0x0018, 0x0050, DS);
128 GLOBAL_ELEMENT(ACR_Repetition_time       , 0x0018, 0x0080, DS);
129 GLOBAL_ELEMENT(ACR_Echo_time             , 0x0018, 0x0081, DS);
130 GLOBAL_ELEMENT(ACR_Inversion_time        , 0x0018, 0x0082, DS);
131 GLOBAL_ELEMENT(ACR_Nr_of_averages        , 0x0018, 0x0083, DS);
132 GLOBAL_ELEMENT(ACR_Imaging_frequency     , 0x0018, 0x0084, DS);
133 GLOBAL_ELEMENT(ACR_Imaged_nucleus        , 0x0018, 0x0085, SH);
134 GLOBAL_ELEMENT(ACR_Echo_number           , 0x0018, 0x0086, IS);
135 GLOBAL_ELEMENT(ACR_Spacing_between_slices, 0x0018, 0x0088, DS);
136 GLOBAL_ELEMENT(ACR_Echo_train_length     , 0x0018, 0x0091, IS);
137 GLOBAL_ELEMENT(ACR_Acq_comments          , 0x0018, 0x4000, LT);
138 GLOBAL_ELEMENT(ACR_Rows                  , 0x0028, 0x0010, US);
139 GLOBAL_ELEMENT(ACR_Columns               , 0x0028, 0x0011, US);
140 GLOBAL_ELEMENT(ACR_Pixel_size            , 0x0028, 0x0030, DS);
141 GLOBAL_ELEMENT(ACR_Bits_allocated        , 0x0028, 0x0100, US);
142 GLOBAL_ELEMENT(ACR_Bits_stored           , 0x0028, 0x0101, US);
143 GLOBAL_ELEMENT(ACR_Smallest_pixel_value  , 0x0028, 0x0104, US);
144 GLOBAL_ELEMENT(ACR_Largest_pixel_value   , 0x0028, 0x0105, US);
145 GLOBAL_ELEMENT(ACR_Smallest_pixel_value_in_series , 0x0028, 0x0108, US);
146 GLOBAL_ELEMENT(ACR_Largest_pixel_value_in_series  , 0x0028, 0x0109, US);
147 GLOBAL_ELEMENT(ACR_Pixel_data            , 0x7fe0, 0x0010, OW);
148 
149 /* Element id's for SPI */
150 GLOBAL_ELEMENT(SPI_Recognition_code, 0x0001, 0x0010, LO);
151 GLOBAL_ELEMENT(SPI_Command         , 0x0001, 0x0018, US);
152 GLOBAL_ELEMENT(SPI_Status          , 0x0001, 0x0019, UL);
153 GLOBAL_ELEMENT(SPI_Session_id      , 0x0001, 0x0028, US);
154 GLOBAL_ELEMENT(SPI_Dataset_type    , 0x0001, 0x0040, US);
155 GLOBAL_ELEMENT(SPI_Delay_time      , 0x0001, 0x0060, US);
156 GLOBAL_ELEMENT(SPI_Nr_data_objects , 0x0001, 0x0081, US);
157 GLOBAL_ELEMENT(SPI_Operator_text   , 0x0001, 0x1060, ST);
158 GLOBAL_ELEMENT(SPI_Log_info        , 0x0001, 0x1070, ST);
159 GLOBAL_ELEMENT(SPI_Volume_name     , 0x0001, 0x1080, LO);
160 GLOBAL_ELEMENT(SPI_Creation_date   , 0x0001, 0x1081, DA);
161 GLOBAL_ELEMENT(SPI_Creation_time   , 0x0001, 0x1082, TM);
162 GLOBAL_ELEMENT(SPI_Volume_type     , 0x0001, 0x1083, CS);
163 GLOBAL_ELEMENT(SPI_Volume_status   , 0x0001, 0x1084, CS);
164 GLOBAL_ELEMENT(SPI_Space_left      , 0x0001, 0x1085, DS);
165 GLOBAL_ELEMENT(SPI_Nr_exams        , 0x0001, 0x1086, DS);
166 GLOBAL_ELEMENT(SPI_Nr_images       , 0x0001, 0x1087, DS);
167 GLOBAL_ELEMENT(SPI_Closing_date    , 0x0001, 0x1088, DA);
168 GLOBAL_ELEMENT(SPI_Perc_space_used , 0x0001, 0x1089, DS);
169 
170 GLOBAL_ELEMENT(SPI_Field_of_view           , 0x0019, 0x1000, DS);
171 GLOBAL_ELEMENT(SPI_Angulation_of_cc_axis   , 0x0019, 0x1005, DS);
172 GLOBAL_ELEMENT(SPI_Angulation_of_ap_axis   , 0x0019, 0x1006, DS);
173 GLOBAL_ELEMENT(SPI_Angulation_of_lr_axis   , 0x0019, 0x1007, DS);
174 GLOBAL_ELEMENT(SPI_Slice_orientation       , 0x0019, 0x100a, DS);
175 GLOBAL_ELEMENT(SPI_Off_center_lr           , 0x0019, 0x100b, DS);
176 GLOBAL_ELEMENT(SPI_Off_center_cc           , 0x0019, 0x100c, DS);
177 GLOBAL_ELEMENT(SPI_Off_center_ap           , 0x0019, 0x100d, DS);
178 GLOBAL_ELEMENT(SPI_Number_of_slices        , 0x0019, 0x100f, IS);
179 GLOBAL_ELEMENT(SPI_Slice_factor            , 0x0019, 0x1010, DS);
180 GLOBAL_ELEMENT(SPI_Flip_angle              , 0x0019, 0x101a, DS);
181 GLOBAL_ELEMENT(SPI_Number_of_dynamic_scans , 0x0019, 0x101b, IS);
182 GLOBAL_ELEMENT(SPI_dynamic_scan_begin_time , 0x0019, 0x1022, DS);
183 GLOBAL_ELEMENT(SPI_Number_of_phases        , 0x0019, 0x1069, IS);
184 GLOBAL_ELEMENT(SPI_Nr_of_chemical_shifts   , 0x0019, 0x1080, IS);
185 GLOBAL_ELEMENT(SPI_Number_of_echoes        , 0x0019, 0x10cf, IS);
186 GLOBAL_ELEMENT(SPI_Recon_resolution        , 0x0019, 0x1145, DS);
187 GLOBAL_ELEMENT(SPI_Reconstruction_number   , 0x0021, 0x1000, IS);
188 GLOBAL_ELEMENT(SPI_Image_type              , 0x0021, 0x1010, IS);
189 GLOBAL_ELEMENT(SPI_Slice_number            , 0x0021, 0x1020, IS);
190 GLOBAL_ELEMENT(SPI_Echo_number             , 0x0021, 0x1030, IS);
191 GLOBAL_ELEMENT(SPI_Chemical_shift_number   , 0x0021, 0x1035, IS);
192 GLOBAL_ELEMENT(SPI_Phase_number            , 0x0021, 0x1040, IS);
193 GLOBAL_ELEMENT(SPI_Dynamic_scan_number     , 0x0021, 0x1050, IS);
194 GLOBAL_ELEMENT(SPI_Ext_scale_minimum       , 0x0029, 0x1010, DS);
195 GLOBAL_ELEMENT(SPI_Ext_scale_maximum       , 0x0029, 0x1011, DS);
196 GLOBAL_ELEMENT(SPI_Ext_scale_units         , 0x0029, 0x1020, ST);
197 GLOBAL_ELEMENT(SPI_Fp_min                  , 0x0029, 0x1110, DS);
198 GLOBAL_ELEMENT(SPI_Fp_max                  , 0x0029, 0x1120, DS);
199 GLOBAL_ELEMENT(SPI_Fp_scaled_minimum       , 0x0029, 0x1130, DS);
200 GLOBAL_ELEMENT(SPI_Fp_scaled_maximum       , 0x0029, 0x1140, DS);
201 GLOBAL_ELEMENT(SPI_Fp_window_minimum       , 0x0029, 0x1150, DS);
202 GLOBAL_ELEMENT(SPI_Fp_window_maximum       , 0x0029, 0x1160, DS);
203 
204