root / ImageMagick / trunk / coders / dcm.c

Revision 12033, 164.5 kB (checked in by cristy, 7 weeks ago)
Line 
1/*
2%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3%                                                                             %
4%                                                                             %
5%                                                                             %
6%                            DDDD    CCCC  M   M                              %
7%                            D   D  C      MM MM                              %
8%                            D   D  C      M M M                              %
9%                            D   D  C      M   M                              %
10%                            DDDD    CCCC  M   M                              %
11%                                                                             %
12%                                                                             %
13%                          Read DICOM Image Format.                           %
14%                                                                             %
15%                              Software Design                                %
16%                                John Cristy                                  %
17%                                 July 1992                                   %
18%                                                                             %
19%                                                                             %
20%  Copyright 1999-2008 ImageMagick Studio LLC, a non-profit organization      %
21%  dedicated to making software imaging solutions freely available.           %
22%                                                                             %
23%  You may not use this file except in compliance with the License.  You may  %
24%  obtain a copy of the License at                                            %
25%                                                                             %
26%    http://www.imagemagick.org/script/license.php                            %
27%                                                                             %
28%  Unless required by applicable law or agreed to in writing, software        %
29%  distributed under the License is distributed on an "AS IS" BASIS,          %
30%  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   %
31%  See the License for the specific language governing permissions and        %
32%  limitations under the License.                                             %
33%                                                                             %
34%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
35%
36%
37*/
38
39/*
40  Include declarations.
41*/
42#include "magick/studio.h"
43#include "magick/property.h"
44#include "magick/blob.h"
45#include "magick/blob-private.h"
46#include "magick/color.h"
47#include "magick/color-private.h"
48#include "magick/constitute.h"
49#include "magick/enhance.h"
50#include "magick/exception.h"
51#include "magick/exception-private.h"
52#include "magick/image.h"
53#include "magick/image-private.h"
54#include "magick/list.h"
55#include "magick/magick.h"
56#include "magick/memory_.h"
57#include "magick/monitor.h"
58#include "magick/monitor-private.h"
59#include "magick/resource_.h"
60#include "magick/quantum-private.h"
61#include "magick/static.h"
62#include "magick/string_.h"
63#include "magick/module.h"
64
65/*
66  Dicom medical image declarations.
67*/
68
69typedef struct _DicomInfo
70{
71  unsigned short
72    group,
73    element;
74
75  const char
76    *vr,
77    *description;
78} DicomInfo;
79
80static const DicomInfo
81  dicom_info[] =
82  {
83    { 0x0000, 0x0000, "UL", "Group Length" },
84    { 0x0000, 0x0001, "UL", "Command Length to End" },
85    { 0x0000, 0x0002, "UI", "Affected SOP Class UID" },
86    { 0x0000, 0x0003, "UI", "Requested SOP Class UID" },
87    { 0x0000, 0x0010, "LO", "Command Recognition Code" },
88    { 0x0000, 0x0100, "US", "Command Field" },
89    { 0x0000, 0x0110, "US", "Message ID" },
90    { 0x0000, 0x0120, "US", "Message ID Being Responded To" },
91    { 0x0000, 0x0200, "AE", "Initiator" },
92    { 0x0000, 0x0300, "AE", "Receiver" },
93    { 0x0000, 0x0400, "AE", "Find Location" },
94    { 0x0000, 0x0600, "AE", "Move Destination" },
95    { 0x0000, 0x0700, "US", "Priority" },
96    { 0x0000, 0x0800, "US", "Data Set Type" },
97    { 0x0000, 0x0850, "US", "Number of Matches" },
98    { 0x0000, 0x0860, "US", "Response Sequence Number" },
99    { 0x0000, 0x0900, "US", "Status" },
100    { 0x0000, 0x0901, "AT", "Offending Element" },
101    { 0x0000, 0x0902, "LO", "Exception Comment" },
102    { 0x0000, 0x0903, "US", "Exception ID" },
103    { 0x0000, 0x1000, "UI", "Affected SOP Instance UID" },
104    { 0x0000, 0x1001, "UI", "Requested SOP Instance UID" },
105    { 0x0000, 0x1002, "US", "Event Type ID" },
106    { 0x0000, 0x1005, "AT", "Attribute Identifier List" },
107    { 0x0000, 0x1008, "US", "Action Type ID" },
108    { 0x0000, 0x1020, "US", "Number of Remaining Suboperations" },
109    { 0x0000, 0x1021, "US", "Number of Completed Suboperations" },
110    { 0x0000, 0x1022, "US", "Number of Failed Suboperations" },
111    { 0x0000, 0x1023, "US", "Number of Warning Suboperations" },
112    { 0x0000, 0x1030, "AE", "Move Originator Application Entity Title" },
113    { 0x0000, 0x1031, "US", "Move Originator Message ID" },
114    { 0x0000, 0x4000, "LO", "Dialog Receiver" },
115    { 0x0000, 0x4010, "LO", "Terminal Type" },
116    { 0x0000, 0x5010, "SH", "Message Set ID" },
117    { 0x0000, 0x5020, "SH", "End Message Set" },
118    { 0x0000, 0x5110, "LO", "Display Format" },
119    { 0x0000, 0x5120, "LO", "Page Position ID" },
120    { 0x0000, 0x5130, "LO", "Text Format ID" },
121    { 0x0000, 0x5140, "LO", "Normal Reverse" },
122    { 0x0000, 0x5150, "LO", "Add Gray Scale" },
123    { 0x0000, 0x5160, "LO", "Borders" },
124    { 0x0000, 0x5170, "IS", "Copies" },
125    { 0x0000, 0x5180, "LO", "OldMagnificationType" },
126    { 0x0000, 0x5190, "LO", "Erase" },
127    { 0x0000, 0x51a0, "LO", "Print" },
128    { 0x0000, 0x51b0, "US", "Overlays" },
129    { 0x0002, 0x0000, "UL", "Meta Element Group Length" },
130    { 0x0002, 0x0001, "OB", "File Meta Information Version" },
131    { 0x0002, 0x0002, "UI", "Media Storage SOP Class UID" },
132    { 0x0002, 0x0003, "UI", "Media Storage SOP Instance UID" },
133    { 0x0002, 0x0010, "UI", "Transfer Syntax UID" },
134    { 0x0002, 0x0012, "UI", "Implementation Class UID" },
135    { 0x0002, 0x0013, "SH", "Implementation Version Name" },
136    { 0x0002, 0x0016, "AE", "Source Application Entity Title" },
137    { 0x0002, 0x0100, "UI", "Private Information Creator UID" },
138    { 0x0002, 0x0102, "OB", "Private Information" },
139    { 0x0003, 0x0000, "US", "?" },
140    { 0x0003, 0x0008, "US", "ISI Command Field" },
141    { 0x0003, 0x0011, "US", "Attach ID Application Code" },
142    { 0x0003, 0x0012, "UL", "Attach ID Message Count" },
143    { 0x0003, 0x0013, "DA", "Attach ID Date" },
144    { 0x0003, 0x0014, "TM", "Attach ID Time" },
145    { 0x0003, 0x0020, "US", "Message Type" },
146    { 0x0003, 0x0030, "DA", "Max Waiting Date" },
147    { 0x0003, 0x0031, "TM", "Max Waiting Time" },
148    { 0x0004, 0x0000, "UL", "File Set Group Length" },
149    { 0x0004, 0x1130, "CS", "File Set ID" },
150    { 0x0004, 0x1141, "CS", "File Set Descriptor File ID" },
151    { 0x0004, 0x1142, "CS", "File Set Descriptor File Specific Character Set" },
152    { 0x0004, 0x1200, "UL", "Root Directory Entity First Directory Record Offset" },
153    { 0x0004, 0x1202, "UL", "Root Directory Entity Last Directory Record Offset" },
154    { 0x0004, 0x1212, "US", "File Set Consistency Flag" },
155    { 0x0004, 0x1220, "SQ", "Directory Record Sequence" },
156    { 0x0004, 0x1400, "UL", "Next Directory Record Offset" },
157    { 0x0004, 0x1410, "US", "Record In Use Flag" },
158    { 0x0004, 0x1420, "UL", "Referenced Lower Level Directory Entity Offset" },
159    { 0x0004, 0x1430, "CS", "Directory Record Type" },
160    { 0x0004, 0x1432, "UI", "Private Record UID" },
161    { 0x0004, 0x1500, "CS", "Referenced File ID" },
162    { 0x0004, 0x1504, "UL", "MRDR Directory Record Offset" },
163    { 0x0004, 0x1510, "UI", "Referenced SOP Class UID In File" },
164    { 0x0004, 0x1511, "UI", "Referenced SOP Instance UID In File" },
165    { 0x0004, 0x1512, "UI", "Referenced Transfer Syntax UID In File" },
166    { 0x0004, 0x1600, "UL", "Number of References" },
167    { 0x0005, 0x0000, "US", "?" },
168    { 0x0006, 0x0000, "US", "?" },
169    { 0x0008, 0x0000, "UL", "Identifying Group Length" },
170    { 0x0008, 0x0001, "UL", "Length to End" },
171    { 0x0008, 0x0005, "CS", "Specific Character Set" },
172    { 0x0008, 0x0008, "CS", "Image Type" },
173    { 0x0008, 0x0010, "LO", "Recognition Code" },
174    { 0x0008, 0x0012, "DA", "Instance Creation Date" },
175    { 0x0008, 0x0013, "TM", "Instance Creation Time" },
176    { 0x0008, 0x0014, "UI", "Instance Creator UID" },
177    { 0x0008, 0x0016, "UI", "SOP Class UID" },
178    { 0x0008, 0x0018, "UI", "SOP Instance UID" },
179    { 0x0008, 0x0020, "DA", "Study Date" },
180    { 0x0008, 0x0021, "DA", "Series Date" },
181    { 0x0008, 0x0022, "DA", "Acquisition Date" },
182    { 0x0008, 0x0023, "DA", "Image Date" },
183    { 0x0008, 0x0024, "DA", "Overlay Date" },
184    { 0x0008, 0x0025, "DA", "Curve Date" },
185    { 0x0008, 0x0030, "TM", "Study Time" },
186    { 0x0008, 0x0031, "TM", "Series Time" },
187    { 0x0008, 0x0032, "TM", "Acquisition Time" },
188    { 0x0008, 0x0033, "TM", "Image Time" },
189    { 0x0008, 0x0034, "TM", "Overlay Time" },
190    { 0x0008, 0x0035, "TM", "Curve Time" },
191    { 0x0008, 0x0040, "xs", "Old Data Set Type" },
192    { 0x0008, 0x0041, "xs", "Old Data Set Subtype" },
193    { 0x0008, 0x0042, "CS", "Nuclear Medicine Series Type" },
194    { 0x0008, 0x0050, "SH", "Accession Number" },
195    { 0x0008, 0x0052, "CS", "Query/Retrieve Level" },
196    { 0x0008, 0x0054, "AE", "Retrieve AE Title" },
197    { 0x0008, 0x0058, "UI", "Failed SOP Instance UID List" },
198    { 0x0008, 0x0060, "CS", "Modality" },
199    { 0x0008, 0x0062, "SQ", "Modality Subtype" },
200    { 0x0008, 0x0064, "CS", "Conversion Type" },
201    { 0x0008, 0x0068, "CS", "Presentation Intent Type" },
202    { 0x0008, 0x0070, "LO", "Manufacturer" },
203    { 0x0008, 0x0080, "LO", "Institution Name" },
204    { 0x0008, 0x0081, "ST", "Institution Address" },
205    { 0x0008, 0x0082, "SQ", "Institution Code Sequence" },
206    { 0x0008, 0x0090, "PN", "Referring Physician's Name" },
207    { 0x0008, 0x0092, "ST", "Referring Physician's Address" },
208    { 0x0008, 0x0094, "SH", "Referring Physician's Telephone Numbers" },
209    { 0x0008, 0x0100, "SH", "Code Value" },
210    { 0x0008, 0x0102, "SH", "Coding Scheme Designator" },
211    { 0x0008, 0x0103, "SH", "Coding Scheme Version" },
212    { 0x0008, 0x0104, "LO", "Code Meaning" },
213    { 0x0008, 0x0105, "CS", "Mapping Resource" },
214    { 0x0008, 0x0106, "DT", "Context Group Version" },
215    { 0x0008, 0x010b, "CS", "Code Set Extension Flag" },
216    { 0x0008, 0x010c, "UI", "Private Coding Scheme Creator UID" },
217    { 0x0008, 0x010d, "UI", "Code Set Extension Creator UID" },
218    { 0x0008, 0x010f, "CS", "Context Identifier" },
219    { 0x0008, 0x1000, "LT", "Network ID" },
220    { 0x0008, 0x1010, "SH", "Station Name" },
221    { 0x0008, 0x1030, "LO", "Study Description" },
222    { 0x0008, 0x1032, "SQ", "Procedure Code Sequence" },
223    { 0x0008, 0x103e, "LO", "Series Description" },
224    { 0x0008, 0x1040, "LO", "Institutional Department Name" },
225    { 0x0008, 0x1048, "PN", "Physician of Record" },
226    { 0x0008, 0x1050, "PN", "Performing Physician's Name" },
227    { 0x0008, 0x1060, "PN", "Name of Physician(s) Reading Study" },
228    { 0x0008, 0x1070, "PN", "Operator's Name" },
229    { 0x0008, 0x1080, "LO", "Admitting Diagnosis Description" },
230    { 0x0008, 0x1084, "SQ", "Admitting Diagnosis Code Sequence" },
231    { 0x0008, 0x1090, "LO", "Manufacturer's Model Name" },
232    { 0x0008, 0x1100, "SQ", "Referenced Results Sequence" },
233    { 0x0008, 0x1110, "SQ", "Referenced Study Sequence" },
234    { 0x0008, 0x1111, "SQ", "Referenced Study Component Sequence" },
235    { 0x0008, 0x1115, "SQ", "Referenced Series Sequence" },
236    { 0x0008, 0x1120, "SQ", "Referenced Patient Sequence" },
237    { 0x0008, 0x1125, "SQ", "Referenced Visit Sequence" },
238    { 0x0008, 0x1130, "SQ", "Referenced Overlay Sequence" },
239    { 0x0008, 0x1140, "SQ", "Referenced Image Sequence" },
240    { 0x0008, 0x1145, "SQ", "Referenced Curve Sequence" },
241    { 0x0008, 0x1148, "SQ", "Referenced Previous Waveform" },
242    { 0x0008, 0x114a, "SQ", "Referenced Simultaneous Waveforms" },
243    { 0x0008, 0x114c, "SQ", "Referenced Subsequent Waveform" },
244    { 0x0008, 0x1150, "UI", "Referenced SOP Class UID" },
245    { 0x0008, 0x1155, "UI", "Referenced SOP Instance UID" },
246    { 0x0008, 0x1160, "IS", "Referenced Frame Number" },
247    { 0x0008, 0x1195, "UI", "Transaction UID" },
248    { 0x0008, 0x1197, "US", "Failure Reason" },
249    { 0x0008, 0x1198, "SQ", "Failed SOP Sequence" },
250    { 0x0008, 0x1199, "SQ", "Referenced SOP Sequence" },
251    { 0x0008, 0x2110, "CS", "Old Lossy Image Compression" },
252    { 0x0008, 0x2111, "ST", "Derivation Description" },
253    { 0x0008, 0x2112, "SQ", "Source Image Sequence" },
254    { 0x0008, 0x2120, "SH", "Stage Name" },
255    { 0x0008, 0x2122, "IS", "Stage Number" },
256    { 0x0008, 0x2124, "IS", "Number of Stages" },
257    { 0x0008, 0x2128, "IS", "View Number" },
258    { 0x0008, 0x2129, "IS", "Number of Event Timers" },
259    { 0x0008, 0x212a, "IS", "Number of Views in Stage" },
260    { 0x0008, 0x2130, "DS", "Event Elapsed Time(s)" },
261    { 0x0008, 0x2132, "LO", "Event Timer Name(s)" },
262    { 0x0008, 0x2142, "IS", "Start Trim" },
263    { 0x0008, 0x2143, "IS", "Stop Trim" },
264    { 0x0008, 0x2144, "IS", "Recommended Display Frame Rate" },
265    { 0x0008, 0x2200, "CS", "Transducer Position" },
266    { 0x0008, 0x2204, "CS", "Transducer Orientation" },
267    { 0x0008, 0x2208, "CS", "Anatomic Structure" },
268    { 0x0008, 0x2218, "SQ", "Anatomic Region Sequence" },
269    { 0x0008, 0x2220, "SQ", "Anatomic Region Modifier Sequence" },
270    { 0x0008, 0x2228, "SQ", "Primary Anatomic Structure Sequence" },
271    { 0x0008, 0x2230, "SQ", "Primary Anatomic Structure Modifier Sequence" },
272    { 0x0008, 0x2240, "SQ", "Transducer Position Sequence" },
273    { 0x0008, 0x2242, "SQ", "Transducer Position Modifier Sequence" },
274    { 0x0008, 0x2244, "SQ", "Transducer Orientation Sequence" },
275    { 0x0008, 0x2246, "SQ", "Transducer Orientation Modifier Sequence" },
276    { 0x0008, 0x2251, "SQ", "Anatomic Structure Space Or Region Code Sequence" },
277    { 0x0008, 0x2253, "SQ", "Anatomic Portal Of Entrance Code Sequence" },
278    { 0x0008, 0x2255, "SQ", "Anatomic Approach Direction Code Sequence" },
279    { 0x0008, 0x2256, "ST", "Anatomic Perspective Description" },
280    { 0x0008, 0x2257, "SQ", "Anatomic Perspective Code Sequence" },
281    { 0x0008, 0x2258, "ST", "Anatomic Location Of Examining Instrument Description" },
282    { 0x0008, 0x2259, "SQ", "Anatomic Location Of Examining Instrument Code Sequence" },
283    { 0x0008, 0x225a, "SQ", "Anatomic Structure Space Or Region Modifier Code Sequence" },
284    { 0x0008, 0x225c, "SQ", "OnAxis Background Anatomic Structure Code Sequence" },
285    { 0x0008, 0x4000, "LT", "Identifying Comments" },
286    { 0x0009, 0x0000, "xs", "?" },
287    { 0x0009, 0x0001, "xs", "?" },
288    { 0x0009, 0x0002, "xs", "?" },
289    { 0x0009, 0x0003, "xs", "?" },
290    { 0x0009, 0x0004, "xs", "?" },
291    { 0x0009, 0x0005, "UN", "?" },
292    { 0x0009, 0x0006, "UN", "?" },
293    { 0x0009, 0x0007, "UN", "?" },
294    { 0x0009, 0x0008, "xs", "?" },
295    { 0x0009, 0x0009, "LT", "?" },
296    { 0x0009, 0x000a, "IS", "?" },
297    { 0x0009, 0x000b, "IS", "?" },
298    { 0x0009, 0x000c, "IS", "?" },
299    { 0x0009, 0x000d, "IS", "?" },
300    { 0x0009, 0x000e, "IS", "?" },
301    { 0x0009, 0x000f, "UN", "?" },
302    { 0x0009, 0x0010, "xs", "?" },
303    { 0x0009, 0x0011, "xs", "?" },
304    { 0x0009, 0x0012, "xs", "?" },
305    { 0x0009, 0x0013, "xs", "?" },
306    { 0x0009, 0x0014, "xs", "?" },
307    { 0x0009, 0x0015, "xs", "?" },
308    { 0x0009, 0x0016, "xs", "?" },
309    { 0x0009, 0x0017, "LT", "?" },
310    { 0x0009, 0x0018, "LT", "Data Set Identifier" },
311    { 0x0009, 0x001a, "US", "?" },
312    { 0x0009, 0x001e, "UI", "?" },
313    { 0x0009, 0x0020, "xs", "?" },
314    { 0x0009, 0x0021, "xs", "?" },
315    { 0x0009, 0x0022, "SH", "User Orientation" },
316    { 0x0009, 0x0023, "SL", "Initiation Type" },
317    { 0x0009, 0x0024, "xs", "?" },
318    { 0x0009, 0x0025, "xs", "?" },
319    { 0x0009, 0x0026, "xs", "?" },
320    { 0x0009, 0x0027, "xs", "?" },
321    { 0x0009, 0x0029, "xs", "?" },
322    { 0x0009, 0x002a, "SL", "?" },
323    { 0x0009, 0x002c, "LO", "Series Comments" },
324    { 0x0009, 0x002d, "SL", "Track Beat Average" },
325    { 0x0009, 0x002e, "FD", "Distance Prescribed" },
326    { 0x0009, 0x002f, "LT", "?" },
327    { 0x0009, 0x0030, "xs", "?" },
328    { 0x0009, 0x0031, "xs", "?" },
329    { 0x0009, 0x0032, "LT", "?" },
330    { 0x0009, 0x0034, "xs", "?" },
331    { 0x0009, 0x0035, "SL", "Gantry Locus Type" },
332    { 0x0009, 0x0037, "SL", "Starting Heart Rate" },
333    { 0x0009, 0x0038, "xs", "?" },
334    { 0x0009, 0x0039, "SL", "RR Window Offset" },
335    { 0x0009, 0x003a, "SL", "Percent Cycle Imaged" },
336    { 0x0009, 0x003e, "US", "?" },
337    { 0x0009, 0x003f, "US", "?" },
338    { 0x0009, 0x0040, "xs", "?" },
339    { 0x0009, 0x0041, "xs", "?" },
340    { 0x0009, 0x0042, "xs", "?" },
341    { 0x0009, 0x0043, "xs", "?" },
342    { 0x0009, 0x0050, "LT", "?" },
343    { 0x0009, 0x0051, "xs", "?" },
344    { 0x0009, 0x0060, "LT", "?" },
345    { 0x0009, 0x0061, "LT", "Series Unique Identifier" },
346    { 0x0009, 0x0070, "LT", "?" },
347    { 0x0009, 0x0080, "LT", "?" },
348    { 0x0009, 0x0091, "LT", "?" },
349    { 0x0009, 0x00e2, "LT", "?" },
350    { 0x0009, 0x00e3, "UI", "Equipment UID" },
351    { 0x0009, 0x00e6, "SH", "Genesis Version Now" },
352    { 0x0009, 0x00e7, "UL", "Exam Record Checksum" },
353    { 0x0009, 0x00e8, "UL", "?" },
354    { 0x0009, 0x00e9, "SL", "Actual Series Data Time Stamp" },
355    { 0x0009, 0x00f2, "UN", "?" },
356    { 0x0009, 0x00f3, "UN", "?" },
357    { 0x0009, 0x00f4, "LT", "?" },
358    { 0x0009, 0x00f5, "xs", "?" },
359    { 0x0009, 0x00f6, "LT", "PDM Data Object Type Extension" },
360    { 0x0009, 0x00f8, "US", "?" },
361    { 0x0009, 0x00fb, "IS", "?" },
362    { 0x0009, 0x1002, "OB", "?" },
363    { 0x0009, 0x1003, "OB", "?" },
364    { 0x0009, 0x1010, "UN", "?" },
365    { 0x0010, 0x0000, "UL", "Patient Group Length" },
366    { 0x0010, 0x0010, "PN", "Patient's Name" },
367    { 0x0010, 0x0020, "LO", "Patient's ID" },
368    { 0x0010, 0x0021, "LO", "Issuer of Patient's ID" },
369    { 0x0010, 0x0030, "DA", "Patient's Birth Date" },
370    { 0x0010, 0x0032, "TM", "Patient's Birth Time" },
371    { 0x0010, 0x0040, "CS", "Patient's Sex" },
372    { 0x0010, 0x0050, "SQ", "Patient's Insurance Plan Code Sequence" },
373    { 0x0010, 0x1000, "LO", "Other Patient's ID's" },
374    { 0x0010, 0x1001, "PN", "Other Patient's Names" },
375    { 0x0010, 0x1005, "PN", "Patient's Birth Name" },
376    { 0x0010, 0x1010, "AS", "Patient's Age" },
377    { 0x0010, 0x1020, "DS", "Patient's Size" },
378    { 0x0010, 0x1030, "DS", "Patient's Weight" },
379    { 0x0010, 0x1040, "LO", "Patient's Address" },
380    { 0x0010, 0x1050, "LT", "Insurance Plan Identification" },
381    { 0x0010, 0x1060, "PN", "Patient's Mother's Birth Name" },
382    { 0x0010, 0x1080, "LO", "Military Rank" },
383    { 0x0010, 0x1081, "LO", "Branch of Service" },
384    { 0x0010, 0x1090, "LO", "Medical Record Locator" },
385    { 0x0010, 0x2000, "LO", "Medical Alerts" },
386    { 0x0010, 0x2110, "LO", "Contrast Allergies" },
387    { 0x0010, 0x2150, "LO", "Country of Residence" },
388    { 0x0010, 0x2152, "LO", "Region of Residence" },
389    { 0x0010, 0x2154, "SH", "Patients Telephone Numbers" },
390    { 0x0010, 0x2160, "SH", "Ethnic Group" },
391    { 0x0010, 0x2180, "SH", "Occupation" },
392    { 0x0010, 0x21a0, "CS", "Smoking Status" },
393    { 0x0010, 0x21b0, "LT", "Additional Patient History" },
394    { 0x0010, 0x21c0, "US", "Pregnancy Status" },
395    { 0x0010, 0x21d0, "DA", "Last Menstrual Date" },
396    { 0x0010, 0x21f0, "LO", "Patients Religious Preference" },
397    { 0x0010, 0x4000, "LT", "Patient Comments" },
398    { 0x0011, 0x0001, "xs", "?" },
399    { 0x0011, 0x0002, "US", "?" },
400    { 0x0011, 0x0003, "LT", "Patient UID" },
401    { 0x0011, 0x0004, "LT", "Patient ID" },
402    { 0x0011, 0x000a, "xs", "?" },
403    { 0x0011, 0x000b, "SL", "Effective Series Duration" },
404    { 0x0011, 0x000c, "SL", "Num Beats" },
405    { 0x0011, 0x000d, "LO", "Radio Nuclide Name" },
406    { 0x0011, 0x0010, "xs", "?" },
407    { 0x0011, 0x0011, "xs", "?" },
408    { 0x0011, 0x0012, "LO", "Dataset Name" },
409    { 0x0011, 0x0013, "LO", "Dataset Type" },
410    { 0x0011, 0x0015, "xs", "?" },
411    { 0x0011, 0x0016, "SL", "Energy Number" },
412    { 0x0011, 0x0017, "SL", "RR Interval Window Number" },
413    { 0x0011, 0x0018, "SL", "MG Bin Number" },
414    { 0x0011, 0x0019, "FD", "Radius Of Rotation" },
415    { 0x0011, 0x001a, "SL", "Detector Count Zone" },
416    { 0x0011, 0x001b, "SL", "Num Energy Windows" },
417    { 0x0011, 0x001c, "SL", "Energy Offset" },
418    { 0x0011, 0x001d, "SL", "Energy Range" },
419    { 0x0011, 0x001f, "SL", "Image Orientation" },
420    { 0x0011, 0x0020, "xs", "?" },
421    { 0x0011, 0x0021, "xs", "?" },
422    { 0x0011, 0x0022, "xs", "?" },
423    { 0x0011, 0x0023, "xs", "?" },
424    { 0x0011, 0x0024, "SL", "FOV Mask Y Cutoff Angle" },
425    { 0x0011, 0x0025, "xs", "?" },
426    { 0x0011, 0x0026, "SL", "Table Orientation" },
427    { 0x0011, 0x0027, "SL", "ROI Top Left" },
428    { 0x0011, 0x0028, "SL", "ROI Bottom Right" },
429    { 0x0011, 0x0030, "xs", "?" },
430    { 0x0011, 0x0031, "xs", "?" },
431    { 0x0011, 0x0032, "UN", "?" },
432    { 0x0011, 0x0033, "LO", "Energy Correct Name" },
433    { 0x0011, 0x0034, "LO", "Spatial Correct Name" },
434    { 0x0011, 0x0035, "xs", "?" },
435    { 0x0011, 0x0036, "LO", "Uniformity Correct Name" },
436    { 0x0011, 0x0037, "LO", "Acquisition Specific Correct Name" },
437    { 0x0011, 0x0038, "SL", "Byte Order" },
438    { 0x0011, 0x003a, "SL", "Picture Format" },
439    { 0x0011, 0x003b, "FD", "Pixel Scale" },
440    { 0x0011, 0x003c, "FD", "Pixel Offset" },
441    { 0x0011, 0x003e, "SL", "FOV Shape" },
442    { 0x0011, 0x003f, "SL", "Dataset Flags" },
443    { 0x0011, 0x0040, "xs", "?" },
444    { 0x0011, 0x0041, "LT", "Medical Alerts" },
445    { 0x0011, 0x0042, "LT", "Contrast Allergies" },
446    { 0x0011, 0x0044, "FD", "Threshold Center" },
447    { 0x0011, 0x0045, "FD", "Threshold Width" },
448    { 0x0011, 0x0046, "SL", "Interpolation Type" },
449    { 0x0011, 0x0055, "FD", "Period" },
450    { 0x0011, 0x0056, "FD", "ElapsedTime" },
451    { 0x0011, 0x00a1, "DA", "Patient Registration Date" },
452    { 0x0011, 0x00a2, "TM", "Patient Registration Time" },
453    { 0x0011, 0x00b0, "LT", "Patient Last Name" },
454    { 0x0011, 0x00b2, "LT", "Patient First Name" },
455    { 0x0011, 0x00b4, "LT", "Patient Hospital Status" },
456    { 0x0011, 0x00bc, "TM", "Current Location Time" },
457    { 0x0011, 0x00c0, "LT", "Patient Insurance Status" },
458    { 0x0011, 0x00d0, "LT", "Patient Billing Type" },
459    { 0x0011, 0x00d2, "LT", "Patient Billing Address" },
460    { 0x0013, 0x0000, "LT", "Modifying Physician" },
461    { 0x0013, 0x0010, "xs", "?" },
462    { 0x0013, 0x0011, "SL", "?" },
463    { 0x0013, 0x0012, "xs", "?" },
464    { 0x0013, 0x0016, "SL", "AutoTrack Peak" },
465    { 0x0013, 0x0017, "SL", "AutoTrack Width" },
466    { 0x0013, 0x0018, "FD", "Transmission Scan Time" },
467    { 0x0013, 0x0019, "FD", "Transmission Mask Width" },
468    { 0x0013, 0x001a, "FD", "Copper Attenuator Thickness" },
469    { 0x0013, 0x001c, "FD", "?" },
470    { 0x0013, 0x001d, "FD", "?" },
471    { 0x0013, 0x001e, "FD", "Tomo View Offset" },
472    { 0x0013, 0x0020, "LT", "Patient Name" },
473    { 0x0013, 0x0022, "LT", "Patient Id" },
474    { 0x0013, 0x0026, "LT", "Study Comments" },
475    { 0x0013, 0x0030, "DA", "Patient Birthdate" },
476    { 0x0013, 0x0031, "DS", "Patient Weight" },
477    { 0x0013, 0x0032, "LT", "Patients Maiden Name" },
478    { 0x0013, 0x0033, "LT", "Referring Physician" },
479    { 0x0013, 0x0034, "LT", "Admitting Diagnosis" },
480    { 0x0013, 0x0035, "LT", "Patient Sex" },
481    { 0x0013, 0x0040, "LT", "Procedure Description" },
482    { 0x0013, 0x0042, "LT", "Patient Rest Direction" },
483    { 0x0013, 0x0044, "LT", "Patient Position" },
484    { 0x0013, 0x0046, "LT", "View Direction" },
485    { 0x0015, 0x0001, "DS", "Stenosis Calibration Ratio" },
486    { 0x0015, 0x0002, "DS", "Stenosis Magnification" },
487    { 0x0015, 0x0003, "DS", "Cardiac Calibration Ratio" },
488    { 0x0018, 0x0000, "UL", "Acquisition Group Length" },
489    { 0x0018, 0x0010, "LO", "Contrast/Bolus Agent" },
490    { 0x0018, 0x0012, "SQ", "Contrast/Bolus Agent Sequence" },
491    { 0x0018, 0x0014, "SQ", "Contrast/Bolus Administration Route Sequence" },
492    { 0x0018, 0x0015, "CS", "Body Part Examined" },
493    { 0x0018, 0x0020, "CS", "Scanning Sequence" },
494    { 0x0018, 0x0021, "CS", "Sequence Variant" },
495    { 0x0018, 0x0022, "CS", "Scan Options" },
496    { 0x0018, 0x0023, "CS", "MR Acquisition Type" },
497    { 0x0018, 0x0024, "SH", "Sequence Name" },
498    { 0x0018, 0x0025, "CS", "Angio Flag" },
499    { 0x0018, 0x0026, "SQ", "Intervention Drug Information Sequence" },
500    { 0x0018, 0x0027, "TM", "Intervention Drug Stop Time" },
501    { 0x0018, 0x0028, "DS", "Intervention Drug Dose" },
502    { 0x0018, 0x0029, "SQ", "Intervention Drug Code Sequence" },
503    { 0x0018, 0x002a, "SQ", "Additional Drug Sequence" },
504    { 0x0018, 0x0030, "LO", "Radionuclide" },
505    { 0x0018, 0x0031, "LO", "Radiopharmaceutical" },
506    { 0x0018, 0x0032, "DS", "Energy Window Centerline" },
507    { 0x0018, 0x0033, "DS", "Energy Window Total Width" },
508    { 0x0018, 0x0034, "LO", "Intervention Drug Name" },
509    { 0x0018, 0x0035, "TM", "Intervention Drug Start Time" },
510    { 0x0018, 0x0036, "SQ", "Intervention Therapy Sequence" },
511    { 0x0018, 0x0037, "CS", "Therapy Type" },
512    { 0x0018, 0x0038, "CS", "Intervention Status" },
513    { 0x0018, 0x0039, "CS", "Therapy Description" },
514    { 0x0018, 0x0040, "IS", "Cine Rate" },
515    { 0x0018, 0x0050, "DS", "Slice Thickness" },
516    { 0x0018, 0x0060, "DS", "KVP" },
517    { 0x0018, 0x0070, "IS", "Counts Accumulated" },
518    { 0x0018, 0x0071, "CS", "Acquisition Termination Condition" },
519    { 0x0018, 0x0072, "DS", "Effective Series Duration" },
520    { 0x0018, 0x0073, "CS", "Acquisition Start Condition" },
521    { 0x0018, 0x0074, "IS", "Acquisition Start Condition Data" },
522    { 0x0018, 0x0075, "IS", "Acquisition Termination Condition Data" },
523    { 0x0018, 0x0080, "DS", "Repetition Time" },
524    { 0x0018, 0x0081, "DS", "Echo Time" },
525    { 0x0018, 0x0082, "DS", "Inversion Time" },
526    { 0x0018, 0x0083, "DS", "Number of Averages" },
527    { 0x0018, 0x0084, "DS", "Imaging Frequency" },
528    { 0x0018, 0x0085, "SH", "Imaged Nucleus" },
529    { 0x0018, 0x0086, "IS", "Echo Number(s)" },
530    { 0x0018, 0x0087, "DS", "Magnetic Field Strength" },
531    { 0x0018, 0x0088, "DS", "Spacing Between Slices" },
532    { 0x0018, 0x0089, "IS", "Number of Phase Encoding Steps" },
533    { 0x0018, 0x0090, "DS", "Data Collection Diameter" },
534    { 0x0018, 0x0091, "IS", "Echo Train Length" },
535    { 0x0018, 0x0093, "DS", "Percent Sampling" },
536    { 0x0018, 0x0094, "DS", "Percent Phase Field of View" },
537    { 0x0018, 0x0095, "DS", "Pixel Bandwidth" },
538    { 0x0018, 0x1000, "LO", "Device Serial Number" },
539    { 0x0018, 0x1004, "LO", "Plate ID" },
540    { 0x0018, 0x1010, "LO", "Secondary Capture Device ID" },
541    { 0x0018, 0x1012, "DA", "Date of Secondary Capture" },
542    { 0x0018, 0x1014, "TM", "Time of Secondary Capture" },
543    { 0x0018, 0x1016, "LO", "Secondary Capture Device Manufacturer" },
544    { 0x0018, 0x1018, "LO", "Secondary Capture Device Manufacturer Model Name" },
545    { 0x0018, 0x1019, "LO", "Secondary Capture Device Software Version(s)" },
546    { 0x0018, 0x1020, "LO", "Software Version(s)" },
547    { 0x0018, 0x1022, "SH", "Video Image Format Acquired" },
548    { 0x0018, 0x1023, "LO", "Digital Image Format Acquired" },
549    { 0x0018, 0x1030, "LO", "Protocol Name" },
550    { 0x0018, 0x1040, "LO", "Contrast/Bolus Route" },
551    { 0x0018, 0x1041, "DS", "Contrast/Bolus Volume" },
552    { 0x0018, 0x1042, "TM", "Contrast/Bolus Start Time" },
553    { 0x0018, 0x1043, "TM", "Contrast/Bolus Stop Time" },
554    { 0x0018, 0x1044, "DS", "Contrast/Bolus Total Dose" },
555    { 0x0018, 0x1045, "IS", "Syringe Counts" },
556    { 0x0018, 0x1046, "DS", "Contrast Flow Rate" },
557    { 0x0018, 0x1047, "DS", "Contrast Flow Duration" },
558    { 0x0018, 0x1048, "CS", "Contrast/Bolus Ingredient" },
559    { 0x0018, 0x1049, "DS", "Contrast/Bolus Ingredient Concentration" },
560    { 0x0018, 0x1050, "DS", "Spatial Resolution" },
561    { 0x0018, 0x1060, "DS", "Trigger Time" },
562    { 0x0018, 0x1061, "LO", "Trigger Source or Type" },
563    { 0x0018, 0x1062, "IS", "Nominal Interval" },
564    { 0x0018, 0x1063, "DS", "Frame Time" },
565    { 0x0018, 0x1064, "LO", "Framing Type" },
566    { 0x0018, 0x1065, "DS", "Frame Time Vector" },
567    { 0x0018, 0x1066, "DS", "Frame Delay" },
568    { 0x0018, 0x1067, "DS", "Image Trigger Delay" },
569    { 0x0018, 0x1068, "DS", "Group Time Offset" },
570    { 0x0018, 0x1069, "DS", "Trigger Time Offset" },
571    { 0x0018, 0x106a, "CS", "Synchronization Trigger" },
572    { 0x0018, 0x106b, "UI", "Synchronization Frame of Reference" },
573    { 0x0018, 0x106e, "UL", "Trigger Sample Position" },
574    { 0x0018, 0x1070, "LO", "Radiopharmaceutical Route" },
575    { 0x0018, 0x1071, "DS", "Radiopharmaceutical Volume" },
576    { 0x0018, 0x1072, "TM", "Radiopharmaceutical Start Time" },
577    { 0x0018, 0x1073, "TM", "Radiopharmaceutical Stop Time" },
578    { 0x0018, 0x1074, "DS", "Radionuclide Total Dose" },
579    { 0x0018, 0x1075, "DS", "Radionuclide Half Life" },
580    { 0x0018, 0x1076, "DS", "Radionuclide Positron Fraction" },
581    { 0x0018, 0x1077, "DS", "Radiopharmaceutical Specific Activity" },
582    { 0x0018, 0x1080, "CS", "Beat Rejection Flag" },
583    { 0x0018, 0x1081, "IS", "Low R-R Value" },
584    { 0x0018, 0x1082, "IS", "High R-R Value" },
585    { 0x0018, 0x1083, "IS", "Intervals Acquired" },
586    { 0x0018, 0x1084, "IS", "Intervals Rejected" },
587    { 0x0018, 0x1085, "LO", "PVC Rejection" },
588    { 0x0018, 0x1086, "IS", "Skip Beats" },
589    { 0x0018, 0x1088, "IS", "Heart Rate" },
590    { 0x0018, 0x1090, "IS", "Cardiac Number of Images" },
591    { 0x0018, 0x1094, "IS", "Trigger Window" },
592    { 0x0018, 0x1100, "DS", "Reconstruction Diameter" },
593    { 0x0018, 0x1110, "DS", "Distance Source to Detector" },
594    { 0x0018, 0x1111, "DS", "Distance Source to Patient" },
595    { 0x0018, 0x1114, "DS", "Estimated Radiographic Magnification Factor" },
596    { 0x0018, 0x1120, "DS", "Gantry/Detector Tilt" },
597    { 0x0018, 0x1121, "DS", "Gantry/Detector Slew" },
598    { 0x0018, 0x1130, "DS", "Table Height" },
599    { 0x0018, 0x1131, "DS", "Table Traverse" },
600    { 0x0018, 0x1134, "CS", "Table Motion" },
601    { 0x0018, 0x1135, "DS", "Table Vertical Increment" },
602    { 0x0018, 0x1136, "DS", "Table Lateral Increment" },
603    { 0x0018, 0x1137, "DS", "Table Longitudinal Increment" },
604    { 0x0018, 0x1138, "DS", "Table Angle" },
605    { 0x0018, 0x113a, "CS", "Table Type" },
606    { 0x0018, 0x1140, "CS", "Rotation Direction" },
607    { 0x0018, 0x1141, "DS", "Angular Position" },
608    { 0x0018, 0x1142, "DS", "Radial Position" },
609    { 0x0018, 0x1143, "DS", "Scan Arc" },
610    { 0x0018, 0x1144, "DS", "Angular Step" },
611    { 0x0018, 0x1145, "DS", "Center of Rotation Offset" },
612    { 0x0018, 0x1146, "DS", "Rotation Offset" },
613    { 0x0018, 0x1147, "CS", "Field of View Shape" },
614    { 0x0018, 0x1149, "IS", "Field of View Dimension(s)" },
615    { 0x0018, 0x1150, "IS", "Exposure Time" },
616    { 0x0018, 0x1151, "IS", "X-ray Tube Current" },
617    { 0x0018, 0x1152, "IS", "Exposure" },
618    { 0x0018, 0x1153, "IS", "Exposure in uAs" },
619    { 0x0018, 0x1154, "DS", "AveragePulseWidth" },
620    { 0x0018, 0x1155, "CS", "RadiationSetting" },
621    { 0x0018, 0x1156, "CS", "Rectification Type" },
622    { 0x0018, 0x115a, "CS", "RadiationMode" },
623    { 0x0018, 0x115e, "DS", "ImageAreaDoseProduct" },
624    { 0x0018, 0x1160, "SH", "Filter Type" },
625    { 0x0018, 0x1161, "LO", "TypeOfFilters" },
626    { 0x0018, 0x1162, "DS", "IntensifierSize" },
627    { 0x0018, 0x1164, "DS", "ImagerPixelSpacing" },
628    { 0x0018, 0x1166, "CS", "Grid" },
629    { 0x0018, 0x1170, "IS", "Generator Power" },
630    { 0x0018, 0x1180, "SH", "Collimator/Grid Name" },
631    { 0x0018, 0x1181, "CS", "Collimator Type" },
632    { 0x0018, 0x1182, "IS", "Focal Distance" },
633    { 0x0018, 0x1183, "DS", "X Focus Center" },
634    { 0x0018, 0x1184, "DS", "Y Focus Center" },
635    { 0x0018, 0x1190, "DS", "Focal Spot(s)" },
636    { 0x0018, 0x1191, "CS", "Anode Target Material" },
637    { 0x0018, 0x11a0, "DS", "Body Part Thickness" },
638    { 0x0018, 0x11a2, "DS", "Compression Force" },
639    { 0x0018, 0x1200, "DA", "Date of Last Calibration" },
640    { 0x0018, 0x1201, "TM", "Time of Last Calibration" },
641    { 0x0018, 0x1210, "SH", "Convolution Kernel" },
642    { 0x0018, 0x1240, "IS", "Upper/Lower Pixel Values" },
643    { 0x0018, 0x1242, "IS", "Actual Frame Duration" },
644    { 0x0018, 0x1243, "IS", "Count Rate" },
645    { 0x0018, 0x1244, "US", "Preferred Playback Sequencing" },
646    { 0x0018, 0x1250, "SH", "Receiving Coil" },
647    { 0x0018, 0x1251, "SH", "Transmitting Coil" },
648    { 0x0018, 0x1260, "SH", "Plate Type" },
649    { 0x0018, 0x1261, "LO", "Phosphor Type" },
650    { 0x0018, 0x1300, "DS", "Scan Velocity" },
651    { 0x0018, 0x1301, "CS", "Whole Body Technique" },
652    { 0x0018, 0x1302, "IS", "Scan Length" },
653    { 0x0018, 0x1310, "US", "Acquisition Matrix" },
654    { 0x0018, 0x1312, "CS", "Phase Encoding Direction" },
655    { 0x0018, 0x1314, "DS", "Flip Angle" },
656    { 0x0018, 0x1315, "CS", "Variable Flip Angle Flag" },
657    { 0x0018, 0x1316, "DS", "SAR" },
658    { 0x0018, 0x1318, "DS", "dB/dt" },
659    { 0x0018, 0x1400, "LO", "Acquisition Device Processing Description" },
660    { 0x0018, 0x1401, "LO", "Acquisition Device Processing Code" },
661    { 0x0018, 0x1402, "CS", "Cassette Orientation" },
662    { 0x0018, 0x1403, "CS", "Cassette Size" },
663    { 0x0018, 0x1404, "US", "Exposures on Plate" },
664    { 0x0018, 0x1405, "IS", "Relative X-ray Exposure" },
665    { 0x0018, 0x1450, "DS", "Column Angulation"