blob: 9ab4d7b007cf1848c44a7f4cf7b97b4827cac8e3 [file] [log] [blame]
cristy3ed852e2009-09-05 21:47:34 +00001/*
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 %
cristyde984cd2013-12-01 14:49:27 +000016% Cristy %
cristy3ed852e2009-09-05 21:47:34 +000017% July 1992 %
18% %
19% %
Cristy7ce65e72015-12-12 18:03:16 -050020% Copyright 1999-2016 ImageMagick Studio LLC, a non-profit organization %
cristy3ed852e2009-09-05 21:47:34 +000021% 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*/
cristy4c08aed2011-07-01 19:47:50 +000042#include "MagickCore/studio.h"
cristy76ce6e12013-04-05 14:33:38 +000043#include "MagickCore/artifact.h"
cristya865ccd2012-07-28 00:33:10 +000044#include "MagickCore/attribute.h"
cristy4c08aed2011-07-01 19:47:50 +000045#include "MagickCore/blob.h"
46#include "MagickCore/blob-private.h"
47#include "MagickCore/cache.h"
48#include "MagickCore/color.h"
49#include "MagickCore/color-private.h"
50#include "MagickCore/colormap.h"
51#include "MagickCore/colormap-private.h"
52#include "MagickCore/constitute.h"
53#include "MagickCore/enhance.h"
54#include "MagickCore/exception.h"
55#include "MagickCore/exception-private.h"
56#include "MagickCore/image.h"
57#include "MagickCore/image-private.h"
58#include "MagickCore/list.h"
59#include "MagickCore/magick.h"
60#include "MagickCore/memory_.h"
61#include "MagickCore/monitor.h"
62#include "MagickCore/monitor-private.h"
63#include "MagickCore/option.h"
64#include "MagickCore/pixel-accessor.h"
cristya865ccd2012-07-28 00:33:10 +000065#include "MagickCore/property.h"
cristy4c08aed2011-07-01 19:47:50 +000066#include "MagickCore/resource_.h"
67#include "MagickCore/quantum-private.h"
68#include "MagickCore/static.h"
69#include "MagickCore/string_.h"
70#include "MagickCore/string-private.h"
71#include "MagickCore/module.h"
cristy3ed852e2009-09-05 21:47:34 +000072
73/*
74 Dicom medical image declarations.
75*/
76
77typedef struct _DicomInfo
78{
Cristy629f8052015-09-14 07:48:08 -040079 const unsigned short
cristy3ed852e2009-09-05 21:47:34 +000080 group,
81 element;
82
83 const char
84 *vr,
85 *description;
86} DicomInfo;
87
88static const DicomInfo
dirk74996ae2015-09-14 21:10:13 +020089 dicom_info[] =
cristy3ed852e2009-09-05 21:47:34 +000090 {
91 { 0x0000, 0x0000, "UL", "Group Length" },
92 { 0x0000, 0x0001, "UL", "Command Length to End" },
93 { 0x0000, 0x0002, "UI", "Affected SOP Class UID" },
94 { 0x0000, 0x0003, "UI", "Requested SOP Class UID" },
95 { 0x0000, 0x0010, "LO", "Command Recognition Code" },
96 { 0x0000, 0x0100, "US", "Command Field" },
97 { 0x0000, 0x0110, "US", "Message ID" },
98 { 0x0000, 0x0120, "US", "Message ID Being Responded To" },
99 { 0x0000, 0x0200, "AE", "Initiator" },
100 { 0x0000, 0x0300, "AE", "Receiver" },
101 { 0x0000, 0x0400, "AE", "Find Location" },
102 { 0x0000, 0x0600, "AE", "Move Destination" },
103 { 0x0000, 0x0700, "US", "Priority" },
104 { 0x0000, 0x0800, "US", "Data Set Type" },
105 { 0x0000, 0x0850, "US", "Number of Matches" },
106 { 0x0000, 0x0860, "US", "Response Sequence Number" },
107 { 0x0000, 0x0900, "US", "Status" },
108 { 0x0000, 0x0901, "AT", "Offending Element" },
109 { 0x0000, 0x0902, "LO", "Exception Comment" },
110 { 0x0000, 0x0903, "US", "Exception ID" },
111 { 0x0000, 0x1000, "UI", "Affected SOP Instance UID" },
112 { 0x0000, 0x1001, "UI", "Requested SOP Instance UID" },
113 { 0x0000, 0x1002, "US", "Event Type ID" },
114 { 0x0000, 0x1005, "AT", "Attribute Identifier List" },
115 { 0x0000, 0x1008, "US", "Action Type ID" },
116 { 0x0000, 0x1020, "US", "Number of Remaining Suboperations" },
117 { 0x0000, 0x1021, "US", "Number of Completed Suboperations" },
118 { 0x0000, 0x1022, "US", "Number of Failed Suboperations" },
119 { 0x0000, 0x1023, "US", "Number of Warning Suboperations" },
120 { 0x0000, 0x1030, "AE", "Move Originator Application Entity Title" },
121 { 0x0000, 0x1031, "US", "Move Originator Message ID" },
122 { 0x0000, 0x4000, "LO", "Dialog Receiver" },
123 { 0x0000, 0x4010, "LO", "Terminal Type" },
124 { 0x0000, 0x5010, "SH", "Message Set ID" },
125 { 0x0000, 0x5020, "SH", "End Message Set" },
126 { 0x0000, 0x5110, "LO", "Display Format" },
127 { 0x0000, 0x5120, "LO", "Page Position ID" },
128 { 0x0000, 0x5130, "LO", "Text Format ID" },
129 { 0x0000, 0x5140, "LO", "Normal Reverse" },
130 { 0x0000, 0x5150, "LO", "Add Gray Scale" },
131 { 0x0000, 0x5160, "LO", "Borders" },
132 { 0x0000, 0x5170, "IS", "Copies" },
133 { 0x0000, 0x5180, "LO", "OldMagnificationType" },
134 { 0x0000, 0x5190, "LO", "Erase" },
135 { 0x0000, 0x51a0, "LO", "Print" },
136 { 0x0000, 0x51b0, "US", "Overlays" },
137 { 0x0002, 0x0000, "UL", "Meta Element Group Length" },
138 { 0x0002, 0x0001, "OB", "File Meta Information Version" },
139 { 0x0002, 0x0002, "UI", "Media Storage SOP Class UID" },
140 { 0x0002, 0x0003, "UI", "Media Storage SOP Instance UID" },
141 { 0x0002, 0x0010, "UI", "Transfer Syntax UID" },
142 { 0x0002, 0x0012, "UI", "Implementation Class UID" },
143 { 0x0002, 0x0013, "SH", "Implementation Version Name" },
144 { 0x0002, 0x0016, "AE", "Source Application Entity Title" },
145 { 0x0002, 0x0100, "UI", "Private Information Creator UID" },
146 { 0x0002, 0x0102, "OB", "Private Information" },
147 { 0x0003, 0x0000, "US", "?" },
148 { 0x0003, 0x0008, "US", "ISI Command Field" },
149 { 0x0003, 0x0011, "US", "Attach ID Application Code" },
150 { 0x0003, 0x0012, "UL", "Attach ID Message Count" },
151 { 0x0003, 0x0013, "DA", "Attach ID Date" },
152 { 0x0003, 0x0014, "TM", "Attach ID Time" },
153 { 0x0003, 0x0020, "US", "Message Type" },
154 { 0x0003, 0x0030, "DA", "Max Waiting Date" },
155 { 0x0003, 0x0031, "TM", "Max Waiting Time" },
156 { 0x0004, 0x0000, "UL", "File Set Group Length" },
157 { 0x0004, 0x1130, "CS", "File Set ID" },
158 { 0x0004, 0x1141, "CS", "File Set Descriptor File ID" },
159 { 0x0004, 0x1142, "CS", "File Set Descriptor File Specific Character Set" },
160 { 0x0004, 0x1200, "UL", "Root Directory Entity First Directory Record Offset" },
161 { 0x0004, 0x1202, "UL", "Root Directory Entity Last Directory Record Offset" },
162 { 0x0004, 0x1212, "US", "File Set Consistency Flag" },
163 { 0x0004, 0x1220, "SQ", "Directory Record Sequence" },
164 { 0x0004, 0x1400, "UL", "Next Directory Record Offset" },
165 { 0x0004, 0x1410, "US", "Record In Use Flag" },
166 { 0x0004, 0x1420, "UL", "Referenced Lower Level Directory Entity Offset" },
167 { 0x0004, 0x1430, "CS", "Directory Record Type" },
168 { 0x0004, 0x1432, "UI", "Private Record UID" },
169 { 0x0004, 0x1500, "CS", "Referenced File ID" },
170 { 0x0004, 0x1504, "UL", "MRDR Directory Record Offset" },
171 { 0x0004, 0x1510, "UI", "Referenced SOP Class UID In File" },
172 { 0x0004, 0x1511, "UI", "Referenced SOP Instance UID In File" },
173 { 0x0004, 0x1512, "UI", "Referenced Transfer Syntax UID In File" },
174 { 0x0004, 0x1600, "UL", "Number of References" },
175 { 0x0005, 0x0000, "US", "?" },
176 { 0x0006, 0x0000, "US", "?" },
177 { 0x0008, 0x0000, "UL", "Identifying Group Length" },
178 { 0x0008, 0x0001, "UL", "Length to End" },
179 { 0x0008, 0x0005, "CS", "Specific Character Set" },
180 { 0x0008, 0x0008, "CS", "Image Type" },
181 { 0x0008, 0x0010, "LO", "Recognition Code" },
182 { 0x0008, 0x0012, "DA", "Instance Creation Date" },
183 { 0x0008, 0x0013, "TM", "Instance Creation Time" },
184 { 0x0008, 0x0014, "UI", "Instance Creator UID" },
185 { 0x0008, 0x0016, "UI", "SOP Class UID" },
186 { 0x0008, 0x0018, "UI", "SOP Instance UID" },
187 { 0x0008, 0x0020, "DA", "Study Date" },
188 { 0x0008, 0x0021, "DA", "Series Date" },
189 { 0x0008, 0x0022, "DA", "Acquisition Date" },
190 { 0x0008, 0x0023, "DA", "Image Date" },
191 { 0x0008, 0x0024, "DA", "Overlay Date" },
192 { 0x0008, 0x0025, "DA", "Curve Date" },
193 { 0x0008, 0x0030, "TM", "Study Time" },
194 { 0x0008, 0x0031, "TM", "Series Time" },
195 { 0x0008, 0x0032, "TM", "Acquisition Time" },
196 { 0x0008, 0x0033, "TM", "Image Time" },
197 { 0x0008, 0x0034, "TM", "Overlay Time" },
198 { 0x0008, 0x0035, "TM", "Curve Time" },
199 { 0x0008, 0x0040, "xs", "Old Data Set Type" },
200 { 0x0008, 0x0041, "xs", "Old Data Set Subtype" },
201 { 0x0008, 0x0042, "CS", "Nuclear Medicine Series Type" },
202 { 0x0008, 0x0050, "SH", "Accession Number" },
203 { 0x0008, 0x0052, "CS", "Query/Retrieve Level" },
204 { 0x0008, 0x0054, "AE", "Retrieve AE Title" },
205 { 0x0008, 0x0058, "UI", "Failed SOP Instance UID List" },
206 { 0x0008, 0x0060, "CS", "Modality" },
207 { 0x0008, 0x0062, "SQ", "Modality Subtype" },
208 { 0x0008, 0x0064, "CS", "Conversion Type" },
209 { 0x0008, 0x0068, "CS", "Presentation Intent Type" },
210 { 0x0008, 0x0070, "LO", "Manufacturer" },
211 { 0x0008, 0x0080, "LO", "Institution Name" },
212 { 0x0008, 0x0081, "ST", "Institution Address" },
213 { 0x0008, 0x0082, "SQ", "Institution Code Sequence" },
214 { 0x0008, 0x0090, "PN", "Referring Physician's Name" },
215 { 0x0008, 0x0092, "ST", "Referring Physician's Address" },
216 { 0x0008, 0x0094, "SH", "Referring Physician's Telephone Numbers" },
217 { 0x0008, 0x0100, "SH", "Code Value" },
218 { 0x0008, 0x0102, "SH", "Coding Scheme Designator" },
219 { 0x0008, 0x0103, "SH", "Coding Scheme Version" },
220 { 0x0008, 0x0104, "LO", "Code Meaning" },
221 { 0x0008, 0x0105, "CS", "Mapping Resource" },
222 { 0x0008, 0x0106, "DT", "Context Group Version" },
223 { 0x0008, 0x010b, "CS", "Code Set Extension Flag" },
224 { 0x0008, 0x010c, "UI", "Private Coding Scheme Creator UID" },
225 { 0x0008, 0x010d, "UI", "Code Set Extension Creator UID" },
226 { 0x0008, 0x010f, "CS", "Context Identifier" },
227 { 0x0008, 0x1000, "LT", "Network ID" },
228 { 0x0008, 0x1010, "SH", "Station Name" },
229 { 0x0008, 0x1030, "LO", "Study Description" },
230 { 0x0008, 0x1032, "SQ", "Procedure Code Sequence" },
231 { 0x0008, 0x103e, "LO", "Series Description" },
232 { 0x0008, 0x1040, "LO", "Institutional Department Name" },
233 { 0x0008, 0x1048, "PN", "Physician of Record" },
234 { 0x0008, 0x1050, "PN", "Performing Physician's Name" },
235 { 0x0008, 0x1060, "PN", "Name of Physician(s) Reading Study" },
236 { 0x0008, 0x1070, "PN", "Operator's Name" },
237 { 0x0008, 0x1080, "LO", "Admitting Diagnosis Description" },
238 { 0x0008, 0x1084, "SQ", "Admitting Diagnosis Code Sequence" },
239 { 0x0008, 0x1090, "LO", "Manufacturer's Model Name" },
240 { 0x0008, 0x1100, "SQ", "Referenced Results Sequence" },
241 { 0x0008, 0x1110, "SQ", "Referenced Study Sequence" },
242 { 0x0008, 0x1111, "SQ", "Referenced Study Component Sequence" },
243 { 0x0008, 0x1115, "SQ", "Referenced Series Sequence" },
244 { 0x0008, 0x1120, "SQ", "Referenced Patient Sequence" },
245 { 0x0008, 0x1125, "SQ", "Referenced Visit Sequence" },
246 { 0x0008, 0x1130, "SQ", "Referenced Overlay Sequence" },
247 { 0x0008, 0x1140, "SQ", "Referenced Image Sequence" },
248 { 0x0008, 0x1145, "SQ", "Referenced Curve Sequence" },
249 { 0x0008, 0x1148, "SQ", "Referenced Previous Waveform" },
250 { 0x0008, 0x114a, "SQ", "Referenced Simultaneous Waveforms" },
251 { 0x0008, 0x114c, "SQ", "Referenced Subsequent Waveform" },
252 { 0x0008, 0x1150, "UI", "Referenced SOP Class UID" },
253 { 0x0008, 0x1155, "UI", "Referenced SOP Instance UID" },
254 { 0x0008, 0x1160, "IS", "Referenced Frame Number" },
255 { 0x0008, 0x1195, "UI", "Transaction UID" },
256 { 0x0008, 0x1197, "US", "Failure Reason" },
257 { 0x0008, 0x1198, "SQ", "Failed SOP Sequence" },
258 { 0x0008, 0x1199, "SQ", "Referenced SOP Sequence" },
259 { 0x0008, 0x2110, "CS", "Old Lossy Image Compression" },
260 { 0x0008, 0x2111, "ST", "Derivation Description" },
261 { 0x0008, 0x2112, "SQ", "Source Image Sequence" },
262 { 0x0008, 0x2120, "SH", "Stage Name" },
263 { 0x0008, 0x2122, "IS", "Stage Number" },
264 { 0x0008, 0x2124, "IS", "Number of Stages" },
265 { 0x0008, 0x2128, "IS", "View Number" },
266 { 0x0008, 0x2129, "IS", "Number of Event Timers" },
267 { 0x0008, 0x212a, "IS", "Number of Views in Stage" },
268 { 0x0008, 0x2130, "DS", "Event Elapsed Time(s)" },
269 { 0x0008, 0x2132, "LO", "Event Timer Name(s)" },
270 { 0x0008, 0x2142, "IS", "Start Trim" },
271 { 0x0008, 0x2143, "IS", "Stop Trim" },
272 { 0x0008, 0x2144, "IS", "Recommended Display Frame Rate" },
273 { 0x0008, 0x2200, "CS", "Transducer Position" },
274 { 0x0008, 0x2204, "CS", "Transducer Orientation" },
275 { 0x0008, 0x2208, "CS", "Anatomic Structure" },
276 { 0x0008, 0x2218, "SQ", "Anatomic Region Sequence" },
277 { 0x0008, 0x2220, "SQ", "Anatomic Region Modifier Sequence" },
278 { 0x0008, 0x2228, "SQ", "Primary Anatomic Structure Sequence" },
279 { 0x0008, 0x2230, "SQ", "Primary Anatomic Structure Modifier Sequence" },
280 { 0x0008, 0x2240, "SQ", "Transducer Position Sequence" },
281 { 0x0008, 0x2242, "SQ", "Transducer Position Modifier Sequence" },
282 { 0x0008, 0x2244, "SQ", "Transducer Orientation Sequence" },
283 { 0x0008, 0x2246, "SQ", "Transducer Orientation Modifier Sequence" },
284 { 0x0008, 0x2251, "SQ", "Anatomic Structure Space Or Region Code Sequence" },
285 { 0x0008, 0x2253, "SQ", "Anatomic Portal Of Entrance Code Sequence" },
286 { 0x0008, 0x2255, "SQ", "Anatomic Approach Direction Code Sequence" },
287 { 0x0008, 0x2256, "ST", "Anatomic Perspective Description" },
288 { 0x0008, 0x2257, "SQ", "Anatomic Perspective Code Sequence" },
289 { 0x0008, 0x2258, "ST", "Anatomic Location Of Examining Instrument Description" },
290 { 0x0008, 0x2259, "SQ", "Anatomic Location Of Examining Instrument Code Sequence" },
291 { 0x0008, 0x225a, "SQ", "Anatomic Structure Space Or Region Modifier Code Sequence" },
292 { 0x0008, 0x225c, "SQ", "OnAxis Background Anatomic Structure Code Sequence" },
293 { 0x0008, 0x4000, "LT", "Identifying Comments" },
294 { 0x0009, 0x0000, "xs", "?" },
295 { 0x0009, 0x0001, "xs", "?" },
296 { 0x0009, 0x0002, "xs", "?" },
297 { 0x0009, 0x0003, "xs", "?" },
298 { 0x0009, 0x0004, "xs", "?" },
299 { 0x0009, 0x0005, "UN", "?" },
300 { 0x0009, 0x0006, "UN", "?" },
301 { 0x0009, 0x0007, "UN", "?" },
302 { 0x0009, 0x0008, "xs", "?" },
303 { 0x0009, 0x0009, "LT", "?" },
304 { 0x0009, 0x000a, "IS", "?" },
305 { 0x0009, 0x000b, "IS", "?" },
306 { 0x0009, 0x000c, "IS", "?" },
307 { 0x0009, 0x000d, "IS", "?" },
308 { 0x0009, 0x000e, "IS", "?" },
309 { 0x0009, 0x000f, "UN", "?" },
310 { 0x0009, 0x0010, "xs", "?" },
311 { 0x0009, 0x0011, "xs", "?" },
312 { 0x0009, 0x0012, "xs", "?" },
313 { 0x0009, 0x0013, "xs", "?" },
314 { 0x0009, 0x0014, "xs", "?" },
315 { 0x0009, 0x0015, "xs", "?" },
316 { 0x0009, 0x0016, "xs", "?" },
317 { 0x0009, 0x0017, "LT", "?" },
318 { 0x0009, 0x0018, "LT", "Data Set Identifier" },
319 { 0x0009, 0x001a, "US", "?" },
320 { 0x0009, 0x001e, "UI", "?" },
321 { 0x0009, 0x0020, "xs", "?" },
322 { 0x0009, 0x0021, "xs", "?" },
323 { 0x0009, 0x0022, "SH", "User Orientation" },
324 { 0x0009, 0x0023, "SL", "Initiation Type" },
325 { 0x0009, 0x0024, "xs", "?" },
326 { 0x0009, 0x0025, "xs", "?" },
327 { 0x0009, 0x0026, "xs", "?" },
328 { 0x0009, 0x0027, "xs", "?" },
329 { 0x0009, 0x0029, "xs", "?" },
330 { 0x0009, 0x002a, "SL", "?" },
331 { 0x0009, 0x002c, "LO", "Series Comments" },
332 { 0x0009, 0x002d, "SL", "Track Beat Average" },
333 { 0x0009, 0x002e, "FD", "Distance Prescribed" },
334 { 0x0009, 0x002f, "LT", "?" },
335 { 0x0009, 0x0030, "xs", "?" },
336 { 0x0009, 0x0031, "xs", "?" },
337 { 0x0009, 0x0032, "LT", "?" },
338 { 0x0009, 0x0034, "xs", "?" },
339 { 0x0009, 0x0035, "SL", "Gantry Locus Type" },
340 { 0x0009, 0x0037, "SL", "Starting Heart Rate" },
341 { 0x0009, 0x0038, "xs", "?" },
342 { 0x0009, 0x0039, "SL", "RR Window Offset" },
343 { 0x0009, 0x003a, "SL", "Percent Cycle Imaged" },
344 { 0x0009, 0x003e, "US", "?" },
345 { 0x0009, 0x003f, "US", "?" },
346 { 0x0009, 0x0040, "xs", "?" },
347 { 0x0009, 0x0041, "xs", "?" },
348 { 0x0009, 0x0042, "xs", "?" },
349 { 0x0009, 0x0043, "xs", "?" },
350 { 0x0009, 0x0050, "LT", "?" },
351 { 0x0009, 0x0051, "xs", "?" },
352 { 0x0009, 0x0060, "LT", "?" },
353 { 0x0009, 0x0061, "LT", "Series Unique Identifier" },
354 { 0x0009, 0x0070, "LT", "?" },
355 { 0x0009, 0x0080, "LT", "?" },
356 { 0x0009, 0x0091, "LT", "?" },
357 { 0x0009, 0x00e2, "LT", "?" },
358 { 0x0009, 0x00e3, "UI", "Equipment UID" },
359 { 0x0009, 0x00e6, "SH", "Genesis Version Now" },
360 { 0x0009, 0x00e7, "UL", "Exam Record Checksum" },
361 { 0x0009, 0x00e8, "UL", "?" },
362 { 0x0009, 0x00e9, "SL", "Actual Series Data Time Stamp" },
363 { 0x0009, 0x00f2, "UN", "?" },
364 { 0x0009, 0x00f3, "UN", "?" },
365 { 0x0009, 0x00f4, "LT", "?" },
366 { 0x0009, 0x00f5, "xs", "?" },
367 { 0x0009, 0x00f6, "LT", "PDM Data Object Type Extension" },
368 { 0x0009, 0x00f8, "US", "?" },
369 { 0x0009, 0x00fb, "IS", "?" },
370 { 0x0009, 0x1002, "OB", "?" },
371 { 0x0009, 0x1003, "OB", "?" },
372 { 0x0009, 0x1010, "UN", "?" },
373 { 0x0010, 0x0000, "UL", "Patient Group Length" },
374 { 0x0010, 0x0010, "PN", "Patient's Name" },
375 { 0x0010, 0x0020, "LO", "Patient's ID" },
376 { 0x0010, 0x0021, "LO", "Issuer of Patient's ID" },
377 { 0x0010, 0x0030, "DA", "Patient's Birth Date" },
378 { 0x0010, 0x0032, "TM", "Patient's Birth Time" },
379 { 0x0010, 0x0040, "CS", "Patient's Sex" },
380 { 0x0010, 0x0050, "SQ", "Patient's Insurance Plan Code Sequence" },
381 { 0x0010, 0x1000, "LO", "Other Patient's ID's" },
382 { 0x0010, 0x1001, "PN", "Other Patient's Names" },
383 { 0x0010, 0x1005, "PN", "Patient's Birth Name" },
384 { 0x0010, 0x1010, "AS", "Patient's Age" },
385 { 0x0010, 0x1020, "DS", "Patient's Size" },
386 { 0x0010, 0x1030, "DS", "Patient's Weight" },
387 { 0x0010, 0x1040, "LO", "Patient's Address" },
388 { 0x0010, 0x1050, "LT", "Insurance Plan Identification" },
389 { 0x0010, 0x1060, "PN", "Patient's Mother's Birth Name" },
390 { 0x0010, 0x1080, "LO", "Military Rank" },
391 { 0x0010, 0x1081, "LO", "Branch of Service" },
392 { 0x0010, 0x1090, "LO", "Medical Record Locator" },
393 { 0x0010, 0x2000, "LO", "Medical Alerts" },
394 { 0x0010, 0x2110, "LO", "Contrast Allergies" },
395 { 0x0010, 0x2150, "LO", "Country of Residence" },
396 { 0x0010, 0x2152, "LO", "Region of Residence" },
397 { 0x0010, 0x2154, "SH", "Patients Telephone Numbers" },
398 { 0x0010, 0x2160, "SH", "Ethnic Group" },
399 { 0x0010, 0x2180, "SH", "Occupation" },
400 { 0x0010, 0x21a0, "CS", "Smoking Status" },
401 { 0x0010, 0x21b0, "LT", "Additional Patient History" },
402 { 0x0010, 0x21c0, "US", "Pregnancy Status" },
403 { 0x0010, 0x21d0, "DA", "Last Menstrual Date" },
404 { 0x0010, 0x21f0, "LO", "Patients Religious Preference" },
405 { 0x0010, 0x4000, "LT", "Patient Comments" },
406 { 0x0011, 0x0001, "xs", "?" },
407 { 0x0011, 0x0002, "US", "?" },
408 { 0x0011, 0x0003, "LT", "Patient UID" },
409 { 0x0011, 0x0004, "LT", "Patient ID" },
410 { 0x0011, 0x000a, "xs", "?" },
411 { 0x0011, 0x000b, "SL", "Effective Series Duration" },
412 { 0x0011, 0x000c, "SL", "Num Beats" },
413 { 0x0011, 0x000d, "LO", "Radio Nuclide Name" },
414 { 0x0011, 0x0010, "xs", "?" },
415 { 0x0011, 0x0011, "xs", "?" },
416 { 0x0011, 0x0012, "LO", "Dataset Name" },
417 { 0x0011, 0x0013, "LO", "Dataset Type" },
418 { 0x0011, 0x0015, "xs", "?" },
419 { 0x0011, 0x0016, "SL", "Energy Number" },
420 { 0x0011, 0x0017, "SL", "RR Interval Window Number" },
421 { 0x0011, 0x0018, "SL", "MG Bin Number" },
422 { 0x0011, 0x0019, "FD", "Radius Of Rotation" },
423 { 0x0011, 0x001a, "SL", "Detector Count Zone" },
424 { 0x0011, 0x001b, "SL", "Num Energy Windows" },
425 { 0x0011, 0x001c, "SL", "Energy Offset" },
426 { 0x0011, 0x001d, "SL", "Energy Range" },
427 { 0x0011, 0x001f, "SL", "Image Orientation" },
428 { 0x0011, 0x0020, "xs", "?" },
429 { 0x0011, 0x0021, "xs", "?" },
430 { 0x0011, 0x0022, "xs", "?" },
431 { 0x0011, 0x0023, "xs", "?" },
432 { 0x0011, 0x0024, "SL", "FOV Mask Y Cutoff Angle" },
433 { 0x0011, 0x0025, "xs", "?" },
434 { 0x0011, 0x0026, "SL", "Table Orientation" },
435 { 0x0011, 0x0027, "SL", "ROI Top Left" },
436 { 0x0011, 0x0028, "SL", "ROI Bottom Right" },
437 { 0x0011, 0x0030, "xs", "?" },
438 { 0x0011, 0x0031, "xs", "?" },
439 { 0x0011, 0x0032, "UN", "?" },
440 { 0x0011, 0x0033, "LO", "Energy Correct Name" },
441 { 0x0011, 0x0034, "LO", "Spatial Correct Name" },
442 { 0x0011, 0x0035, "xs", "?" },
443 { 0x0011, 0x0036, "LO", "Uniformity Correct Name" },
444 { 0x0011, 0x0037, "LO", "Acquisition Specific Correct Name" },
445 { 0x0011, 0x0038, "SL", "Byte Order" },
446 { 0x0011, 0x003a, "SL", "Picture Format" },
447 { 0x0011, 0x003b, "FD", "Pixel Scale" },
448 { 0x0011, 0x003c, "FD", "Pixel Offset" },
449 { 0x0011, 0x003e, "SL", "FOV Shape" },
450 { 0x0011, 0x003f, "SL", "Dataset Flags" },
451 { 0x0011, 0x0040, "xs", "?" },
452 { 0x0011, 0x0041, "LT", "Medical Alerts" },
453 { 0x0011, 0x0042, "LT", "Contrast Allergies" },
454 { 0x0011, 0x0044, "FD", "Threshold Center" },
455 { 0x0011, 0x0045, "FD", "Threshold Width" },
456 { 0x0011, 0x0046, "SL", "Interpolation Type" },
457 { 0x0011, 0x0055, "FD", "Period" },
458 { 0x0011, 0x0056, "FD", "ElapsedTime" },
459 { 0x0011, 0x00a1, "DA", "Patient Registration Date" },
460 { 0x0011, 0x00a2, "TM", "Patient Registration Time" },
461 { 0x0011, 0x00b0, "LT", "Patient Last Name" },
462 { 0x0011, 0x00b2, "LT", "Patient First Name" },
463 { 0x0011, 0x00b4, "LT", "Patient Hospital Status" },
464 { 0x0011, 0x00bc, "TM", "Current Location Time" },
465 { 0x0011, 0x00c0, "LT", "Patient Insurance Status" },
466 { 0x0011, 0x00d0, "LT", "Patient Billing Type" },
467 { 0x0011, 0x00d2, "LT", "Patient Billing Address" },
468 { 0x0013, 0x0000, "LT", "Modifying Physician" },
469 { 0x0013, 0x0010, "xs", "?" },
470 { 0x0013, 0x0011, "SL", "?" },
471 { 0x0013, 0x0012, "xs", "?" },
472 { 0x0013, 0x0016, "SL", "AutoTrack Peak" },
473 { 0x0013, 0x0017, "SL", "AutoTrack Width" },
474 { 0x0013, 0x0018, "FD", "Transmission Scan Time" },
475 { 0x0013, 0x0019, "FD", "Transmission Mask Width" },
476 { 0x0013, 0x001a, "FD", "Copper Attenuator Thickness" },
477 { 0x0013, 0x001c, "FD", "?" },
478 { 0x0013, 0x001d, "FD", "?" },
479 { 0x0013, 0x001e, "FD", "Tomo View Offset" },
480 { 0x0013, 0x0020, "LT", "Patient Name" },
481 { 0x0013, 0x0022, "LT", "Patient Id" },
482 { 0x0013, 0x0026, "LT", "Study Comments" },
483 { 0x0013, 0x0030, "DA", "Patient Birthdate" },
484 { 0x0013, 0x0031, "DS", "Patient Weight" },
485 { 0x0013, 0x0032, "LT", "Patients Maiden Name" },
486 { 0x0013, 0x0033, "LT", "Referring Physician" },
487 { 0x0013, 0x0034, "LT", "Admitting Diagnosis" },
488 { 0x0013, 0x0035, "LT", "Patient Sex" },
489 { 0x0013, 0x0040, "LT", "Procedure Description" },
490 { 0x0013, 0x0042, "LT", "Patient Rest Direction" },
491 { 0x0013, 0x0044, "LT", "Patient Position" },
492 { 0x0013, 0x0046, "LT", "View Direction" },
493 { 0x0015, 0x0001, "DS", "Stenosis Calibration Ratio" },
494 { 0x0015, 0x0002, "DS", "Stenosis Magnification" },
495 { 0x0015, 0x0003, "DS", "Cardiac Calibration Ratio" },
496 { 0x0018, 0x0000, "UL", "Acquisition Group Length" },
497 { 0x0018, 0x0010, "LO", "Contrast/Bolus Agent" },
498 { 0x0018, 0x0012, "SQ", "Contrast/Bolus Agent Sequence" },
499 { 0x0018, 0x0014, "SQ", "Contrast/Bolus Administration Route Sequence" },
500 { 0x0018, 0x0015, "CS", "Body Part Examined" },
501 { 0x0018, 0x0020, "CS", "Scanning Sequence" },
502 { 0x0018, 0x0021, "CS", "Sequence Variant" },
503 { 0x0018, 0x0022, "CS", "Scan Options" },
504 { 0x0018, 0x0023, "CS", "MR Acquisition Type" },
505 { 0x0018, 0x0024, "SH", "Sequence Name" },
506 { 0x0018, 0x0025, "CS", "Angio Flag" },
507 { 0x0018, 0x0026, "SQ", "Intervention Drug Information Sequence" },
508 { 0x0018, 0x0027, "TM", "Intervention Drug Stop Time" },
509 { 0x0018, 0x0028, "DS", "Intervention Drug Dose" },
510 { 0x0018, 0x0029, "SQ", "Intervention Drug Code Sequence" },
511 { 0x0018, 0x002a, "SQ", "Additional Drug Sequence" },
512 { 0x0018, 0x0030, "LO", "Radionuclide" },
513 { 0x0018, 0x0031, "LO", "Radiopharmaceutical" },
514 { 0x0018, 0x0032, "DS", "Energy Window Centerline" },
515 { 0x0018, 0x0033, "DS", "Energy Window Total Width" },
516 { 0x0018, 0x0034, "LO", "Intervention Drug Name" },
517 { 0x0018, 0x0035, "TM", "Intervention Drug Start Time" },
518 { 0x0018, 0x0036, "SQ", "Intervention Therapy Sequence" },
519 { 0x0018, 0x0037, "CS", "Therapy Type" },
520 { 0x0018, 0x0038, "CS", "Intervention Status" },
521 { 0x0018, 0x0039, "CS", "Therapy Description" },
522 { 0x0018, 0x0040, "IS", "Cine Rate" },
523 { 0x0018, 0x0050, "DS", "Slice Thickness" },
524 { 0x0018, 0x0060, "DS", "KVP" },
525 { 0x0018, 0x0070, "IS", "Counts Accumulated" },
526 { 0x0018, 0x0071, "CS", "Acquisition Termination Condition" },
527 { 0x0018, 0x0072, "DS", "Effective Series Duration" },
528 { 0x0018, 0x0073, "CS", "Acquisition Start Condition" },
529 { 0x0018, 0x0074, "IS", "Acquisition Start Condition Data" },
530 { 0x0018, 0x0075, "IS", "Acquisition Termination Condition Data" },
531 { 0x0018, 0x0080, "DS", "Repetition Time" },
532 { 0x0018, 0x0081, "DS", "Echo Time" },
533 { 0x0018, 0x0082, "DS", "Inversion Time" },
534 { 0x0018, 0x0083, "DS", "Number of Averages" },
535 { 0x0018, 0x0084, "DS", "Imaging Frequency" },
536 { 0x0018, 0x0085, "SH", "Imaged Nucleus" },
537 { 0x0018, 0x0086, "IS", "Echo Number(s)" },
538 { 0x0018, 0x0087, "DS", "Magnetic Field Strength" },
539 { 0x0018, 0x0088, "DS", "Spacing Between Slices" },
540 { 0x0018, 0x0089, "IS", "Number of Phase Encoding Steps" },
541 { 0x0018, 0x0090, "DS", "Data Collection Diameter" },
542 { 0x0018, 0x0091, "IS", "Echo Train Length" },
543 { 0x0018, 0x0093, "DS", "Percent Sampling" },
544 { 0x0018, 0x0094, "DS", "Percent Phase Field of View" },
545 { 0x0018, 0x0095, "DS", "Pixel Bandwidth" },
546 { 0x0018, 0x1000, "LO", "Device Serial Number" },
547 { 0x0018, 0x1004, "LO", "Plate ID" },
548 { 0x0018, 0x1010, "LO", "Secondary Capture Device ID" },
549 { 0x0018, 0x1012, "DA", "Date of Secondary Capture" },
550 { 0x0018, 0x1014, "TM", "Time of Secondary Capture" },
551 { 0x0018, 0x1016, "LO", "Secondary Capture Device Manufacturer" },
552 { 0x0018, 0x1018, "LO", "Secondary Capture Device Manufacturer Model Name" },
553 { 0x0018, 0x1019, "LO", "Secondary Capture Device Software Version(s)" },
554 { 0x0018, 0x1020, "LO", "Software Version(s)" },
555 { 0x0018, 0x1022, "SH", "Video Image Format Acquired" },
556 { 0x0018, 0x1023, "LO", "Digital Image Format Acquired" },
557 { 0x0018, 0x1030, "LO", "Protocol Name" },
558 { 0x0018, 0x1040, "LO", "Contrast/Bolus Route" },
559 { 0x0018, 0x1041, "DS", "Contrast/Bolus Volume" },
560 { 0x0018, 0x1042, "TM", "Contrast/Bolus Start Time" },
561 { 0x0018, 0x1043, "TM", "Contrast/Bolus Stop Time" },
562 { 0x0018, 0x1044, "DS", "Contrast/Bolus Total Dose" },
563 { 0x0018, 0x1045, "IS", "Syringe Counts" },
564 { 0x0018, 0x1046, "DS", "Contrast Flow Rate" },
565 { 0x0018, 0x1047, "DS", "Contrast Flow Duration" },
566 { 0x0018, 0x1048, "CS", "Contrast/Bolus Ingredient" },
567 { 0x0018, 0x1049, "DS", "Contrast/Bolus Ingredient Concentration" },
568 { 0x0018, 0x1050, "DS", "Spatial Resolution" },
569 { 0x0018, 0x1060, "DS", "Trigger Time" },
570 { 0x0018, 0x1061, "LO", "Trigger Source or Type" },
571 { 0x0018, 0x1062, "IS", "Nominal Interval" },
572 { 0x0018, 0x1063, "DS", "Frame Time" },
573 { 0x0018, 0x1064, "LO", "Framing Type" },
574 { 0x0018, 0x1065, "DS", "Frame Time Vector" },
575 { 0x0018, 0x1066, "DS", "Frame Delay" },
576 { 0x0018, 0x1067, "DS", "Image Trigger Delay" },
577 { 0x0018, 0x1068, "DS", "Group Time Offset" },
578 { 0x0018, 0x1069, "DS", "Trigger Time Offset" },
579 { 0x0018, 0x106a, "CS", "Synchronization Trigger" },
580 { 0x0018, 0x106b, "UI", "Synchronization Frame of Reference" },
581 { 0x0018, 0x106e, "UL", "Trigger Sample Position" },
582 { 0x0018, 0x1070, "LO", "Radiopharmaceutical Route" },
583 { 0x0018, 0x1071, "DS", "Radiopharmaceutical Volume" },
584 { 0x0018, 0x1072, "TM", "Radiopharmaceutical Start Time" },
585 { 0x0018, 0x1073, "TM", "Radiopharmaceutical Stop Time" },
586 { 0x0018, 0x1074, "DS", "Radionuclide Total Dose" },
587 { 0x0018, 0x1075, "DS", "Radionuclide Half Life" },
588 { 0x0018, 0x1076, "DS", "Radionuclide Positron Fraction" },
589 { 0x0018, 0x1077, "DS", "Radiopharmaceutical Specific Activity" },
590 { 0x0018, 0x1080, "CS", "Beat Rejection Flag" },
591 { 0x0018, 0x1081, "IS", "Low R-R Value" },
592 { 0x0018, 0x1082, "IS", "High R-R Value" },
593 { 0x0018, 0x1083, "IS", "Intervals Acquired" },
594 { 0x0018, 0x1084, "IS", "Intervals Rejected" },
595 { 0x0018, 0x1085, "LO", "PVC Rejection" },
596 { 0x0018, 0x1086, "IS", "Skip Beats" },
597 { 0x0018, 0x1088, "IS", "Heart Rate" },
598 { 0x0018, 0x1090, "IS", "Cardiac Number of Images" },
599 { 0x0018, 0x1094, "IS", "Trigger Window" },
600 { 0x0018, 0x1100, "DS", "Reconstruction Diameter" },
601 { 0x0018, 0x1110, "DS", "Distance Source to Detector" },
602 { 0x0018, 0x1111, "DS", "Distance Source to Patient" },
603 { 0x0018, 0x1114, "DS", "Estimated Radiographic Magnification Factor" },
604 { 0x0018, 0x1120, "DS", "Gantry/Detector Tilt" },
605 { 0x0018, 0x1121, "DS", "Gantry/Detector Slew" },
606 { 0x0018, 0x1130, "DS", "Table Height" },
607 { 0x0018, 0x1131, "DS", "Table Traverse" },
608 { 0x0018, 0x1134, "CS", "Table Motion" },
609 { 0x0018, 0x1135, "DS", "Table Vertical Increment" },
610 { 0x0018, 0x1136, "DS", "Table Lateral Increment" },
611 { 0x0018, 0x1137, "DS", "Table Longitudinal Increment" },
612 { 0x0018, 0x1138, "DS", "Table Angle" },
613 { 0x0018, 0x113a, "CS", "Table Type" },
614 { 0x0018, 0x1140, "CS", "Rotation Direction" },
615 { 0x0018, 0x1141, "DS", "Angular Position" },
616 { 0x0018, 0x1142, "DS", "Radial Position" },
617 { 0x0018, 0x1143, "DS", "Scan Arc" },
618 { 0x0018, 0x1144, "DS", "Angular Step" },
619 { 0x0018, 0x1145, "DS", "Center of Rotation Offset" },
620 { 0x0018, 0x1146, "DS", "Rotation Offset" },
621 { 0x0018, 0x1147, "CS", "Field of View Shape" },
622 { 0x0018, 0x1149, "IS", "Field of View Dimension(s)" },
623 { 0x0018, 0x1150, "IS", "Exposure Time" },
624 { 0x0018, 0x1151, "IS", "X-ray Tube Current" },
625 { 0x0018, 0x1152, "IS", "Exposure" },
626 { 0x0018, 0x1153, "IS", "Exposure in uAs" },
627 { 0x0018, 0x1154, "DS", "AveragePulseWidth" },
628 { 0x0018, 0x1155, "CS", "RadiationSetting" },
629 { 0x0018, 0x1156, "CS", "Rectification Type" },
630 { 0x0018, 0x115a, "CS", "RadiationMode" },
631 { 0x0018, 0x115e, "DS", "ImageAreaDoseProduct" },
632 { 0x0018, 0x1160, "SH", "Filter Type" },
633 { 0x0018, 0x1161, "LO", "TypeOfFilters" },
634 { 0x0018, 0x1162, "DS", "IntensifierSize" },
635 { 0x0018, 0x1164, "DS", "ImagerPixelSpacing" },
636 { 0x0018, 0x1166, "CS", "Grid" },
637 { 0x0018, 0x1170, "IS", "Generator Power" },
638 { 0x0018, 0x1180, "SH", "Collimator/Grid Name" },
639 { 0x0018, 0x1181, "CS", "Collimator Type" },
640 { 0x0018, 0x1182, "IS", "Focal Distance" },
641 { 0x0018, 0x1183, "DS", "X Focus Center" },
642 { 0x0018, 0x1184, "DS", "Y Focus Center" },
643 { 0x0018, 0x1190, "DS", "Focal Spot(s)" },
644 { 0x0018, 0x1191, "CS", "Anode Target Material" },
645 { 0x0018, 0x11a0, "DS", "Body Part Thickness" },
646 { 0x0018, 0x11a2, "DS", "Compression Force" },
647 { 0x0018, 0x1200, "DA", "Date of Last Calibration" },
648 { 0x0018, 0x1201, "TM", "Time of Last Calibration" },
649 { 0x0018, 0x1210, "SH", "Convolution Kernel" },
650 { 0x0018, 0x1240, "IS", "Upper/Lower Pixel Values" },
651 { 0x0018, 0x1242, "IS", "Actual Frame Duration" },
652 { 0x0018, 0x1243, "IS", "Count Rate" },
653 { 0x0018, 0x1244, "US", "Preferred Playback Sequencing" },
654 { 0x0018, 0x1250, "SH", "Receiving Coil" },
655 { 0x0018, 0x1251, "SH", "Transmitting Coil" },
656 { 0x0018, 0x1260, "SH", "Plate Type" },
657 { 0x0018, 0x1261, "LO", "Phosphor Type" },
658 { 0x0018, 0x1300, "DS", "Scan Velocity" },
659 { 0x0018, 0x1301, "CS", "Whole Body Technique" },
660 { 0x0018, 0x1302, "IS", "Scan Length" },
661 { 0x0018, 0x1310, "US", "Acquisition Matrix" },
662 { 0x0018, 0x1312, "CS", "Phase Encoding Direction" },
663 { 0x0018, 0x1314, "DS", "Flip Angle" },
664 { 0x0018, 0x1315, "CS", "Variable Flip Angle Flag" },
665 { 0x0018, 0x1316, "DS", "SAR" },
666 { 0x0018, 0x1318, "DS", "dB/dt" },
667 { 0x0018, 0x1400, "LO", "Acquisition Device Processing Description" },
668 { 0x0018, 0x1401, "LO", "Acquisition Device Processing Code" },
669 { 0x0018, 0x1402, "CS", "Cassette Orientation" },
670 { 0x0018, 0x1403, "CS", "Cassette Size" },
671 { 0x0018, 0x1404, "US", "Exposures on Plate" },
672 { 0x0018, 0x1405, "IS", "Relative X-ray Exposure" },
673 { 0x0018, 0x1450, "DS", "Column Angulation" },
674 { 0x0018, 0x1460, "DS", "Tomo Layer Height" },
675 { 0x0018, 0x1470, "DS", "Tomo Angle" },
676 { 0x0018, 0x1480, "DS", "Tomo Time" },
677 { 0x0018, 0x1490, "CS", "Tomo Type" },
678 { 0x0018, 0x1491, "CS", "Tomo Class" },
679 { 0x0018, 0x1495, "IS", "Number of Tomosynthesis Source Images" },
680 { 0x0018, 0x1500, "CS", "PositionerMotion" },
681 { 0x0018, 0x1508, "CS", "Positioner Type" },
682 { 0x0018, 0x1510, "DS", "PositionerPrimaryAngle" },
683 { 0x0018, 0x1511, "DS", "PositionerSecondaryAngle" },
684 { 0x0018, 0x1520, "DS", "PositionerPrimaryAngleIncrement" },
685 { 0x0018, 0x1521, "DS", "PositionerSecondaryAngleIncrement" },
686 { 0x0018, 0x1530, "DS", "DetectorPrimaryAngle" },
687 { 0x0018, 0x1531, "DS", "DetectorSecondaryAngle" },
688 { 0x0018, 0x1600, "CS", "Shutter Shape" },
689 { 0x0018, 0x1602, "IS", "Shutter Left Vertical Edge" },
690 { 0x0018, 0x1604, "IS", "Shutter Right Vertical Edge" },
691 { 0x0018, 0x1606, "IS", "Shutter Upper Horizontal Edge" },
692 { 0x0018, 0x1608, "IS", "Shutter Lower Horizonta lEdge" },
693 { 0x0018, 0x1610, "IS", "Center of Circular Shutter" },
694 { 0x0018, 0x1612, "IS", "Radius of Circular Shutter" },
695 { 0x0018, 0x1620, "IS", "Vertices of Polygonal Shutter" },
696 { 0x0018, 0x1622, "US", "Shutter Presentation Value" },
697 { 0x0018, 0x1623, "US", "Shutter Overlay Group" },
698 { 0x0018, 0x1700, "CS", "Collimator Shape" },
699 { 0x0018, 0x1702, "IS", "Collimator Left Vertical Edge" },
700 { 0x0018, 0x1704, "IS", "Collimator Right Vertical Edge" },
701 { 0x0018, 0x1706, "IS", "Collimator Upper Horizontal Edge" },
702 { 0x0018, 0x1708, "IS", "Collimator Lower Horizontal Edge" },
703 { 0x0018, 0x1710, "IS", "Center of Circular Collimator" },
704 { 0x0018, 0x1712, "IS", "Radius of Circular Collimator" },
705 { 0x0018, 0x1720, "IS", "Vertices of Polygonal Collimator" },
706 { 0x0018, 0x1800, "CS", "Acquisition Time Synchronized" },
707 { 0x0018, 0x1801, "SH", "Time Source" },
708 { 0x0018, 0x1802, "CS", "Time Distribution Protocol" },
709 { 0x0018, 0x4000, "LT", "Acquisition Comments" },
710 { 0x0018, 0x5000, "SH", "Output Power" },
711 { 0x0018, 0x5010, "LO", "Transducer Data" },
712 { 0x0018, 0x5012, "DS", "Focus Depth" },
713 { 0x0018, 0x5020, "LO", "Processing Function" },
714 { 0x0018, 0x5021, "LO", "Postprocessing Function" },
715 { 0x0018, 0x5022, "DS", "Mechanical Index" },
716 { 0x0018, 0x5024, "DS", "Thermal Index" },
717 { 0x0018, 0x5026, "DS", "Cranial Thermal Index" },
718 { 0x0018, 0x5027, "DS", "Soft Tissue Thermal Index" },
719 { 0x0018, 0x5028, "DS", "Soft Tissue-Focus Thermal Index" },
720 { 0x0018, 0x5029, "DS", "Soft Tissue-Surface Thermal Index" },
721 { 0x0018, 0x5030, "DS", "Dynamic Range" },
722 { 0x0018, 0x5040, "DS", "Total Gain" },
723 { 0x0018, 0x5050, "IS", "Depth of Scan Field" },
724 { 0x0018, 0x5100, "CS", "Patient Position" },
725 { 0x0018, 0x5101, "CS", "View Position" },
726 { 0x0018, 0x5104, "SQ", "Projection Eponymous Name Code Sequence" },
727 { 0x0018, 0x5210, "DS", "Image Transformation Matrix" },
728 { 0x0018, 0x5212, "DS", "Image Translation Vector" },
729 { 0x0018, 0x6000, "DS", "Sensitivity" },
730 { 0x0018, 0x6011, "IS", "Sequence of Ultrasound Regions" },
731 { 0x0018, 0x6012, "US", "Region Spatial Format" },
732 { 0x0018, 0x6014, "US", "Region Data Type" },
733 { 0x0018, 0x6016, "UL", "Region Flags" },
734 { 0x0018, 0x6018, "UL", "Region Location Min X0" },
735 { 0x0018, 0x601a, "UL", "Region Location Min Y0" },
736 { 0x0018, 0x601c, "UL", "Region Location Max X1" },
737 { 0x0018, 0x601e, "UL", "Region Location Max Y1" },
738 { 0x0018, 0x6020, "SL", "Reference Pixel X0" },
739 { 0x0018, 0x6022, "SL", "Reference Pixel Y0" },
740 { 0x0018, 0x6024, "US", "Physical Units X Direction" },
741 { 0x0018, 0x6026, "US", "Physical Units Y Direction" },
742 { 0x0018, 0x6028, "FD", "Reference Pixel Physical Value X" },
743 { 0x0018, 0x602a, "US", "Reference Pixel Physical Value Y" },
744 { 0x0018, 0x602c, "US", "Physical Delta X" },
745 { 0x0018, 0x602e, "US", "Physical Delta Y" },
746 { 0x0018, 0x6030, "UL", "Transducer Frequency" },
747 { 0x0018, 0x6031, "CS", "Transducer Type" },
748 { 0x0018, 0x6032, "UL", "Pulse Repetition Frequency" },
749 { 0x0018, 0x6034, "FD", "Doppler Correction Angle" },
750 { 0x0018, 0x6036, "FD", "Steering Angle" },
751 { 0x0018, 0x6038, "UL", "Doppler Sample Volume X Position" },
752 { 0x0018, 0x603a, "UL", "Doppler Sample Volume Y Position" },
753 { 0x0018, 0x603c, "UL", "TM-Line Position X0" },
754 { 0x0018, 0x603e, "UL", "TM-Line Position Y0" },
755 { 0x0018, 0x6040, "UL", "TM-Line Position X1" },
756 { 0x0018, 0x6042, "UL", "TM-Line Position Y1" },
757 { 0x0018, 0x6044, "US", "Pixel Component Organization" },
758 { 0x0018, 0x6046, "UL", "Pixel Component Mask" },
759 { 0x0018, 0x6048, "UL", "Pixel Component Range Start" },
760 { 0x0018, 0x604a, "UL", "Pixel Component Range Stop" },
761 { 0x0018, 0x604c, "US", "Pixel Component Physical Units" },
762 { 0x0018, 0x604e, "US", "Pixel Component Data Type" },
763 { 0x0018, 0x6050, "UL", "Number of Table Break Points" },
764 { 0x0018, 0x6052, "UL", "Table of X Break Points" },
765 { 0x0018, 0x6054, "FD", "Table of Y Break Points" },
766 { 0x0018, 0x6056, "UL", "Number of Table Entries" },
767 { 0x0018, 0x6058, "UL", "Table of Pixel Values" },
768 { 0x0018, 0x605a, "FL", "Table of Parameter Values" },
769 { 0x0018, 0x7000, "CS", "Detector Conditions Nominal Flag" },
770 { 0x0018, 0x7001, "DS", "Detector Temperature" },
771 { 0x0018, 0x7004, "CS", "Detector Type" },
772 { 0x0018, 0x7005, "CS", "Detector Configuration" },
773 { 0x0018, 0x7006, "LT", "Detector Description" },
774 { 0x0018, 0x7008, "LT", "Detector Mode" },
775 { 0x0018, 0x700a, "SH", "Detector ID" },
776 { 0x0018, 0x700c, "DA", "Date of Last Detector Calibration " },
777 { 0x0018, 0x700e, "TM", "Time of Last Detector Calibration" },
778 { 0x0018, 0x7010, "IS", "Exposures on Detector Since Last Calibration" },
779 { 0x0018, 0x7011, "IS", "Exposures on Detector Since Manufactured" },
780 { 0x0018, 0x7012, "DS", "Detector Time Since Last Exposure" },
781 { 0x0018, 0x7014, "DS", "Detector Active Time" },
782 { 0x0018, 0x7016, "DS", "Detector Activation Offset From Exposure" },
783 { 0x0018, 0x701a, "DS", "Detector Binning" },
784 { 0x0018, 0x7020, "DS", "Detector Element Physical Size" },
785 { 0x0018, 0x7022, "DS", "Detector Element Spacing" },
786 { 0x0018, 0x7024, "CS", "Detector Active Shape" },
787 { 0x0018, 0x7026, "DS", "Detector Active Dimensions" },
788 { 0x0018, 0x7028, "DS", "Detector Active Origin" },
789 { 0x0018, 0x7030, "DS", "Field of View Origin" },
790 { 0x0018, 0x7032, "DS", "Field of View Rotation" },
791 { 0x0018, 0x7034, "CS", "Field of View Horizontal Flip" },
792 { 0x0018, 0x7040, "LT", "Grid Absorbing Material" },
793 { 0x0018, 0x7041, "LT", "Grid Spacing Material" },
794 { 0x0018, 0x7042, "DS", "Grid Thickness" },
795 { 0x0018, 0x7044, "DS", "Grid Pitch" },
796 { 0x0018, 0x7046, "IS", "Grid Aspect Ratio" },
797 { 0x0018, 0x7048, "DS", "Grid Period" },
798 { 0x0018, 0x704c, "DS", "Grid Focal Distance" },
799 { 0x0018, 0x7050, "LT", "Filter Material" },
800 { 0x0018, 0x7052, "DS", "Filter Thickness Minimum" },
801 { 0x0018, 0x7054, "DS", "Filter Thickness Maximum" },
802 { 0x0018, 0x7060, "CS", "Exposure Control Mode" },
803 { 0x0018, 0x7062, "LT", "Exposure Control Mode Description" },
804 { 0x0018, 0x7064, "CS", "Exposure Status" },
805 { 0x0018, 0x7065, "DS", "Phototimer Setting" },
806 { 0x0019, 0x0000, "xs", "?" },
807 { 0x0019, 0x0001, "xs", "?" },
808 { 0x0019, 0x0002, "xs", "?" },
809 { 0x0019, 0x0003, "xs", "?" },
810 { 0x0019, 0x0004, "xs", "?" },
811 { 0x0019, 0x0005, "xs", "?" },
812 { 0x0019, 0x0006, "xs", "?" },
813 { 0x0019, 0x0007, "xs", "?" },
814 { 0x0019, 0x0008, "xs", "?" },
815 { 0x0019, 0x0009, "xs", "?" },
816 { 0x0019, 0x000a, "xs", "?" },
817 { 0x0019, 0x000b, "DS", "?" },
818 { 0x0019, 0x000c, "US", "?" },
819 { 0x0019, 0x000d, "TM", "Time" },
820 { 0x0019, 0x000e, "xs", "?" },
821 { 0x0019, 0x000f, "DS", "Horizontal Frame Of Reference" },
822 { 0x0019, 0x0010, "xs", "?" },
823 { 0x0019, 0x0011, "xs", "?" },
824 { 0x0019, 0x0012, "xs", "?" },
825 { 0x0019, 0x0013, "xs", "?" },
826 { 0x0019, 0x0014, "xs", "?" },
827 { 0x0019, 0x0015, "xs", "?" },
828 { 0x0019, 0x0016, "xs", "?" },
829 { 0x0019, 0x0017, "xs", "?" },
830 { 0x0019, 0x0018, "xs", "?" },
831 { 0x0019, 0x0019, "xs", "?" },
832 { 0x0019, 0x001a, "xs", "?" },
833 { 0x0019, 0x001b, "xs", "?" },
834 { 0x0019, 0x001c, "CS", "Dose" },
835 { 0x0019, 0x001d, "IS", "Side Mark" },
836 { 0x0019, 0x001e, "xs", "?" },
837 { 0x0019, 0x001f, "DS", "Exposure Duration" },
838 { 0x0019, 0x0020, "xs", "?" },
839 { 0x0019, 0x0021, "xs", "?" },
840 { 0x0019, 0x0022, "xs", "?" },
841 { 0x0019, 0x0023, "xs", "?" },
842 { 0x0019, 0x0024, "xs", "?" },
843 { 0x0019, 0x0025, "xs", "?" },
844 { 0x0019, 0x0026, "xs", "?" },
845 { 0x0019, 0x0027, "xs", "?" },
846 { 0x0019, 0x0028, "xs", "?" },
847 { 0x0019, 0x0029, "IS", "?" },
848 { 0x0019, 0x002a, "xs", "?" },
849 { 0x0019, 0x002b, "DS", "Xray Off Position" },
850 { 0x0019, 0x002c, "xs", "?" },
851 { 0x0019, 0x002d, "US", "?" },
852 { 0x0019, 0x002e, "xs", "?" },
853 { 0x0019, 0x002f, "DS", "Trigger Frequency" },
854 { 0x0019, 0x0030, "xs", "?" },
855 { 0x0019, 0x0031, "xs", "?" },
856 { 0x0019, 0x0032, "xs", "?" },
857 { 0x0019, 0x0033, "UN", "ECG 2 Offset 2" },
858 { 0x0019, 0x0034, "US", "?" },
859 { 0x0019, 0x0036, "US", "?" },
860 { 0x0019, 0x0038, "US", "?" },
861 { 0x0019, 0x0039, "xs", "?" },
862 { 0x0019, 0x003a, "xs", "?" },
863 { 0x0019, 0x003b, "LT", "?" },
864 { 0x0019, 0x003c, "xs", "?" },
865 { 0x0019, 0x003e, "xs", "?" },
866 { 0x0019, 0x003f, "UN", "?" },
867 { 0x0019, 0x0040, "xs", "?" },
868 { 0x0019, 0x0041, "xs", "?" },
869 { 0x0019, 0x0042, "xs", "?" },
870 { 0x0019, 0x0043, "xs", "?" },
871 { 0x0019, 0x0044, "xs", "?" },
872 { 0x0019, 0x0045, "xs", "?" },
873 { 0x0019, 0x0046, "xs", "?" },
874 { 0x0019, 0x0047, "xs", "?" },
875 { 0x0019, 0x0048, "xs", "?" },
876 { 0x0019, 0x0049, "US", "?" },
877 { 0x0019, 0x004a, "xs", "?" },
878 { 0x0019, 0x004b, "SL", "Data Size For Scan Data" },
879 { 0x0019, 0x004c, "US", "?" },
880 { 0x0019, 0x004e, "US", "?" },
881 { 0x0019, 0x0050, "xs", "?" },
882 { 0x0019, 0x0051, "xs", "?" },
883 { 0x0019, 0x0052, "xs", "?" },
884 { 0x0019, 0x0053, "LT", "Barcode" },
885 { 0x0019, 0x0054, "xs", "?" },
886 { 0x0019, 0x0055, "DS", "Receiver Reference Gain" },
887 { 0x0019, 0x0056, "xs", "?" },
888 { 0x0019, 0x0057, "SS", "CT Water Number" },
889 { 0x0019, 0x0058, "xs", "?" },
890 { 0x0019, 0x005a, "xs", "?" },
891 { 0x0019, 0x005c, "xs", "?" },
892 { 0x0019, 0x005d, "US", "?" },
893 { 0x0019, 0x005e, "xs", "?" },
894 { 0x0019, 0x005f, "SL", "Increment Between Channels" },
895 { 0x0019, 0x0060, "xs", "?" },
896 { 0x0019, 0x0061, "xs", "?" },
897 { 0x0019, 0x0062, "xs", "?" },
898 { 0x0019, 0x0063, "xs", "?" },
899 { 0x0019, 0x0064, "xs", "?" },
900 { 0x0019, 0x0065, "xs", "?" },
901 { 0x0019, 0x0066, "xs", "?" },
902 { 0x0019, 0x0067, "xs", "?" },
903 { 0x0019, 0x0068, "xs", "?" },
904 { 0x0019, 0x0069, "UL", "Convolution Mode" },
905 { 0x0019, 0x006a, "xs", "?" },
906 { 0x0019, 0x006b, "SS", "Field Of View In Detector Cells" },
907 { 0x0019, 0x006c, "US", "?" },
908 { 0x0019, 0x006e, "US", "?" },
909 { 0x0019, 0x0070, "xs", "?" },
910 { 0x0019, 0x0071, "xs", "?" },
911 { 0x0019, 0x0072, "xs", "?" },
912 { 0x0019, 0x0073, "xs", "?" },
913 { 0x0019, 0x0074, "xs", "?" },
914 { 0x0019, 0x0075, "xs", "?" },
915 { 0x0019, 0x0076, "xs", "?" },
916 { 0x0019, 0x0077, "US", "?" },
917 { 0x0019, 0x0078, "US", "?" },
918 { 0x0019, 0x007a, "US", "?" },
919 { 0x0019, 0x007c, "US", "?" },
920 { 0x0019, 0x007d, "DS", "Second Echo" },
921 { 0x0019, 0x007e, "xs", "?" },
922 { 0x0019, 0x007f, "DS", "Table Delta" },
923 { 0x0019, 0x0080, "xs", "?" },
924 { 0x0019, 0x0081, "xs", "?" },
925 { 0x0019, 0x0082, "xs", "?" },
926 { 0x0019, 0x0083, "xs", "?" },
927 { 0x0019, 0x0084, "xs", "?" },
928 { 0x0019, 0x0085, "xs", "?" },
929 { 0x0019, 0x0086, "xs", "?" },
930 { 0x0019, 0x0087, "xs", "?" },
931 { 0x0019, 0x0088, "xs", "?" },
932 { 0x0019, 0x008a, "xs", "?" },
933 { 0x0019, 0x008b, "SS", "Actual Receive Gain Digital" },
934 { 0x0019, 0x008c, "US", "?" },
935 { 0x0019, 0x008d, "DS", "Delay After Trigger" },
936 { 0x0019, 0x008e, "US", "?" },
937 { 0x0019, 0x008f, "SS", "Swap Phase Frequency" },
938 { 0x0019, 0x0090, "xs", "?" },
939 { 0x0019, 0x0091, "xs", "?" },
940 { 0x0019, 0x0092, "xs", "?" },
941 { 0x0019, 0x0093, "xs", "?" },
942 { 0x0019, 0x0094, "xs", "?" },
943 { 0x0019, 0x0095, "SS", "Analog Receiver Gain" },
944 { 0x0019, 0x0096, "xs", "?" },
945 { 0x0019, 0x0097, "xs", "?" },
946 { 0x0019, 0x0098, "xs", "?" },
947 { 0x0019, 0x0099, "US", "?" },
948 { 0x0019, 0x009a, "US", "?" },
949 { 0x0019, 0x009b, "SS", "Pulse Sequence Mode" },
950 { 0x0019, 0x009c, "xs", "?" },
951 { 0x0019, 0x009d, "DT", "Pulse Sequence Date" },
952 { 0x0019, 0x009e, "xs", "?" },
953 { 0x0019, 0x009f, "xs", "?" },
954 { 0x0019, 0x00a0, "xs", "?" },
955 { 0x0019, 0x00a1, "xs", "?" },
956 { 0x0019, 0x00a2, "xs", "?" },
957 { 0x0019, 0x00a3, "xs", "?" },
958 { 0x0019, 0x00a4, "xs", "?" },
959 { 0x0019, 0x00a5, "xs", "?" },
960 { 0x0019, 0x00a6, "xs", "?" },
961 { 0x0019, 0x00a7, "xs", "?" },
962 { 0x0019, 0x00a8, "xs", "?" },
963 { 0x0019, 0x00a9, "xs", "?" },
964 { 0x0019, 0x00aa, "xs", "?" },
965 { 0x0019, 0x00ab, "xs", "?" },
966 { 0x0019, 0x00ac, "xs", "?" },
967 { 0x0019, 0x00ad, "xs", "?" },
968 { 0x0019, 0x00ae, "xs", "?" },
969 { 0x0019, 0x00af, "xs", "?" },
970 { 0x0019, 0x00b0, "xs", "?" },
971 { 0x0019, 0x00b1, "xs", "?" },
972 { 0x0019, 0x00b2, "xs", "?" },
973 { 0x0019, 0x00b3, "xs", "?" },
974 { 0x0019, 0x00b4, "xs", "?" },
975 { 0x0019, 0x00b5, "xs", "?" },
976 { 0x0019, 0x00b6, "DS", "User Data" },
977 { 0x0019, 0x00b7, "DS", "User Data" },
978 { 0x0019, 0x00b8, "DS", "User Data" },
979 { 0x0019, 0x00b9, "DS", "User Data" },
980 { 0x0019, 0x00ba, "DS", "User Data" },
981 { 0x0019, 0x00bb, "DS", "User Data" },
982 { 0x0019, 0x00bc, "DS", "User Data" },
983 { 0x0019, 0x00bd, "DS", "User Data" },
984 { 0x0019, 0x00be, "DS", "Projection Angle" },
985 { 0x0019, 0x00c0, "xs", "?" },
986 { 0x0019, 0x00c1, "xs", "?" },
987 { 0x0019, 0x00c2, "xs", "?" },
988 { 0x0019, 0x00c3, "xs", "?" },
989 { 0x0019, 0x00c4, "xs", "?" },
990 { 0x0019, 0x00c5, "xs", "?" },
991 { 0x0019, 0x00c6, "SS", "SAT Location H" },
992 { 0x0019, 0x00c7, "SS", "SAT Location F" },
993 { 0x0019, 0x00c8, "SS", "SAT Thickness R L" },
994 { 0x0019, 0x00c9, "SS", "SAT Thickness A P" },
995 { 0x0019, 0x00ca, "SS", "SAT Thickness H F" },
996 { 0x0019, 0x00cb, "xs", "?" },
997 { 0x0019, 0x00cc, "xs", "?" },
998 { 0x0019, 0x00cd, "SS", "Thickness Disclaimer" },
999 { 0x0019, 0x00ce, "SS", "Prescan Type" },
1000 { 0x0019, 0x00cf, "SS", "Prescan Status" },
1001 { 0x0019, 0x00d0, "SH", "Raw Data Type" },
1002 { 0x0019, 0x00d1, "DS", "Flow Sensitivity" },
1003 { 0x0019, 0x00d2, "xs", "?" },
1004 { 0x0019, 0x00d3, "xs", "?" },
1005 { 0x0019, 0x00d4, "xs", "?" },
1006 { 0x0019, 0x00d5, "xs", "?" },
1007 { 0x0019, 0x00d6, "xs", "?" },
1008 { 0x0019, 0x00d7, "xs", "?" },
1009 { 0x0019, 0x00d8, "xs", "?" },
1010 { 0x0019, 0x00d9, "xs", "?" },
1011 { 0x0019, 0x00da, "xs", "?" },
1012 { 0x0019, 0x00db, "DS", "Back Projector Coefficient" },
1013 { 0x0019, 0x00dc, "SS", "Primary Speed Correction Used" },
1014 { 0x0019, 0x00dd, "SS", "Overrange Correction Used" },
1015 { 0x0019, 0x00de, "DS", "Dynamic Z Alpha Value" },
1016 { 0x0019, 0x00df, "DS", "User Data" },
1017 { 0x0019, 0x00e0, "DS", "User Data" },
1018 { 0x0019, 0x00e1, "xs", "?" },
1019 { 0x0019, 0x00e2, "xs", "?" },
1020 { 0x0019, 0x00e3, "xs", "?" },
1021 { 0x0019, 0x00e4, "LT", "?" },
1022 { 0x0019, 0x00e5, "IS", "?" },
1023 { 0x0019, 0x00e6, "US", "?" },
1024 { 0x0019, 0x00e8, "DS", "?" },
1025 { 0x0019, 0x00e9, "DS", "?" },
1026 { 0x0019, 0x00eb, "DS", "?" },
1027 { 0x0019, 0x00ec, "US", "?" },
1028 { 0x0019, 0x00f0, "xs", "?" },
1029 { 0x0019, 0x00f1, "xs", "?" },
1030 { 0x0019, 0x00f2, "xs", "?" },
1031 { 0x0019, 0x00f3, "xs", "?" },
1032 { 0x0019, 0x00f4, "LT", "?" },
1033 { 0x0019, 0x00f9, "DS", "Transmission Gain" },
1034 { 0x0019, 0x1015, "UN", "?" },
1035 { 0x0020, 0x0000, "UL", "Relationship Group Length" },
1036 { 0x0020, 0x000d, "UI", "Study Instance UID" },
1037 { 0x0020, 0x000e, "UI", "Series Instance UID" },
1038 { 0x0020, 0x0010, "SH", "Study ID" },
1039 { 0x0020, 0x0011, "IS", "Series Number" },
1040 { 0x0020, 0x0012, "IS", "Acquisition Number" },
1041 { 0x0020, 0x0013, "IS", "Instance (formerly Image) Number" },
1042 { 0x0020, 0x0014, "IS", "Isotope Number" },
1043 { 0x0020, 0x0015, "IS", "Phase Number" },
1044 { 0x0020, 0x0016, "IS", "Interval Number" },
1045 { 0x0020, 0x0017, "IS", "Time Slot Number" },
1046 { 0x0020, 0x0018, "IS", "Angle Number" },
1047 { 0x0020, 0x0020, "CS", "Patient Orientation" },
1048 { 0x0020, 0x0022, "IS", "Overlay Number" },
1049 { 0x0020, 0x0024, "IS", "Curve Number" },
1050 { 0x0020, 0x0026, "IS", "LUT Number" },
1051 { 0x0020, 0x0030, "DS", "Image Position" },
1052 { 0x0020, 0x0032, "DS", "Image Position (Patient)" },
1053 { 0x0020, 0x0035, "DS", "Image Orientation" },
1054 { 0x0020, 0x0037, "DS", "Image Orientation (Patient)" },
1055 { 0x0020, 0x0050, "DS", "Location" },
1056 { 0x0020, 0x0052, "UI", "Frame of Reference UID" },
1057 { 0x0020, 0x0060, "CS", "Laterality" },
1058 { 0x0020, 0x0062, "CS", "Image Laterality" },
1059 { 0x0020, 0x0070, "LT", "Image Geometry Type" },
1060 { 0x0020, 0x0080, "LO", "Masking Image" },
1061 { 0x0020, 0x0100, "IS", "Temporal Position Identifier" },
1062 { 0x0020, 0x0105, "IS", "Number of Temporal Positions" },
1063 { 0x0020, 0x0110, "DS", "Temporal Resolution" },
1064 { 0x0020, 0x1000, "IS", "Series in Study" },
1065 { 0x0020, 0x1001, "DS", "Acquisitions in Series" },
1066 { 0x0020, 0x1002, "IS", "Images in Acquisition" },
1067 { 0x0020, 0x1003, "IS", "Images in Series" },
1068 { 0x0020, 0x1004, "IS", "Acquisitions in Study" },
1069 { 0x0020, 0x1005, "IS", "Images in Study" },
1070 { 0x0020, 0x1020, "LO", "Reference" },
1071 { 0x0020, 0x1040, "LO", "Position Reference Indicator" },
1072 { 0x0020, 0x1041, "DS", "Slice Location" },
1073 { 0x0020, 0x1070, "IS", "Other Study Numbers" },
1074 { 0x0020, 0x1200, "IS", "Number of Patient Related Studies" },
1075 { 0x0020, 0x1202, "IS", "Number of Patient Related Series" },
1076 { 0x0020, 0x1204, "IS", "Number of Patient Related Images" },
1077 { 0x0020, 0x1206, "IS", "Number of Study Related Series" },
1078 { 0x0020, 0x1208, "IS", "Number of Study Related Series" },
1079 { 0x0020, 0x3100, "LO", "Source Image IDs" },
1080 { 0x0020, 0x3401, "LO", "Modifying Device ID" },
1081 { 0x0020, 0x3402, "LO", "Modified Image ID" },
1082 { 0x0020, 0x3403, "xs", "Modified Image Date" },
1083 { 0x0020, 0x3404, "LO", "Modifying Device Manufacturer" },
1084 { 0x0020, 0x3405, "xs", "Modified Image Time" },
1085 { 0x0020, 0x3406, "xs", "Modified Image Description" },
1086 { 0x0020, 0x4000, "LT", "Image Comments" },
1087 { 0x0020, 0x5000, "AT", "Original Image Identification" },
1088 { 0x0020, 0x5002, "LO", "Original Image Identification Nomenclature" },
1089 { 0x0021, 0x0000, "xs", "?" },
1090 { 0x0021, 0x0001, "xs", "?" },
1091 { 0x0021, 0x0002, "xs", "?" },
1092 { 0x0021, 0x0003, "xs", "?" },
1093 { 0x0021, 0x0004, "DS", "VOI Position" },
1094 { 0x0021, 0x0005, "xs", "?" },
1095 { 0x0021, 0x0006, "IS", "CSI Matrix Size Original" },
1096 { 0x0021, 0x0007, "xs", "?" },
1097 { 0x0021, 0x0008, "DS", "Spatial Grid Shift" },
1098 { 0x0021, 0x0009, "DS", "Signal Limits Minimum" },
1099 { 0x0021, 0x0010, "xs", "?" },
1100 { 0x0021, 0x0011, "xs", "?" },
1101 { 0x0021, 0x0012, "xs", "?" },
1102 { 0x0021, 0x0013, "xs", "?" },
1103 { 0x0021, 0x0014, "xs", "?" },
1104 { 0x0021, 0x0015, "xs", "?" },
1105 { 0x0021, 0x0016, "xs", "?" },
1106 { 0x0021, 0x0017, "DS", "EPI Operation Mode Flag" },
1107 { 0x0021, 0x0018, "xs", "?" },
1108 { 0x0021, 0x0019, "xs", "?" },
1109 { 0x0021, 0x0020, "xs", "?" },
1110 { 0x0021, 0x0021, "xs", "?" },
1111 { 0x0021, 0x0022, "xs", "?" },
1112 { 0x0021, 0x0024, "xs", "?" },
1113 { 0x0021, 0x0025, "US", "?" },
1114 { 0x0021, 0x0026, "IS", "Image Pixel Offset" },
1115 { 0x0021, 0x0030, "xs", "?" },
1116 { 0x0021, 0x0031, "xs", "?" },
1117 { 0x0021, 0x0032, "xs", "?" },
1118 { 0x0021, 0x0034, "xs", "?" },
1119 { 0x0021, 0x0035, "SS", "Series From Which Prescribed" },
1120 { 0x0021, 0x0036, "xs", "?" },
1121 { 0x0021, 0x0037, "SS", "Screen Format" },
1122 { 0x0021, 0x0039, "DS", "Slab Thickness" },
1123 { 0x0021, 0x0040, "xs", "?" },
1124 { 0x0021, 0x0041, "xs", "?" },
1125 { 0x0021, 0x0042, "xs", "?" },
1126 { 0x0021, 0x0043, "xs", "?" },
1127 { 0x0021, 0x0044, "xs", "?" },
1128 { 0x0021, 0x0045, "xs", "?" },
1129 { 0x0021, 0x0046, "xs", "?" },
1130 { 0x0021, 0x0047, "xs", "?" },
1131 { 0x0021, 0x0048, "xs", "?" },
1132 { 0x0021, 0x0049, "xs", "?" },
1133 { 0x0021, 0x004a, "xs", "?" },
1134 { 0x0021, 0x004e, "US", "?" },
1135 { 0x0021, 0x004f, "xs", "?" },
1136 { 0x0021, 0x0050, "xs", "?" },
1137 { 0x0021, 0x0051, "xs", "?" },
1138 { 0x0021, 0x0052, "xs", "?" },
1139 { 0x0021, 0x0053, "xs", "?" },
1140 { 0x0021, 0x0054, "xs", "?" },
1141 { 0x0021, 0x0055, "xs", "?" },
1142 { 0x0021, 0x0056, "xs", "?" },
1143 { 0x0021, 0x0057, "xs", "?" },
1144 { 0x0021, 0x0058, "xs", "?" },
1145 { 0x0021, 0x0059, "xs", "?" },
1146 { 0x0021, 0x005a, "SL", "Integer Slop" },
1147 { 0x0021, 0x005b, "DS", "Float Slop" },
1148 { 0x0021, 0x005c, "DS", "Float Slop" },
1149 { 0x0021, 0x005d, "DS", "Float Slop" },
1150 { 0x0021, 0x005e, "DS", "Float Slop" },
1151 { 0x0021, 0x005f, "DS", "Float Slop" },
1152 { 0x0021, 0x0060, "xs", "?" },
1153 { 0x0021, 0x0061, "DS", "Image Normal" },
1154 { 0x0021, 0x0062, "IS", "Reference Type Code" },
1155 { 0x0021, 0x0063, "DS", "Image Distance" },
1156 { 0x0021, 0x0065, "US", "Image Positioning History Mask" },
1157 { 0x0021, 0x006a, "DS", "Image Row" },
1158 { 0x0021, 0x006b, "DS", "Image Column" },
1159 { 0x0021, 0x0070, "xs", "?" },
1160 { 0x0021, 0x0071, "xs", "?" },
1161 { 0x0021, 0x0072, "xs", "?" },
1162 { 0x0021, 0x0073, "DS", "Second Repetition Time" },
1163 { 0x0021, 0x0075, "DS", "Light Brightness" },
1164 { 0x0021, 0x0076, "DS", "Light Contrast" },
1165 { 0x0021, 0x007a, "IS", "Overlay Threshold" },
1166 { 0x0021, 0x007b, "IS", "Surface Threshold" },
1167 { 0x0021, 0x007c, "IS", "Grey Scale Threshold" },
1168 { 0x0021, 0x0080, "xs", "?" },
1169 { 0x0021, 0x0081, "DS", "Auto Window Level Alpha" },
1170 { 0x0021, 0x0082, "xs", "?" },
1171 { 0x0021, 0x0083, "DS", "Auto Window Level Window" },
1172 { 0x0021, 0x0084, "DS", "Auto Window Level Level" },
1173 { 0x0021, 0x0090, "xs", "?" },
1174 { 0x0021, 0x0091, "xs", "?" },
1175 { 0x0021, 0x0092, "xs", "?" },
1176 { 0x0021, 0x0093, "xs", "?" },
1177 { 0x0021, 0x0094, "DS", "EPI Change Value of X Component" },
1178 { 0x0021, 0x0095, "DS", "EPI Change Value of Y Component" },
1179 { 0x0021, 0x0096, "DS", "EPI Change Value of Z Component" },
1180 { 0x0021, 0x00a0, "xs", "?" },
1181 { 0x0021, 0x00a1, "DS", "?" },
1182 { 0x0021, 0x00a2, "xs", "?" },
1183 { 0x0021, 0x00a3, "LT", "?" },
1184 { 0x0021, 0x00a4, "LT", "?" },
1185 { 0x0021, 0x00a7, "LT", "?" },
1186 { 0x0021, 0x00b0, "IS", "?" },
1187 { 0x0021, 0x00c0, "IS", "?" },
1188 { 0x0023, 0x0000, "xs", "?" },
1189 { 0x0023, 0x0001, "SL", "Number Of Series In Study" },
1190 { 0x0023, 0x0002, "SL", "Number Of Unarchived Series" },
1191 { 0x0023, 0x0010, "xs", "?" },
1192 { 0x0023, 0x0020, "xs", "?" },
1193 { 0x0023, 0x0030, "xs", "?" },
1194 { 0x0023, 0x0040, "xs", "?" },
1195 { 0x0023, 0x0050, "xs", "?" },
1196 { 0x0023, 0x0060, "xs", "?" },
1197 { 0x0023, 0x0070, "xs", "?" },
1198 { 0x0023, 0x0074, "SL", "Number Of Updates To Info" },
1199 { 0x0023, 0x007d, "SS", "Indicates If Study Has Complete Info" },
1200 { 0x0023, 0x0080, "xs", "?" },
1201 { 0x0023, 0x0090, "xs", "?" },
1202 { 0x0023, 0x00ff, "US", "?" },
1203 { 0x0025, 0x0000, "UL", "Group Length" },
1204 { 0x0025, 0x0006, "SS", "Last Pulse Sequence Used" },
1205 { 0x0025, 0x0007, "SL", "Images In Series" },
1206 { 0x0025, 0x0010, "SS", "Landmark Counter" },
1207 { 0x0025, 0x0011, "SS", "Number Of Acquisitions" },
1208 { 0x0025, 0x0014, "SL", "Indicates Number Of Updates To Info" },
1209 { 0x0025, 0x0017, "SL", "Series Complete Flag" },
1210 { 0x0025, 0x0018, "SL", "Number Of Images Archived" },
1211 { 0x0025, 0x0019, "SL", "Last Image Number Used" },
1212 { 0x0025, 0x001a, "SH", "Primary Receiver Suite And Host" },
1213 { 0x0027, 0x0000, "US", "?" },
1214 { 0x0027, 0x0006, "SL", "Image Archive Flag" },
1215 { 0x0027, 0x0010, "SS", "Scout Type" },
1216 { 0x0027, 0x0011, "UN", "?" },
1217 { 0x0027, 0x0012, "IS", "?" },
1218 { 0x0027, 0x0013, "IS", "?" },
1219 { 0x0027, 0x0014, "IS", "?" },
1220 { 0x0027, 0x0015, "IS", "?" },
1221 { 0x0027, 0x0016, "LT", "?" },
1222 { 0x0027, 0x001c, "SL", "Vma Mamp" },
1223 { 0x0027, 0x001d, "SS", "Vma Phase" },
1224 { 0x0027, 0x001e, "SL", "Vma Mod" },
1225 { 0x0027, 0x001f, "SL", "Vma Clip" },
1226 { 0x0027, 0x0020, "SS", "Smart Scan On Off Flag" },
1227 { 0x0027, 0x0030, "SH", "Foreign Image Revision" },
1228 { 0x0027, 0x0031, "SS", "Imaging Mode" },
1229 { 0x0027, 0x0032, "SS", "Pulse Sequence" },
1230 { 0x0027, 0x0033, "SL", "Imaging Options" },
1231 { 0x0027, 0x0035, "SS", "Plane Type" },
1232 { 0x0027, 0x0036, "SL", "Oblique Plane" },
1233 { 0x0027, 0x0040, "SH", "RAS Letter Of Image Location" },
1234 { 0x0027, 0x0041, "FL", "Image Location" },
1235 { 0x0027, 0x0042, "FL", "Center R Coord Of Plane Image" },
1236 { 0x0027, 0x0043, "FL", "Center A Coord Of Plane Image" },
1237 { 0x0027, 0x0044, "FL", "Center S Coord Of Plane Image" },
1238 { 0x0027, 0x0045, "FL", "Normal R Coord" },
1239 { 0x0027, 0x0046, "FL", "Normal A Coord" },
1240 { 0x0027, 0x0047, "FL", "Normal S Coord" },
1241 { 0x0027, 0x0048, "FL", "R Coord Of Top Right Corner" },
1242 { 0x0027, 0x0049, "FL", "A Coord Of Top Right Corner" },
1243 { 0x0027, 0x004a, "FL", "S Coord Of Top Right Corner" },
1244 { 0x0027, 0x004b, "FL", "R Coord Of Bottom Right Corner" },
1245 { 0x0027, 0x004c, "FL", "A Coord Of Bottom Right Corner" },
1246 { 0x0027, 0x004d, "FL", "S Coord Of Bottom Right Corner" },
1247 { 0x0027, 0x0050, "FL", "Table Start Location" },
1248 { 0x0027, 0x0051, "FL", "Table End Location" },
1249 { 0x0027, 0x0052, "SH", "RAS Letter For Side Of Image" },
1250 { 0x0027, 0x0053, "SH", "RAS Letter For Anterior Posterior" },
1251 { 0x0027, 0x0054, "SH", "RAS Letter For Scout Start Loc" },
1252 { 0x0027, 0x0055, "SH", "RAS Letter For Scout End Loc" },
1253 { 0x0027, 0x0060, "FL", "Image Dimension X" },
1254 { 0x0027, 0x0061, "FL", "Image Dimension Y" },
1255 { 0x0027, 0x0062, "FL", "Number Of Excitations" },
1256 { 0x0028, 0x0000, "UL", "Image Presentation Group Length" },
1257 { 0x0028, 0x0002, "US", "Samples per Pixel" },
1258 { 0x0028, 0x0004, "CS", "Photometric Interpretation" },
1259 { 0x0028, 0x0005, "US", "Image Dimensions" },
1260 { 0x0028, 0x0006, "US", "Planar Configuration" },
1261 { 0x0028, 0x0008, "IS", "Number of Frames" },
1262 { 0x0028, 0x0009, "AT", "Frame Increment Pointer" },
1263 { 0x0028, 0x0010, "US", "Rows" },
1264 { 0x0028, 0x0011, "US", "Columns" },
1265 { 0x0028, 0x0012, "US", "Planes" },
1266 { 0x0028, 0x0014, "US", "Ultrasound Color Data Present" },
1267 { 0x0028, 0x0030, "DS", "Pixel Spacing" },
1268 { 0x0028, 0x0031, "DS", "Zoom Factor" },
1269 { 0x0028, 0x0032, "DS", "Zoom Center" },
1270 { 0x0028, 0x0034, "IS", "Pixel Aspect Ratio" },
1271 { 0x0028, 0x0040, "LO", "Image Format" },
1272 { 0x0028, 0x0050, "LT", "Manipulated Image" },
1273 { 0x0028, 0x0051, "CS", "Corrected Image" },
1274 { 0x0028, 0x005f, "LO", "Compression Recognition Code" },
1275 { 0x0028, 0x0060, "LO", "Compression Code" },
1276 { 0x0028, 0x0061, "SH", "Compression Originator" },
1277 { 0x0028, 0x0062, "SH", "Compression Label" },
1278 { 0x0028, 0x0063, "SH", "Compression Description" },
1279 { 0x0028, 0x0065, "LO", "Compression Sequence" },
1280 { 0x0028, 0x0066, "AT", "Compression Step Pointers" },
1281 { 0x0028, 0x0068, "US", "Repeat Interval" },
1282 { 0x0028, 0x0069, "US", "Bits Grouped" },
1283 { 0x0028, 0x0070, "US", "Perimeter Table" },
1284 { 0x0028, 0x0071, "xs", "Perimeter Value" },
1285 { 0x0028, 0x0080, "US", "Predictor Rows" },
1286 { 0x0028, 0x0081, "US", "Predictor Columns" },
1287 { 0x0028, 0x0082, "US", "Predictor Constants" },
1288 { 0x0028, 0x0090, "LO", "Blocked Pixels" },
1289 { 0x0028, 0x0091, "US", "Block Rows" },
1290 { 0x0028, 0x0092, "US", "Block Columns" },
1291 { 0x0028, 0x0093, "US", "Row Overlap" },
1292 { 0x0028, 0x0094, "US", "Column Overlap" },
1293 { 0x0028, 0x0100, "US", "Bits Allocated" },
1294 { 0x0028, 0x0101, "US", "Bits Stored" },
1295 { 0x0028, 0x0102, "US", "High Bit" },
1296 { 0x0028, 0x0103, "US", "Pixel Representation" },
1297 { 0x0028, 0x0104, "xs", "Smallest Valid Pixel Value" },
1298 { 0x0028, 0x0105, "xs", "Largest Valid Pixel Value" },
1299 { 0x0028, 0x0106, "xs", "Smallest Image Pixel Value" },
1300 { 0x0028, 0x0107, "xs", "Largest Image Pixel Value" },
1301 { 0x0028, 0x0108, "xs", "Smallest Pixel Value in Series" },
1302 { 0x0028, 0x0109, "xs", "Largest Pixel Value in Series" },
1303 { 0x0028, 0x0110, "xs", "Smallest Pixel Value in Plane" },
1304 { 0x0028, 0x0111, "xs", "Largest Pixel Value in Plane" },
1305 { 0x0028, 0x0120, "xs", "Pixel Padding Value" },
1306 { 0x0028, 0x0200, "xs", "Image Location" },
1307 { 0x0028, 0x0300, "CS", "Quality Control Image" },
1308 { 0x0028, 0x0301, "CS", "Burned In Annotation" },
1309 { 0x0028, 0x0400, "xs", "?" },
1310 { 0x0028, 0x0401, "xs", "?" },
1311 { 0x0028, 0x0402, "xs", "?" },
1312 { 0x0028, 0x0403, "xs", "?" },
1313 { 0x0028, 0x0404, "AT", "Details of Coefficients" },
1314 { 0x0028, 0x0700, "LO", "DCT Label" },
1315 { 0x0028, 0x0701, "LO", "Data Block Description" },
1316 { 0x0028, 0x0702, "AT", "Data Block" },
1317 { 0x0028, 0x0710, "US", "Normalization Factor Format" },
1318 { 0x0028, 0x0720, "US", "Zonal Map Number Format" },
1319 { 0x0028, 0x0721, "AT", "Zonal Map Location" },
1320 { 0x0028, 0x0722, "US", "Zonal Map Format" },
1321 { 0x0028, 0x0730, "US", "Adaptive Map Format" },
1322 { 0x0028, 0x0740, "US", "Code Number Format" },
1323 { 0x0028, 0x0800, "LO", "Code Label" },
1324 { 0x0028, 0x0802, "US", "Number of Tables" },
1325 { 0x0028, 0x0803, "AT", "Code Table Location" },
1326 { 0x0028, 0x0804, "US", "Bits For Code Word" },
1327 { 0x0028, 0x0808, "AT", "Image Data Location" },
1328 { 0x0028, 0x1040, "CS", "Pixel Intensity Relationship" },
1329 { 0x0028, 0x1041, "SS", "Pixel Intensity Relationship Sign" },
1330 { 0x0028, 0x1050, "DS", "Window Center" },
1331 { 0x0028, 0x1051, "DS", "Window Width" },
1332 { 0x0028, 0x1052, "DS", "Rescale Intercept" },
1333 { 0x0028, 0x1053, "DS", "Rescale Slope" },
1334 { 0x0028, 0x1054, "LO", "Rescale Type" },
1335 { 0x0028, 0x1055, "LO", "Window Center & Width Explanation" },
1336 { 0x0028, 0x1080, "LO", "Gray Scale" },
1337 { 0x0028, 0x1090, "CS", "Recommended Viewing Mode" },
1338 { 0x0028, 0x1100, "xs", "Gray Lookup Table Descriptor" },
1339 { 0x0028, 0x1101, "xs", "Red Palette Color Lookup Table Descriptor" },
1340 { 0x0028, 0x1102, "xs", "Green Palette Color Lookup Table Descriptor" },
1341 { 0x0028, 0x1103, "xs", "Blue Palette Color Lookup Table Descriptor" },
1342 { 0x0028, 0x1111, "OW", "Large Red Palette Color Lookup Table Descriptor" },
1343 { 0x0028, 0x1112, "OW", "Large Green Palette Color Lookup Table Descriptor" },
1344 { 0x0028, 0x1113, "OW", "Large Blue Palette Color Lookup Table Descriptor" },
1345 { 0x0028, 0x1199, "UI", "Palette Color Lookup Table UID" },
1346 { 0x0028, 0x1200, "xs", "Gray Lookup Table Data" },
1347 { 0x0028, 0x1201, "OW", "Red Palette Color Lookup Table Data" },
1348 { 0x0028, 0x1202, "OW", "Green Palette Color Lookup Table Data" },
1349 { 0x0028, 0x1203, "OW", "Blue Palette Color Lookup Table Data" },
1350 { 0x0028, 0x1211, "OW", "Large Red Palette Color Lookup Table Data" },
1351 { 0x0028, 0x1212, "OW", "Large Green Palette Color Lookup Table Data" },
1352 { 0x0028, 0x1213, "OW", "Large Blue Palette Color Lookup Table Data" },
1353 { 0x0028, 0x1214, "UI", "Large Palette Color Lookup Table UID" },
1354 { 0x0028, 0x1221, "OW", "Segmented Red Palette Color Lookup Table Data" },
1355 { 0x0028, 0x1222, "OW", "Segmented Green Palette Color Lookup Table Data" },
1356 { 0x0028, 0x1223, "OW", "Segmented Blue Palette Color Lookup Table Data" },
1357 { 0x0028, 0x1300, "CS", "Implant Present" },
1358 { 0x0028, 0x2110, "CS", "Lossy Image Compression" },
1359 { 0x0028, 0x2112, "DS", "Lossy Image Compression Ratio" },
1360 { 0x0028, 0x3000, "SQ", "Modality LUT Sequence" },
1361 { 0x0028, 0x3002, "US", "LUT Descriptor" },
1362 { 0x0028, 0x3003, "LO", "LUT Explanation" },
1363 { 0x0028, 0x3004, "LO", "Modality LUT Type" },
1364 { 0x0028, 0x3006, "US", "LUT Data" },
1365 { 0x0028, 0x3010, "xs", "VOI LUT Sequence" },
1366 { 0x0028, 0x4000, "LT", "Image Presentation Comments" },
1367 { 0x0028, 0x5000, "SQ", "Biplane Acquisition Sequence" },
1368 { 0x0028, 0x6010, "US", "Representative Frame Number" },
1369 { 0x0028, 0x6020, "US", "Frame Numbers of Interest" },
1370 { 0x0028, 0x6022, "LO", "Frame of Interest Description" },
1371 { 0x0028, 0x6030, "US", "Mask Pointer" },
1372 { 0x0028, 0x6040, "US", "R Wave Pointer" },
1373 { 0x0028, 0x6100, "SQ", "Mask Subtraction Sequence" },
1374 { 0x0028, 0x6101, "CS", "Mask Operation" },
1375 { 0x0028, 0x6102, "US", "Applicable Frame Range" },
1376 { 0x0028, 0x6110, "US", "Mask Frame Numbers" },
1377 { 0x0028, 0x6112, "US", "Contrast Frame Averaging" },
1378 { 0x0028, 0x6114, "FL", "Mask Sub-Pixel Shift" },
1379 { 0x0028, 0x6120, "SS", "TID Offset" },
1380 { 0x0028, 0x6190, "ST", "Mask Operation Explanation" },
1381 { 0x0029, 0x0000, "xs", "?" },
1382 { 0x0029, 0x0001, "xs", "?" },
1383 { 0x0029, 0x0002, "xs", "?" },
1384 { 0x0029, 0x0003, "xs", "?" },
1385 { 0x0029, 0x0004, "xs", "?" },
1386 { 0x0029, 0x0005, "xs", "?" },
1387 { 0x0029, 0x0006, "xs", "?" },
1388 { 0x0029, 0x0007, "SL", "Lower Range Of Pixels" },
1389 { 0x0029, 0x0008, "SH", "Lower Range Of Pixels" },
1390 { 0x0029, 0x0009, "SH", "Lower Range Of Pixels" },
1391 { 0x0029, 0x000a, "SS", "Lower Range Of Pixels" },
1392 { 0x0029, 0x000c, "xs", "?" },
1393 { 0x0029, 0x000e, "CS", "Zoom Enable Status" },
1394 { 0x0029, 0x000f, "CS", "Zoom Select Status" },
1395 { 0x0029, 0x0010, "xs", "?" },
1396 { 0x0029, 0x0011, "xs", "?" },
1397 { 0x0029, 0x0013, "LT", "?" },
1398 { 0x0029, 0x0015, "xs", "?" },
1399 { 0x0029, 0x0016, "SL", "Lower Range Of Pixels" },
1400 { 0x0029, 0x0017, "SL", "Lower Range Of Pixels" },
1401 { 0x0029, 0x0018, "SL", "Upper Range Of Pixels" },
1402 { 0x0029, 0x001a, "SL", "Length Of Total Info In Bytes" },
1403 { 0x0029, 0x001e, "xs", "?" },
1404 { 0x0029, 0x001f, "xs", "?" },
1405 { 0x0029, 0x0020, "xs", "?" },
1406 { 0x0029, 0x0022, "IS", "Pixel Quality Value" },
1407 { 0x0029, 0x0025, "LT", "Processed Pixel Data Quality" },
1408 { 0x0029, 0x0026, "SS", "Version Of Info Structure" },
1409 { 0x0029, 0x0030, "xs", "?" },
1410 { 0x0029, 0x0031, "xs", "?" },
1411 { 0x0029, 0x0032, "xs", "?" },
1412 { 0x0029, 0x0033, "xs", "?" },
1413 { 0x0029, 0x0034, "xs", "?" },
1414 { 0x0029, 0x0035, "SL", "Advantage Comp Underflow" },
1415 { 0x0029, 0x0038, "US", "?" },
1416 { 0x0029, 0x0040, "xs", "?" },
1417 { 0x0029, 0x0041, "DS", "Magnifying Glass Rectangle" },
1418 { 0x0029, 0x0043, "DS", "Magnifying Glass Factor" },
1419 { 0x0029, 0x0044, "US", "Magnifying Glass Function" },
1420 { 0x0029, 0x004e, "CS", "Magnifying Glass Enable Status" },
1421 { 0x0029, 0x004f, "CS", "Magnifying Glass Select Status" },
1422 { 0x0029, 0x0050, "xs", "?" },
1423 { 0x0029, 0x0051, "LT", "Exposure Code" },
1424 { 0x0029, 0x0052, "LT", "Sort Code" },
1425 { 0x0029, 0x0053, "LT", "?" },
1426 { 0x0029, 0x0060, "xs", "?" },
1427 { 0x0029, 0x0061, "xs", "?" },
1428 { 0x0029, 0x0067, "LT", "?" },
1429 { 0x0029, 0x0070, "xs", "?" },
1430 { 0x0029, 0x0071, "xs", "?" },
1431 { 0x0029, 0x0072, "xs", "?" },
1432 { 0x0029, 0x0077, "CS", "Window Select Status" },
1433 { 0x0029, 0x0078, "LT", "ECG Display Printing ID" },
1434 { 0x0029, 0x0079, "CS", "ECG Display Printing" },
1435 { 0x0029, 0x007e, "CS", "ECG Display Printing Enable Status" },
1436 { 0x0029, 0x007f, "CS", "ECG Display Printing Select Status" },
1437 { 0x0029, 0x0080, "xs", "?" },
1438 { 0x0029, 0x0081, "xs", "?" },
1439 { 0x0029, 0x0082, "IS", "View Zoom" },
1440 { 0x0029, 0x0083, "IS", "View Transform" },
1441 { 0x0029, 0x008e, "CS", "Physiological Display Enable Status" },
1442 { 0x0029, 0x008f, "CS", "Physiological Display Select Status" },
1443 { 0x0029, 0x0090, "IS", "?" },
1444 { 0x0029, 0x0099, "LT", "Shutter Type" },
1445 { 0x0029, 0x00a0, "US", "Rows of Rectangular Shutter" },
1446 { 0x0029, 0x00a1, "US", "Columns of Rectangular Shutter" },
1447 { 0x0029, 0x00a2, "US", "Origin of Rectangular Shutter" },
1448 { 0x0029, 0x00b0, "US", "Radius of Circular Shutter" },
1449 { 0x0029, 0x00b2, "US", "Origin of Circular Shutter" },
1450 { 0x0029, 0x00c0, "LT", "Functional Shutter ID" },
1451 { 0x0029, 0x00c1, "xs", "?" },
1452 { 0x0029, 0x00c3, "IS", "Scan Resolution" },
1453 { 0x0029, 0x00c4, "IS", "Field of View" },
1454 { 0x0029, 0x00c5, "LT", "Field Of Shutter Rectangle" },
1455 { 0x0029, 0x00ce, "CS", "Shutter Enable Status" },
1456 { 0x0029, 0x00cf, "CS", "Shutter Select Status" },
1457 { 0x0029, 0x00d0, "IS", "?" },
1458 { 0x0029, 0x00d1, "IS", "?" },
1459 { 0x0029, 0x00d5, "LT", "Slice Thickness" },
1460 { 0x0031, 0x0010, "LT", "Request UID" },
1461 { 0x0031, 0x0012, "LT", "Examination Reason" },
1462 { 0x0031, 0x0030, "DA", "Requested Date" },
1463 { 0x0031, 0x0032, "TM", "Worklist Request Start Time" },
1464 { 0x0031, 0x0033, "TM", "Worklist Request End Time" },
1465 { 0x0031, 0x0045, "LT", "Requesting Physician" },
1466 { 0x0031, 0x004a, "TM", "Requested Time" },
1467 { 0x0031, 0x0050, "LT", "Requested Physician" },
1468 { 0x0031, 0x0080, "LT", "Requested Location" },
1469 { 0x0032, 0x0000, "UL", "Study Group Length" },
1470 { 0x0032, 0x000a, "CS", "Study Status ID" },
1471 { 0x0032, 0x000c, "CS", "Study Priority ID" },
1472 { 0x0032, 0x0012, "LO", "Study ID Issuer" },
1473 { 0x0032, 0x0032, "DA", "Study Verified Date" },
1474 { 0x0032, 0x0033, "TM", "Study Verified Time" },
1475 { 0x0032, 0x0034, "DA", "Study Read Date" },
1476 { 0x0032, 0x0035, "TM", "Study Read Time" },
1477 { 0x0032, 0x1000, "DA", "Scheduled Study Start Date" },
1478 { 0x0032, 0x1001, "TM", "Scheduled Study Start Time" },
1479 { 0x0032, 0x1010, "DA", "Scheduled Study Stop Date" },
1480 { 0x0032, 0x1011, "TM", "Scheduled Study Stop Time" },
1481 { 0x0032, 0x1020, "LO", "Scheduled Study Location" },
1482 { 0x0032, 0x1021, "AE", "Scheduled Study Location AE Title(s)" },
1483 { 0x0032, 0x1030, "LO", "Reason for Study" },
1484 { 0x0032, 0x1032, "PN", "Requesting Physician" },
1485 { 0x0032, 0x1033, "LO", "Requesting Service" },
1486 { 0x0032, 0x1040, "DA", "Study Arrival Date" },
1487 { 0x0032, 0x1041, "TM", "Study Arrival Time" },
1488 { 0x0032, 0x1050, "DA", "Study Completion Date" },
1489 { 0x0032, 0x1051, "TM", "Study Completion Time" },
1490 { 0x0032, 0x1055, "CS", "Study Component Status ID" },
1491 { 0x0032, 0x1060, "LO", "Requested Procedure Description" },
1492 { 0x0032, 0x1064, "SQ", "Requested Procedure Code Sequence" },
1493 { 0x0032, 0x1070, "LO", "Requested Contrast Agent" },
1494 { 0x0032, 0x4000, "LT", "Study Comments" },
1495 { 0x0033, 0x0001, "UN", "?" },
1496 { 0x0033, 0x0002, "UN", "?" },
1497 { 0x0033, 0x0005, "UN", "?" },
1498 { 0x0033, 0x0006, "UN", "?" },
1499 { 0x0033, 0x0010, "LT", "Patient Study UID" },
1500 { 0x0037, 0x0010, "LO", "ReferringDepartment" },
1501 { 0x0037, 0x0020, "US", "ScreenNumber" },
1502 { 0x0037, 0x0040, "SH", "LeftOrientation" },
1503 { 0x0037, 0x0042, "SH", "RightOrientation" },
1504 { 0x0037, 0x0050, "CS", "Inversion" },
1505 { 0x0037, 0x0060, "US", "DSA" },
1506 { 0x0038, 0x0000, "UL", "Visit Group Length" },
1507 { 0x0038, 0x0004, "SQ", "Referenced Patient Alias Sequence" },
1508 { 0x0038, 0x0008, "CS", "Visit Status ID" },
1509 { 0x0038, 0x0010, "LO", "Admission ID" },
1510 { 0x0038, 0x0011, "LO", "Issuer of Admission ID" },
1511 { 0x0038, 0x0016, "LO", "Route of Admissions" },
1512 { 0x0038, 0x001a, "DA", "Scheduled Admission Date" },
1513 { 0x0038, 0x001b, "TM", "Scheduled Admission Time" },
1514 { 0x0038, 0x001c, "DA", "Scheduled Discharge Date" },
1515 { 0x0038, 0x001d, "TM", "Scheduled Discharge Time" },
1516 { 0x0038, 0x001e, "LO", "Scheduled Patient Institution Residence" },
1517 { 0x0038, 0x0020, "DA", "Admitting Date" },
1518 { 0x0038, 0x0021, "TM", "Admitting Time" },
1519 { 0x0038, 0x0030, "DA", "Discharge Date" },
1520 { 0x0038, 0x0032, "TM", "Discharge Time" },
1521 { 0x0038, 0x0040, "LO", "Discharge Diagnosis Description" },
1522 { 0x0038, 0x0044, "SQ", "Discharge Diagnosis Code Sequence" },
1523 { 0x0038, 0x0050, "LO", "Special Needs" },
1524 { 0x0038, 0x0300, "LO", "Current Patient Location" },
1525 { 0x0038, 0x0400, "LO", "Patient's Institution Residence" },
1526 { 0x0038, 0x0500, "LO", "Patient State" },
1527 { 0x0038, 0x4000, "LT", "Visit Comments" },
1528 { 0x0039, 0x0080, "IS", "Private Entity Number" },
1529 { 0x0039, 0x0085, "DA", "Private Entity Date" },
1530 { 0x0039, 0x0090, "TM", "Private Entity Time" },
1531 { 0x0039, 0x0095, "LO", "Private Entity Launch Command" },
1532 { 0x0039, 0x00aa, "CS", "Private Entity Type" },
1533 { 0x003a, 0x0002, "SQ", "Waveform Sequence" },
1534 { 0x003a, 0x0005, "US", "Waveform Number of Channels" },
1535 { 0x003a, 0x0010, "UL", "Waveform Number of Samples" },
1536 { 0x003a, 0x001a, "DS", "Sampling Frequency" },
1537 { 0x003a, 0x0020, "SH", "Group Label" },
1538 { 0x003a, 0x0103, "CS", "Waveform Sample Value Representation" },
1539 { 0x003a, 0x0122, "OB", "Waveform Padding Value" },
1540 { 0x003a, 0x0200, "SQ", "Channel Definition" },
1541 { 0x003a, 0x0202, "IS", "Waveform Channel Number" },
1542 { 0x003a, 0x0203, "SH", "Channel Label" },
1543 { 0x003a, 0x0205, "CS", "Channel Status" },
1544 { 0x003a, 0x0208, "SQ", "Channel Source" },
1545 { 0x003a, 0x0209, "SQ", "Channel Source Modifiers" },
1546 { 0x003a, 0x020a, "SQ", "Differential Channel Source" },
1547 { 0x003a, 0x020b, "SQ", "Differential Channel Source Modifiers" },
1548 { 0x003a, 0x0210, "DS", "Channel Sensitivity" },
1549 { 0x003a, 0x0211, "SQ", "Channel Sensitivity Units" },
1550 { 0x003a, 0x0212, "DS", "Channel Sensitivity Correction Factor" },
1551 { 0x003a, 0x0213, "DS", "Channel Baseline" },
1552 { 0x003a, 0x0214, "DS", "Channel Time Skew" },
1553 { 0x003a, 0x0215, "DS", "Channel Sample Skew" },
1554 { 0x003a, 0x0216, "OB", "Channel Minimum Value" },
1555 { 0x003a, 0x0217, "OB", "Channel Maximum Value" },
1556 { 0x003a, 0x0218, "DS", "Channel Offset" },
1557 { 0x003a, 0x021a, "US", "Bits Per Sample" },
1558 { 0x003a, 0x0220, "DS", "Filter Low Frequency" },
1559 { 0x003a, 0x0221, "DS", "Filter High Frequency" },
1560 { 0x003a, 0x0222, "DS", "Notch Filter Frequency" },
1561 { 0x003a, 0x0223, "DS", "Notch Filter Bandwidth" },
1562 { 0x003a, 0x1000, "OB", "Waveform Data" },
1563 { 0x0040, 0x0001, "AE", "Scheduled Station AE Title" },
1564 { 0x0040, 0x0002, "DA", "Scheduled Procedure Step Start Date" },
1565 { 0x0040, 0x0003, "TM", "Scheduled Procedure Step Start Time" },
1566 { 0x0040, 0x0004, "DA", "Scheduled Procedure Step End Date" },
1567 { 0x0040, 0x0005, "TM", "Scheduled Procedure Step End Time" },
1568 { 0x0040, 0x0006, "PN", "Scheduled Performing Physician Name" },
1569 { 0x0040, 0x0007, "LO", "Scheduled Procedure Step Description" },
1570 { 0x0040, 0x0008, "SQ", "Scheduled Action Item Code Sequence" },
1571 { 0x0040, 0x0009, "SH", "Scheduled Procedure Step ID" },
1572 { 0x0040, 0x0010, "SH", "Scheduled Station Name" },
1573 { 0x0040, 0x0011, "SH", "Scheduled Procedure Step Location" },
1574 { 0x0040, 0x0012, "LO", "Pre-Medication" },
1575 { 0x0040, 0x0020, "CS", "Scheduled Procedure Step Status" },
1576 { 0x0040, 0x0100, "SQ", "Scheduled Procedure Step Sequence" },
1577 { 0x0040, 0x0302, "US", "Entrance Dose" },
1578 { 0x0040, 0x0303, "US", "Exposed Area" },
1579 { 0x0040, 0x0306, "DS", "Distance Source to Entrance" },
1580 { 0x0040, 0x0307, "DS", "Distance Source to Support" },
1581 { 0x0040, 0x0310, "ST", "Comments On Radiation Dose" },
1582 { 0x0040, 0x0312, "DS", "X-Ray Output" },
1583 { 0x0040, 0x0314, "DS", "Half Value Layer" },
1584 { 0x0040, 0x0316, "DS", "Organ Dose" },
1585 { 0x0040, 0x0318, "CS", "Organ Exposed" },
1586 { 0x0040, 0x0400, "LT", "Comments On Scheduled Procedure Step" },
1587 { 0x0040, 0x050a, "LO", "Specimen Accession Number" },
1588 { 0x0040, 0x0550, "SQ", "Specimen Sequence" },
1589 { 0x0040, 0x0551, "LO", "Specimen Identifier" },
1590 { 0x0040, 0x0552, "SQ", "Specimen Description Sequence" },
1591 { 0x0040, 0x0553, "ST", "Specimen Description" },
1592 { 0x0040, 0x0555, "SQ", "Acquisition Context Sequence" },
1593 { 0x0040, 0x0556, "ST", "Acquisition Context Description" },
1594 { 0x0040, 0x059a, "SQ", "Specimen Type Code Sequence" },
1595 { 0x0040, 0x06fa, "LO", "Slide Identifier" },
1596 { 0x0040, 0x071a, "SQ", "Image Center Point Coordinates Sequence" },
1597 { 0x0040, 0x072a, "DS", "X Offset In Slide Coordinate System" },
1598 { 0x0040, 0x073a, "DS", "Y Offset In Slide Coordinate System" },
1599 { 0x0040, 0x074a, "DS", "Z Offset In Slide Coordinate System" },
1600 { 0x0040, 0x08d8, "SQ", "Pixel Spacing Sequence" },
1601 { 0x0040, 0x08da, "SQ", "Coordinate System Axis Code Sequence" },
1602 { 0x0040, 0x08ea, "SQ", "Measurement Units Code Sequence" },
1603 { 0x0040, 0x09f8, "SQ", "Vital Stain Code Sequence" },
1604 { 0x0040, 0x1001, "SH", "Requested Procedure ID" },
1605 { 0x0040, 0x1002, "LO", "Reason For Requested Procedure" },
1606 { 0x0040, 0x1003, "SH", "Requested Procedure Priority" },
1607 { 0x0040, 0x1004, "LO", "Patient Transport Arrangements" },
1608 { 0x0040, 0x1005, "LO", "Requested Procedure Location" },
1609 { 0x0040, 0x1006, "SH", "Placer Order Number of Procedure" },
1610 { 0x0040, 0x1007, "SH", "Filler Order Number of Procedure" },
1611 { 0x0040, 0x1008, "LO", "Confidentiality Code" },
1612 { 0x0040, 0x1009, "SH", "Reporting Priority" },
1613 { 0x0040, 0x1010, "PN", "Names of Intended Recipients of Results" },
1614 { 0x0040, 0x1400, "LT", "Requested Procedure Comments" },
1615 { 0x0040, 0x2001, "LO", "Reason For Imaging Service Request" },
1616 { 0x0040, 0x2004, "DA", "Issue Date of Imaging Service Request" },
1617 { 0x0040, 0x2005, "TM", "Issue Time of Imaging Service Request" },
1618 { 0x0040, 0x2006, "SH", "Placer Order Number of Imaging Service Request" },
1619 { 0x0040, 0x2007, "SH", "Filler Order Number of Imaging Service Request" },
1620 { 0x0040, 0x2008, "PN", "Order Entered By" },
1621 { 0x0040, 0x2009, "SH", "Order Enterer Location" },
1622 { 0x0040, 0x2010, "SH", "Order Callback Phone Number" },
1623 { 0x0040, 0x2400, "LT", "Imaging Service Request Comments" },
1624 { 0x0040, 0x3001, "LO", "Confidentiality Constraint On Patient Data" },
1625 { 0x0040, 0xa007, "CS", "Findings Flag" },
1626 { 0x0040, 0xa020, "SQ", "Findings Sequence" },
1627 { 0x0040, 0xa021, "UI", "Findings Group UID" },
1628 { 0x0040, 0xa022, "UI", "Referenced Findings Group UID" },
1629 { 0x0040, 0xa023, "DA", "Findings Group Recording Date" },
1630 { 0x0040, 0xa024, "TM", "Findings Group Recording Time" },
1631 { 0x0040, 0xa026, "SQ", "Findings Source Category Code Sequence" },
1632 { 0x0040, 0xa027, "LO", "Documenting Organization" },
1633 { 0x0040, 0xa028, "SQ", "Documenting Organization Identifier Code Sequence" },
1634 { 0x0040, 0xa032, "LO", "History Reliability Qualifier Description" },
1635 { 0x0040, 0xa043, "SQ", "Concept Name Code Sequence" },
1636 { 0x0040, 0xa047, "LO", "Measurement Precision Description" },
1637 { 0x0040, 0xa057, "CS", "Urgency or Priority Alerts" },
1638 { 0x0040, 0xa060, "LO", "Sequencing Indicator" },
1639 { 0x0040, 0xa066, "SQ", "Document Identifier Code Sequence" },
1640 { 0x0040, 0xa067, "PN", "Document Author" },
1641 { 0x0040, 0xa068, "SQ", "Document Author Identifier Code Sequence" },
1642 { 0x0040, 0xa070, "SQ", "Identifier Code Sequence" },
1643 { 0x0040, 0xa073, "LO", "Object String Identifier" },
1644 { 0x0040, 0xa074, "OB", "Object Binary Identifier" },
1645 { 0x0040, 0xa075, "PN", "Documenting Observer" },
1646 { 0x0040, 0xa076, "SQ", "Documenting Observer Identifier Code Sequence" },
1647 { 0x0040, 0xa078, "SQ", "Observation Subject Identifier Code Sequence" },
1648 { 0x0040, 0xa080, "SQ", "Person Identifier Code Sequence" },
1649 { 0x0040, 0xa085, "SQ", "Procedure Identifier Code Sequence" },
1650 { 0x0040, 0xa088, "LO", "Object Directory String Identifier" },
1651 { 0x0040, 0xa089, "OB", "Object Directory Binary Identifier" },
1652 { 0x0040, 0xa090, "CS", "History Reliability Qualifier" },
1653 { 0x0040, 0xa0a0, "CS", "Referenced Type of Data" },
1654 { 0x0040, 0xa0b0, "US", "Referenced Waveform Channels" },
1655 { 0x0040, 0xa110, "DA", "Date of Document or Verbal Transaction" },
1656 { 0x0040, 0xa112, "TM", "Time of Document Creation or Verbal Transaction" },
1657 { 0x0040, 0xa121, "DA", "Date" },
1658 { 0x0040, 0xa122, "TM", "Time" },
1659 { 0x0040, 0xa123, "PN", "Person Name" },
1660 { 0x0040, 0xa124, "SQ", "Referenced Person Sequence" },
1661 { 0x0040, 0xa125, "CS", "Report Status ID" },
1662 { 0x0040, 0xa130, "CS", "Temporal Range Type" },
1663 { 0x0040, 0xa132, "UL", "Referenced Sample Offsets" },
1664 { 0x0040, 0xa136, "US", "Referenced Frame Numbers" },
1665 { 0x0040, 0xa138, "DS", "Referenced Time Offsets" },
1666 { 0x0040, 0xa13a, "DT", "Referenced Datetime" },
1667 { 0x0040, 0xa160, "UT", "Text Value" },
1668 { 0x0040, 0xa167, "SQ", "Observation Category Code Sequence" },
1669 { 0x0040, 0xa168, "SQ", "Concept Code Sequence" },
1670 { 0x0040, 0xa16a, "ST", "Bibliographic Citation" },
1671 { 0x0040, 0xa170, "CS", "Observation Class" },
1672 { 0x0040, 0xa171, "UI", "Observation UID" },
1673 { 0x0040, 0xa172, "UI", "Referenced Observation UID" },
1674 { 0x0040, 0xa173, "CS", "Referenced Observation Class" },
1675 { 0x0040, 0xa174, "CS", "Referenced Object Observation Class" },
1676 { 0x0040, 0xa180, "US", "Annotation Group Number" },
1677 { 0x0040, 0xa192, "DA", "Observation Date" },
1678 { 0x0040, 0xa193, "TM", "Observation Time" },
1679 { 0x0040, 0xa194, "CS", "Measurement Automation" },
1680 { 0x0040, 0xa195, "SQ", "Concept Name Code Sequence Modifier" },
1681 { 0x0040, 0xa224, "ST", "Identification Description" },
1682 { 0x0040, 0xa290, "CS", "Coordinates Set Geometric Type" },
1683 { 0x0040, 0xa296, "SQ", "Algorithm Code Sequence" },
1684 { 0x0040, 0xa297, "ST", "Algorithm Description" },
1685 { 0x0040, 0xa29a, "SL", "Pixel Coordinates Set" },
1686 { 0x0040, 0xa300, "SQ", "Measured Value Sequence" },
1687 { 0x0040, 0xa307, "PN", "Current Observer" },
1688 { 0x0040, 0xa30a, "DS", "Numeric Value" },
1689 { 0x0040, 0xa313, "SQ", "Referenced Accession Sequence" },
1690 { 0x0040, 0xa33a, "ST", "Report Status Comment" },
1691 { 0x0040, 0xa340, "SQ", "Procedure Context Sequence" },
1692 { 0x0040, 0xa352, "PN", "Verbal Source" },
1693 { 0x0040, 0xa353, "ST", "Address" },
1694 { 0x0040, 0xa354, "LO", "Telephone Number" },
1695 { 0x0040, 0xa358, "SQ", "Verbal Source Identifier Code Sequence" },
1696 { 0x0040, 0xa380, "SQ", "Report Detail Sequence" },
1697 { 0x0040, 0xa402, "UI", "Observation Subject UID" },
1698 { 0x0040, 0xa403, "CS", "Observation Subject Class" },
1699 { 0x0040, 0xa404, "SQ", "Observation Subject Type Code Sequence" },
1700 { 0x0040, 0xa600, "CS", "Observation Subject Context Flag" },
1701 { 0x0040, 0xa601, "CS", "Observer Context Flag" },
1702 { 0x0040, 0xa603, "CS", "Procedure Context Flag" },
1703 { 0x0040, 0xa730, "SQ", "Observations Sequence" },
1704 { 0x0040, 0xa731, "SQ", "Relationship Sequence" },
1705 { 0x0040, 0xa732, "SQ", "Relationship Type Code Sequence" },
1706 { 0x0040, 0xa744, "SQ", "Language Code Sequence" },
1707 { 0x0040, 0xa992, "ST", "Uniform Resource Locator" },
1708 { 0x0040, 0xb020, "SQ", "Annotation Sequence" },
1709 { 0x0040, 0xdb73, "SQ", "Relationship Type Code Sequence Modifier" },
1710 { 0x0041, 0x0000, "LT", "Papyrus Comments" },
1711 { 0x0041, 0x0010, "xs", "?" },
1712 { 0x0041, 0x0011, "xs", "?" },
1713 { 0x0041, 0x0012, "UL", "Pixel Offset" },
1714 { 0x0041, 0x0013, "SQ", "Image Identifier Sequence" },
1715 { 0x0041, 0x0014, "SQ", "External File Reference Sequence" },
1716 { 0x0041, 0x0015, "US", "Number of Images" },
1717 { 0x0041, 0x0020, "xs", "?" },
1718 { 0x0041, 0x0021, "UI", "Referenced SOP Class UID" },
1719 { 0x0041, 0x0022, "UI", "Referenced SOP Instance UID" },
1720 { 0x0041, 0x0030, "xs", "?" },
1721 { 0x0041, 0x0031, "xs", "?" },
1722 { 0x0041, 0x0032, "xs", "?" },
1723 { 0x0041, 0x0034, "DA", "Modified Date" },
1724 { 0x0041, 0x0036, "TM", "Modified Time" },
1725 { 0x0041, 0x0040, "LT", "Owner Name" },
1726 { 0x0041, 0x0041, "UI", "Referenced Image SOP Class UID" },
1727 { 0x0041, 0x0042, "UI", "Referenced Image SOP Instance UID" },
1728 { 0x0041, 0x0050, "xs", "?" },
1729 { 0x0041, 0x0060, "UL", "Number of Images" },
1730 { 0x0041, 0x0062, "UL", "Number of Other" },
1731 { 0x0041, 0x00a0, "LT", "External Folder Element DSID" },
1732 { 0x0041, 0x00a1, "US", "External Folder Element Data Set Type" },
1733 { 0x0041, 0x00a2, "LT", "External Folder Element File Location" },
1734 { 0x0041, 0x00a3, "UL", "External Folder Element Length" },
1735 { 0x0041, 0x00b0, "LT", "Internal Folder Element DSID" },
1736 { 0x0041, 0x00b1, "US", "Internal Folder Element Data Set Type" },
1737 { 0x0041, 0x00b2, "UL", "Internal Offset To Data Set" },
1738 { 0x0041, 0x00b3, "UL", "Internal Offset To Image" },
1739 { 0x0043, 0x0001, "SS", "Bitmap Of Prescan Options" },
1740 { 0x0043, 0x0002, "SS", "Gradient Offset In X" },
1741 { 0x0043, 0x0003, "SS", "Gradient Offset In Y" },
1742 { 0x0043, 0x0004, "SS", "Gradient Offset In Z" },
1743 { 0x0043, 0x0005, "SS", "Image Is Original Or Unoriginal" },
1744 { 0x0043, 0x0006, "SS", "Number Of EPI Shots" },
1745 { 0x0043, 0x0007, "SS", "Views Per Segment" },
1746 { 0x0043, 0x0008, "SS", "Respiratory Rate In BPM" },
1747 { 0x0043, 0x0009, "SS", "Respiratory Trigger Point" },
1748 { 0x0043, 0x000a, "SS", "Type Of Receiver Used" },
1749 { 0x0043, 0x000b, "DS", "Peak Rate Of Change Of Gradient Field" },
1750 { 0x0043, 0x000c, "DS", "Limits In Units Of Percent" },
1751 { 0x0043, 0x000d, "DS", "PSD Estimated Limit" },
1752 { 0x0043, 0x000e, "DS", "PSD Estimated Limit In Tesla Per Second" },
1753 { 0x0043, 0x000f, "DS", "SAR Avg Head" },
1754 { 0x0043, 0x0010, "US", "Window Value" },
1755 { 0x0043, 0x0011, "US", "Total Input Views" },
1756 { 0x0043, 0x0012, "SS", "Xray Chain" },
1757 { 0x0043, 0x0013, "SS", "Recon Kernel Parameters" },
1758 { 0x0043, 0x0014, "SS", "Calibration Parameters" },
1759 { 0x0043, 0x0015, "SS", "Total Output Views" },
1760 { 0x0043, 0x0016, "SS", "Number Of Overranges" },
1761 { 0x0043, 0x0017, "DS", "IBH Image Scale Factors" },
1762 { 0x0043, 0x0018, "DS", "BBH Coefficients" },
1763 { 0x0043, 0x0019, "SS", "Number Of BBH Chains To Blend" },
1764 { 0x0043, 0x001a, "SL", "Starting Channel Number" },
1765 { 0x0043, 0x001b, "SS", "PPScan Parameters" },
1766 { 0x0043, 0x001c, "SS", "GE Image Integrity" },
1767 { 0x0043, 0x001d, "SS", "Level Value" },
1768 { 0x0043, 0x001e, "xs", "?" },
1769 { 0x0043, 0x001f, "SL", "Max Overranges In A View" },
1770 { 0x0043, 0x0020, "DS", "Avg Overranges All Views" },
1771 { 0x0043, 0x0021, "SS", "Corrected Afterglow Terms" },
1772 { 0x0043, 0x0025, "SS", "Reference Channels" },
1773 { 0x0043, 0x0026, "US", "No Views Ref Channels Blocked" },
1774 { 0x0043, 0x0027, "xs", "?" },
1775 { 0x0043, 0x0028, "OB", "Unique Image Identifier" },
1776 { 0x0043, 0x0029, "OB", "Histogram Tables" },
1777 { 0x0043, 0x002a, "OB", "User Defined Data" },
1778 { 0x0043, 0x002b, "SS", "Private Scan Options" },
1779 { 0x0043, 0x002c, "SS", "Effective Echo Spacing" },
1780 { 0x0043, 0x002d, "SH", "String Slop Field 1" },
1781 { 0x0043, 0x002e, "SH", "String Slop Field 2" },
1782 { 0x0043, 0x002f, "SS", "Raw Data Type" },
1783 { 0x0043, 0x0030, "SS", "Raw Data Type" },
1784 { 0x0043, 0x0031, "DS", "RA Coord Of Target Recon Centre" },
1785 { 0x0043, 0x0032, "SS", "Raw Data Type" },
1786 { 0x0043, 0x0033, "FL", "Neg Scan Spacing" },
1787 { 0x0043, 0x0034, "IS", "Offset Frequency" },
1788 { 0x0043, 0x0035, "UL", "User Usage Tag" },
1789 { 0x0043, 0x0036, "UL", "User Fill Map MSW" },
1790 { 0x0043, 0x0037, "UL", "User Fill Map LSW" },
1791 { 0x0043, 0x0038, "FL", "User 25 To User 48" },
1792 { 0x0043, 0x0039, "IS", "Slop Integer 6 To Slop Integer 9" },
1793 { 0x0043, 0x0040, "FL", "Trigger On Position" },
1794 { 0x0043, 0x0041, "FL", "Degree Of Rotation" },
1795 { 0x0043, 0x0042, "SL", "DAS Trigger Source" },
1796 { 0x0043, 0x0043, "SL", "DAS Fpa Gain" },
1797 { 0x0043, 0x0044, "SL", "DAS Output Source" },
1798 { 0x0043, 0x0045, "SL", "DAS Ad Input" },
1799 { 0x0043, 0x0046, "SL", "DAS Cal Mode" },
1800 { 0x0043, 0x0047, "SL", "DAS Cal Frequency" },
1801 { 0x0043, 0x0048, "SL", "DAS Reg Xm" },
1802 { 0x0043, 0x0049, "SL", "DAS Auto Zero" },
1803 { 0x0043, 0x004a, "SS", "Starting Channel Of View" },
1804 { 0x0043, 0x004b, "SL", "DAS Xm Pattern" },
1805 { 0x0043, 0x004c, "SS", "TGGC Trigger Mode" },
1806 { 0x0043, 0x004d, "FL", "Start Scan To Xray On Delay" },
1807 { 0x0043, 0x004e, "FL", "Duration Of Xray On" },
1808 { 0x0044, 0x0000, "UI", "?" },
1809 { 0x0045, 0x0004, "CS", "AES" },
1810 { 0x0045, 0x0006, "DS", "Angulation" },
1811 { 0x0045, 0x0009, "DS", "Real Magnification Factor" },
1812 { 0x0045, 0x000b, "CS", "Senograph Type" },
1813 { 0x0045, 0x000c, "DS", "Integration Time" },
1814 { 0x0045, 0x000d, "DS", "ROI Origin X and Y" },
1815 { 0x0045, 0x0011, "DS", "Receptor Size cm X and Y" },
1816 { 0x0045, 0x0012, "IS", "Receptor Size Pixels X and Y" },
1817 { 0x0045, 0x0013, "ST", "Screen" },
1818 { 0x0045, 0x0014, "DS", "Pixel Pitch Microns" },
1819 { 0x0045, 0x0015, "IS", "Pixel Depth Bits" },
1820 { 0x0045, 0x0016, "IS", "Binning Factor X and Y" },
1821 { 0x0045, 0x001b, "CS", "Clinical View" },
1822 { 0x0045, 0x001d, "DS", "Mean Of Raw Gray Levels" },
1823 { 0x0045, 0x001e, "DS", "Mean Of Offset Gray Levels" },
1824 { 0x0045, 0x001f, "DS", "Mean Of Corrected Gray Levels" },
1825 { 0x0045, 0x0020, "DS", "Mean Of Region Gray Levels" },
1826 { 0x0045, 0x0021, "DS", "Mean Of Log Region Gray Levels" },
1827 { 0x0045, 0x0022, "DS", "Standard Deviation Of Raw Gray Levels" },
1828 { 0x0045, 0x0023, "DS", "Standard Deviation Of Corrected Gray Levels" },
1829 { 0x0045, 0x0024, "DS", "Standard Deviation Of Region Gray Levels" },
1830 { 0x0045, 0x0025, "DS", "Standard Deviation Of Log Region Gray Levels" },
1831 { 0x0045, 0x0026, "OB", "MAO Buffer" },
1832 { 0x0045, 0x0027, "IS", "Set Number" },
1833 { 0x0045, 0x0028, "CS", "WindowingType (LINEAR or GAMMA)" },
1834 { 0x0045, 0x0029, "DS", "WindowingParameters" },
1835 { 0x0045, 0x002a, "IS", "Crosshair Cursor X Coordinates" },
1836 { 0x0045, 0x002b, "IS", "Crosshair Cursor Y Coordinates" },
1837 { 0x0045, 0x0039, "US", "Vignette Rows" },
1838 { 0x0045, 0x003a, "US", "Vignette Columns" },
1839 { 0x0045, 0x003b, "US", "Vignette Bits Allocated" },
1840 { 0x0045, 0x003c, "US", "Vignette Bits Stored" },
1841 { 0x0045, 0x003d, "US", "Vignette High Bit" },
1842 { 0x0045, 0x003e, "US", "Vignette Pixel Representation" },
1843 { 0x0045, 0x003f, "OB", "Vignette Pixel Data" },
1844 { 0x0047, 0x0001, "SQ", "Reconstruction Parameters Sequence" },
1845 { 0x0047, 0x0050, "UL", "Volume Voxel Count" },
1846 { 0x0047, 0x0051, "UL", "Volume Segment Count" },
1847 { 0x0047, 0x0053, "US", "Volume Slice Size" },
1848 { 0x0047, 0x0054, "US", "Volume Slice Count" },
1849 { 0x0047, 0x0055, "SL", "Volume Threshold Value" },
1850 { 0x0047, 0x0057, "DS", "Volume Voxel Ratio" },
1851 { 0x0047, 0x0058, "DS", "Volume Voxel Size" },
1852 { 0x0047, 0x0059, "US", "Volume Z Position Size" },
1853 { 0x0047, 0x0060, "DS", "Volume Base Line" },
1854 { 0x0047, 0x0061, "DS", "Volume Center Point" },
1855 { 0x0047, 0x0063, "SL", "Volume Skew Base" },
1856 { 0x0047, 0x0064, "DS", "Volume Registration Transform Rotation Matrix" },
1857 { 0x0047, 0x0065, "DS", "Volume Registration Transform Translation Vector" },
1858 { 0x0047, 0x0070, "DS", "KVP List" },
1859 { 0x0047, 0x0071, "IS", "XRay Tube Current List" },
1860 { 0x0047, 0x0072, "IS", "Exposure List" },
1861 { 0x0047, 0x0080, "LO", "Acquisition DLX Identifier" },
1862 { 0x0047, 0x0085, "SQ", "Acquisition DLX 2D Series Sequence" },
1863 { 0x0047, 0x0089, "DS", "Contrast Agent Volume List" },
1864 { 0x0047, 0x008a, "US", "Number Of Injections" },
1865 { 0x0047, 0x008b, "US", "Frame Count" },
1866 { 0x0047, 0x0096, "IS", "Used Frames" },
1867 { 0x0047, 0x0091, "LO", "XA 3D Reconstruction Algorithm Name" },
1868 { 0x0047, 0x0092, "CS", "XA 3D Reconstruction Algorithm Version" },
1869 { 0x0047, 0x0093, "DA", "DLX Calibration Date" },
1870 { 0x0047, 0x0094, "TM", "DLX Calibration Time" },
1871 { 0x0047, 0x0095, "CS", "DLX Calibration Status" },
1872 { 0x0047, 0x0098, "US", "Transform Count" },
1873 { 0x0047, 0x0099, "SQ", "Transform Sequence" },
1874 { 0x0047, 0x009a, "DS", "Transform Rotation Matrix" },
1875 { 0x0047, 0x009b, "DS", "Transform Translation Vector" },
1876 { 0x0047, 0x009c, "LO", "Transform Label" },
1877 { 0x0047, 0x00b1, "US", "Wireframe Count" },
1878 { 0x0047, 0x00b2, "US", "Location System" },
1879 { 0x0047, 0x00b0, "SQ", "Wireframe List" },
1880 { 0x0047, 0x00b5, "LO", "Wireframe Name" },
1881 { 0x0047, 0x00b6, "LO", "Wireframe Group Name" },
1882 { 0x0047, 0x00b7, "LO", "Wireframe Color" },
1883 { 0x0047, 0x00b8, "SL", "Wireframe Attributes" },
1884 { 0x0047, 0x00b9, "SL", "Wireframe Point Count" },
1885 { 0x0047, 0x00ba, "SL", "Wireframe Timestamp" },
1886 { 0x0047, 0x00bb, "SQ", "Wireframe Point List" },
1887 { 0x0047, 0x00bc, "DS", "Wireframe Points Coordinates" },
1888 { 0x0047, 0x00c0, "DS", "Volume Upper Left High Corner RAS" },
1889 { 0x0047, 0x00c1, "DS", "Volume Slice To RAS Rotation Matrix" },
1890 { 0x0047, 0x00c2, "DS", "Volume Upper Left High Corner TLOC" },
1891 { 0x0047, 0x00d1, "OB", "Volume Segment List" },
1892 { 0x0047, 0x00d2, "OB", "Volume Gradient List" },
1893 { 0x0047, 0x00d3, "OB", "Volume Density List" },
1894 { 0x0047, 0x00d4, "OB", "Volume Z Position List" },
1895 { 0x0047, 0x00d5, "OB", "Volume Original Index List" },
1896 { 0x0050, 0x0000, "UL", "Calibration Group Length" },
1897 { 0x0050, 0x0004, "CS", "Calibration Object" },
1898 { 0x0050, 0x0010, "SQ", "DeviceSequence" },
1899 { 0x0050, 0x0014, "DS", "DeviceLength" },
1900 { 0x0050, 0x0016, "DS", "DeviceDiameter" },
1901 { 0x0050, 0x0017, "CS", "DeviceDiameterUnits" },
1902 { 0x0050, 0x0018, "DS", "DeviceVolume" },
1903 { 0x0050, 0x0019, "DS", "InterMarkerDistance" },
1904 { 0x0050, 0x0020, "LO", "DeviceDescription" },
1905 { 0x0050, 0x0030, "SQ", "CodedInterventionDeviceSequence" },
1906 { 0x0051, 0x0010, "xs", "Image Text" },
1907 { 0x0054, 0x0000, "UL", "Nuclear Acquisition Group Length" },
1908 { 0x0054, 0x0010, "US", "Energy Window Vector" },
1909 { 0x0054, 0x0011, "US", "Number of Energy Windows" },
1910 { 0x0054, 0x0012, "SQ", "Energy Window Information Sequence" },
1911 { 0x0054, 0x0013, "SQ", "Energy Window Range Sequence" },
1912 { 0x0054, 0x0014, "DS", "Energy Window Lower Limit" },
1913 { 0x0054, 0x0015, "DS", "Energy Window Upper Limit" },
1914 { 0x0054, 0x0016, "SQ", "Radiopharmaceutical Information Sequence" },
1915 { 0x0054, 0x0017, "IS", "Residual Syringe Counts" },
1916 { 0x0054, 0x0018, "SH", "Energy Window Name" },
1917 { 0x0054, 0x0020, "US", "Detector Vector" },
1918 { 0x0054, 0x0021, "US", "Number of Detectors" },
1919 { 0x0054, 0x0022, "SQ", "Detector Information Sequence" },
1920 { 0x0054, 0x0030, "US", "Phase Vector" },
1921 { 0x0054, 0x0031, "US", "Number of Phases" },
1922 { 0x0054, 0x0032, "SQ", "Phase Information Sequence" },
1923 { 0x0054, 0x0033, "US", "Number of Frames In Phase" },
1924 { 0x0054, 0x0036, "IS", "Phase Delay" },
1925 { 0x0054, 0x0038, "IS", "Pause Between Frames" },
1926 { 0x0054, 0x0050, "US", "Rotation Vector" },
1927 { 0x0054, 0x0051, "US", "Number of Rotations" },
1928 { 0x0054, 0x0052, "SQ", "Rotation Information Sequence" },
1929 { 0x0054, 0x0053, "US", "Number of Frames In Rotation" },
1930 { 0x0054, 0x0060, "US", "R-R Interval Vector" },
1931 { 0x0054, 0x0061, "US", "Number of R-R Intervals" },
1932 { 0x0054, 0x0062, "SQ", "Gated Information Sequence" },
1933 { 0x0054, 0x0063, "SQ", "Data Information Sequence" },
1934 { 0x0054, 0x0070, "US", "Time Slot Vector" },
1935 { 0x0054, 0x0071, "US", "Number of Time Slots" },
1936 { 0x0054, 0x0072, "SQ", "Time Slot Information Sequence" },
1937 { 0x0054, 0x0073, "DS", "Time Slot Time" },
1938 { 0x0054, 0x0080, "US", "Slice Vector" },
1939 { 0x0054, 0x0081, "US", "Number of Slices" },
1940 { 0x0054, 0x0090, "US", "Angular View Vector" },
1941 { 0x0054, 0x0100, "US", "Time Slice Vector" },
1942 { 0x0054, 0x0101, "US", "Number Of Time Slices" },
1943 { 0x0054, 0x0200, "DS", "Start Angle" },
1944 { 0x0054, 0x0202, "CS", "Type of Detector Motion" },
1945 { 0x0054, 0x0210, "IS", "Trigger Vector" },
1946 { 0x0054, 0x0211, "US", "Number of Triggers in Phase" },
1947 { 0x0054, 0x0220, "SQ", "View Code Sequence" },
1948 { 0x0054, 0x0222, "SQ", "View Modifier Code Sequence" },
1949 { 0x0054, 0x0300, "SQ", "Radionuclide Code Sequence" },
1950 { 0x0054, 0x0302, "SQ", "Radiopharmaceutical Route Code Sequence" },
1951 { 0x0054, 0x0304, "SQ", "Radiopharmaceutical Code Sequence" },
1952 { 0x0054, 0x0306, "SQ", "Calibration Data Sequence" },
1953 { 0x0054, 0x0308, "US", "Energy Window Number" },
1954 { 0x0054, 0x0400, "SH", "Image ID" },
1955 { 0x0054, 0x0410, "SQ", "Patient Orientation Code Sequence" },
1956 { 0x0054, 0x0412, "SQ", "Patient Orientation Modifier Code Sequence" },
1957 { 0x0054, 0x0414, "SQ", "Patient Gantry Relationship Code Sequence" },
1958 { 0x0054, 0x1000, "CS", "Positron Emission Tomography Series Type" },
1959 { 0x0054, 0x1001, "CS", "Positron Emission Tomography Units" },
1960 { 0x0054, 0x1002, "CS", "Counts Source" },
1961 { 0x0054, 0x1004, "CS", "Reprojection Method" },
1962 { 0x0054, 0x1100, "CS", "Randoms Correction Method" },
1963 { 0x0054, 0x1101, "LO", "Attenuation Correction Method" },
1964 { 0x0054, 0x1102, "CS", "Decay Correction" },
1965 { 0x0054, 0x1103, "LO", "Reconstruction Method" },
1966 { 0x0054, 0x1104, "LO", "Detector Lines of Response Used" },
1967 { 0x0054, 0x1105, "LO", "Scatter Correction Method" },
1968 { 0x0054, 0x1200, "DS", "Axial Acceptance" },
1969 { 0x0054, 0x1201, "IS", "Axial Mash" },
1970 { 0x0054, 0x1202, "IS", "Transverse Mash" },
1971 { 0x0054, 0x1203, "DS", "Detector Element Size" },
1972 { 0x0054, 0x1210, "DS", "Coincidence Window Width" },
1973 { 0x0054, 0x1220, "CS", "Secondary Counts Type" },
1974 { 0x0054, 0x1300, "DS", "Frame Reference Time" },
1975 { 0x0054, 0x1310, "IS", "Primary Prompts Counts Accumulated" },
1976 { 0x0054, 0x1311, "IS", "Secondary Counts Accumulated" },
1977 { 0x0054, 0x1320, "DS", "Slice Sensitivity Factor" },
1978 { 0x0054, 0x1321, "DS", "Decay Factor" },
1979 { 0x0054, 0x1322, "DS", "Dose Calibration Factor" },
1980 { 0x0054, 0x1323, "DS", "Scatter Fraction Factor" },
1981 { 0x0054, 0x1324, "DS", "Dead Time Factor" },
1982 { 0x0054, 0x1330, "US", "Image Index" },
1983 { 0x0054, 0x1400, "CS", "Counts Included" },
1984 { 0x0054, 0x1401, "CS", "Dead Time Correction Flag" },
1985 { 0x0055, 0x0046, "LT", "Current Ward" },
1986 { 0x0058, 0x0000, "SQ", "?" },
1987 { 0x0060, 0x3000, "SQ", "Histogram Sequence" },
1988 { 0x0060, 0x3002, "US", "Histogram Number of Bins" },
1989 { 0x0060, 0x3004, "xs", "Histogram First Bin Value" },
1990 { 0x0060, 0x3006, "xs", "Histogram Last Bin Value" },
1991 { 0x0060, 0x3008, "US", "Histogram Bin Width" },
1992 { 0x0060, 0x3010, "LO", "Histogram Explanation" },
1993 { 0x0060, 0x3020, "UL", "Histogram Data" },
1994 { 0x0070, 0x0001, "SQ", "Graphic Annotation Sequence" },
1995 { 0x0070, 0x0002, "CS", "Graphic Layer" },
1996 { 0x0070, 0x0003, "CS", "Bounding Box Annotation Units" },
1997 { 0x0070, 0x0004, "CS", "Anchor Point Annotation Units" },
1998 { 0x0070, 0x0005, "CS", "Graphic Annotation Units" },
1999 { 0x0070, 0x0006, "ST", "Unformatted Text Value" },
2000 { 0x0070, 0x0008, "SQ", "Text Object Sequence" },
2001 { 0x0070, 0x0009, "SQ", "Graphic Object Sequence" },
2002 { 0x0070, 0x0010, "FL", "Bounding Box TLHC" },
2003 { 0x0070, 0x0011, "FL", "Bounding Box BRHC" },
2004 { 0x0070, 0x0014, "FL", "Anchor Point" },
2005 { 0x0070, 0x0015, "CS", "Anchor Point Visibility" },
2006 { 0x0070, 0x0020, "US", "Graphic Dimensions" },
2007 { 0x0070, 0x0021, "US", "Number Of Graphic Points" },
2008 { 0x0070, 0x0022, "FL", "Graphic Data" },
2009 { 0x0070, 0x0023, "CS", "Graphic Type" },
2010 { 0x0070, 0x0024, "CS", "Graphic Filled" },
2011 { 0x0070, 0x0040, "IS", "Image Rotation" },
2012 { 0x0070, 0x0041, "CS", "Image Horizontal Flip" },
2013 { 0x0070, 0x0050, "US", "Displayed Area TLHC" },
2014 { 0x0070, 0x0051, "US", "Displayed Area BRHC" },
2015 { 0x0070, 0x0060, "SQ", "Graphic Layer Sequence" },
2016 { 0x0070, 0x0062, "IS", "Graphic Layer Order" },
2017 { 0x0070, 0x0066, "US", "Graphic Layer Recommended Display Value" },
2018 { 0x0070, 0x0068, "LO", "Graphic Layer Description" },
2019 { 0x0070, 0x0080, "CS", "Presentation Label" },
2020 { 0x0070, 0x0081, "LO", "Presentation Description" },
2021 { 0x0070, 0x0082, "DA", "Presentation Creation Date" },
2022 { 0x0070, 0x0083, "TM", "Presentation Creation Time" },
2023 { 0x0070, 0x0084, "PN", "Presentation Creator's Name" },
2024 { 0x0087, 0x0010, "CS", "Media Type" },
2025 { 0x0087, 0x0020, "CS", "Media Location" },
2026 { 0x0087, 0x0050, "IS", "Estimated Retrieve Time" },
2027 { 0x0088, 0x0000, "UL", "Storage Group Length" },
2028 { 0x0088, 0x0130, "SH", "Storage Media FileSet ID" },
2029 { 0x0088, 0x0140, "UI", "Storage Media FileSet UID" },
2030 { 0x0088, 0x0200, "SQ", "Icon Image Sequence" },
2031 { 0x0088, 0x0904, "LO", "Topic Title" },
2032 { 0x0088, 0x0906, "ST", "Topic Subject" },
2033 { 0x0088, 0x0910, "LO", "Topic Author" },
2034 { 0x0088, 0x0912, "LO", "Topic Key Words" },
2035 { 0x0095, 0x0001, "LT", "Examination Folder ID" },
2036 { 0x0095, 0x0004, "UL", "Folder Reported Status" },
2037 { 0x0095, 0x0005, "LT", "Folder Reporting Radiologist" },
2038 { 0x0095, 0x0007, "LT", "SIENET ISA PLA" },
2039 { 0x0099, 0x0002, "UL", "Data Object Attributes" },
2040 { 0x00e1, 0x0001, "US", "Data Dictionary Version" },
2041 { 0x00e1, 0x0014, "LT", "?" },
2042 { 0x00e1, 0x0022, "DS", "?" },
2043 { 0x00e1, 0x0023, "DS", "?" },
2044 { 0x00e1, 0x0024, "LT", "?" },
2045 { 0x00e1, 0x0025, "LT", "?" },
2046 { 0x00e1, 0x0040, "SH", "Offset From CT MR Images" },
2047 { 0x0193, 0x0002, "DS", "RIS Key" },
2048 { 0x0307, 0x0001, "UN", "RIS Worklist IMGEF" },
2049 { 0x0309, 0x0001, "UN", "RIS Report IMGEF" },
2050 { 0x0601, 0x0000, "SH", "Implementation Version" },
2051 { 0x0601, 0x0020, "DS", "Relative Table Position" },
2052 { 0x0601, 0x0021, "DS", "Relative Table Height" },
2053 { 0x0601, 0x0030, "SH", "Surview Direction" },
2054 { 0x0601, 0x0031, "DS", "Surview Length" },
2055 { 0x0601, 0x0050, "SH", "Image View Type" },
2056 { 0x0601, 0x0070, "DS", "Batch Number" },
2057 { 0x0601, 0x0071, "DS", "Batch Size" },
2058 { 0x0601, 0x0072, "DS", "Batch Slice Number" },
2059 { 0x1000, 0x0000, "xs", "?" },
2060 { 0x1000, 0x0001, "US", "Run Length Triplet" },
2061 { 0x1000, 0x0002, "US", "Huffman Table Size" },
2062 { 0x1000, 0x0003, "US", "Huffman Table Triplet" },
2063 { 0x1000, 0x0004, "US", "Shift Table Size" },
2064 { 0x1000, 0x0005, "US", "Shift Table Triplet" },
2065 { 0x1010, 0x0000, "xs", "?" },
2066 { 0x1369, 0x0000, "US", "?" },
2067 { 0x2000, 0x0000, "UL", "Film Session Group Length" },
2068 { 0x2000, 0x0010, "IS", "Number of Copies" },
2069 { 0x2000, 0x0020, "CS", "Print Priority" },
2070 { 0x2000, 0x0030, "CS", "Medium Type" },
2071 { 0x2000, 0x0040, "CS", "Film Destination" },
2072 { 0x2000, 0x0050, "LO", "Film Session Label" },
2073 { 0x2000, 0x0060, "IS", "Memory Allocation" },
2074 { 0x2000, 0x0500, "SQ", "Referenced Film Box Sequence" },
2075 { 0x2010, 0x0000, "UL", "Film Box Group Length" },
2076 { 0x2010, 0x0010, "ST", "Image Display Format" },
2077 { 0x2010, 0x0030, "CS", "Annotation Display Format ID" },
2078 { 0x2010, 0x0040, "CS", "Film Orientation" },
2079 { 0x2010, 0x0050, "CS", "Film Size ID" },
2080 { 0x2010, 0x0060, "CS", "Magnification Type" },
2081 { 0x2010, 0x0080, "CS", "Smoothing Type" },
2082 { 0x2010, 0x0100, "CS", "Border Density" },
2083 { 0x2010, 0x0110, "CS", "Empty Image Density" },
2084 { 0x2010, 0x0120, "US", "Min Density" },
2085 { 0x2010, 0x0130, "US", "Max Density" },
2086 { 0x2010, 0x0140, "CS", "Trim" },
2087 { 0x2010, 0x0150, "ST", "Configuration Information" },
2088 { 0x2010, 0x0500, "SQ", "Referenced Film Session Sequence" },
2089 { 0x2010, 0x0510, "SQ", "Referenced Image Box Sequence" },
2090 { 0x2010, 0x0520, "SQ", "Referenced Basic Annotation Box Sequence" },
2091 { 0x2020, 0x0000, "UL", "Image Box Group Length" },
2092 { 0x2020, 0x0010, "US", "Image Box Position" },
2093 { 0x2020, 0x0020, "CS", "Polarity" },
2094 { 0x2020, 0x0030, "DS", "Requested Image Size" },
2095 { 0x2020, 0x0110, "SQ", "Preformatted Grayscale Image Sequence" },
2096 { 0x2020, 0x0111, "SQ", "Preformatted Color Image Sequence" },
2097 { 0x2020, 0x0130, "SQ", "Referenced Image Overlay Box Sequence" },
2098 { 0x2020, 0x0140, "SQ", "Referenced VOI LUT Box Sequence" },
2099 { 0x2030, 0x0000, "UL", "Annotation Group Length" },
2100 { 0x2030, 0x0010, "US", "Annotation Position" },
2101 { 0x2030, 0x0020, "LO", "Text String" },
2102 { 0x2040, 0x0000, "UL", "Overlay Box Group Length" },
2103 { 0x2040, 0x0010, "SQ", "Referenced Overlay Plane Sequence" },
2104 { 0x2040, 0x0011, "US", "Referenced Overlay Plane Groups" },
2105 { 0x2040, 0x0060, "CS", "Overlay Magnification Type" },
2106 { 0x2040, 0x0070, "CS", "Overlay Smoothing Type" },
2107 { 0x2040, 0x0080, "CS", "Overlay Foreground Density" },
2108 { 0x2040, 0x0090, "CS", "Overlay Mode" },
2109 { 0x2040, 0x0100, "CS", "Threshold Density" },
2110 { 0x2040, 0x0500, "SQ", "Referenced Overlay Image Box Sequence" },
2111 { 0x2050, 0x0010, "SQ", "Presentation LUT Sequence" },
2112 { 0x2050, 0x0020, "CS", "Presentation LUT Shape" },
2113 { 0x2100, 0x0000, "UL", "Print Job Group Length" },
2114 { 0x2100, 0x0020, "CS", "Execution Status" },
2115 { 0x2100, 0x0030, "CS", "Execution Status Info" },
2116 { 0x2100, 0x0040, "DA", "Creation Date" },
2117 { 0x2100, 0x0050, "TM", "Creation Time" },
2118 { 0x2100, 0x0070, "AE", "Originator" },
2119 { 0x2100, 0x0500, "SQ", "Referenced Print Job Sequence" },
2120 { 0x2110, 0x0000, "UL", "Printer Group Length" },
2121 { 0x2110, 0x0010, "CS", "Printer Status" },
2122 { 0x2110, 0x0020, "CS", "Printer Status Info" },
2123 { 0x2110, 0x0030, "LO", "Printer Name" },
2124 { 0x2110, 0x0099, "SH", "Print Queue ID" },
2125 { 0x3002, 0x0002, "SH", "RT Image Label" },
2126 { 0x3002, 0x0003, "LO", "RT Image Name" },
2127 { 0x3002, 0x0004, "ST", "RT Image Description" },
2128 { 0x3002, 0x000a, "CS", "Reported Values Origin" },
2129 { 0x3002, 0x000c, "CS", "RT Image Plane" },
2130 { 0x3002, 0x000e, "DS", "X-Ray Image Receptor Angle" },
2131 { 0x3002, 0x0010, "DS", "RTImageOrientation" },
2132 { 0x3002, 0x0011, "DS", "Image Plane Pixel Spacing" },
2133 { 0x3002, 0x0012, "DS", "RT Image Position" },
2134 { 0x3002, 0x0020, "SH", "Radiation Machine Name" },
2135 { 0x3002, 0x0022, "DS", "Radiation Machine SAD" },
2136 { 0x3002, 0x0024, "DS", "Radiation Machine SSD" },
2137 { 0x3002, 0x0026, "DS", "RT Image SID" },
2138 { 0x3002, 0x0028, "DS", "Source to Reference Object Distance" },
2139 { 0x3002, 0x0029, "IS", "Fraction Number" },
2140 { 0x3002, 0x0030, "SQ", "Exposure Sequence" },
2141 { 0x3002, 0x0032, "DS", "Meterset Exposure" },
2142 { 0x3004, 0x0001, "CS", "DVH Type" },
2143 { 0x3004, 0x0002, "CS", "Dose Units" },
2144 { 0x3004, 0x0004, "CS", "Dose Type" },
2145 { 0x3004, 0x0006, "LO", "Dose Comment" },
2146 { 0x3004, 0x0008, "DS", "Normalization Point" },
2147 { 0x3004, 0x000a, "CS", "Dose Summation Type" },
2148 { 0x3004, 0x000c, "DS", "GridFrame Offset Vector" },
2149 { 0x3004, 0x000e, "DS", "Dose Grid Scaling" },
2150 { 0x3004, 0x0010, "SQ", "RT Dose ROI Sequence" },
2151 { 0x3004, 0x0012, "DS", "Dose Value" },
2152 { 0x3004, 0x0040, "DS", "DVH Normalization Point" },
2153 { 0x3004, 0x0042, "DS", "DVH Normalization Dose Value" },
2154 { 0x3004, 0x0050, "SQ", "DVH Sequence" },
2155 { 0x3004, 0x0052, "DS", "DVH Dose Scaling" },
2156 { 0x3004, 0x0054, "CS", "DVH Volume Units" },
2157 { 0x3004, 0x0056, "IS", "DVH Number of Bins" },
2158 { 0x3004, 0x0058, "DS", "DVH Data" },
2159 { 0x3004, 0x0060, "SQ", "DVH Referenced ROI Sequence" },
2160 { 0x3004, 0x0062, "CS", "DVH ROI Contribution Type" },
2161 { 0x3004, 0x0070, "DS", "DVH Minimum Dose" },
2162 { 0x3004, 0x0072, "DS", "DVH Maximum Dose" },
2163 { 0x3004, 0x0074, "DS", "DVH Mean Dose" },
2164 { 0x3006, 0x0002, "SH", "Structure Set Label" },
2165 { 0x3006, 0x0004, "LO", "Structure Set Name" },
2166 { 0x3006, 0x0006, "ST", "Structure Set Description" },
2167 { 0x3006, 0x0008, "DA", "Structure Set Date" },
2168 { 0x3006, 0x0009, "TM", "Structure Set Time" },
2169 { 0x3006, 0x0010, "SQ", "Referenced Frame of Reference Sequence" },
2170 { 0x3006, 0x0012, "SQ", "RT Referenced Study Sequence" },
2171 { 0x3006, 0x0014, "SQ", "RT Referenced Series Sequence" },
2172 { 0x3006, 0x0016, "SQ", "Contour Image Sequence" },
2173 { 0x3006, 0x0020, "SQ", "Structure Set ROI Sequence" },
2174 { 0x3006, 0x0022, "IS", "ROI Number" },
2175 { 0x3006, 0x0024, "UI", "Referenced Frame of Reference UID" },
2176 { 0x3006, 0x0026, "LO", "ROI Name" },
2177 { 0x3006, 0x0028, "ST", "ROI Description" },
2178 { 0x3006, 0x002a, "IS", "ROI Display Color" },
2179 { 0x3006, 0x002c, "DS", "ROI Volume" },
2180 { 0x3006, 0x0030, "SQ", "RT Related ROI Sequence" },
2181 { 0x3006, 0x0033, "CS", "RT ROI Relationship" },
2182 { 0x3006, 0x0036, "CS", "ROI Generation Algorithm" },
2183 { 0x3006, 0x0038, "LO", "ROI Generation Description" },
2184 { 0x3006, 0x0039, "SQ", "ROI Contour Sequence" },
2185 { 0x3006, 0x0040, "SQ", "Contour Sequence" },
2186 { 0x3006, 0x0042, "CS", "Contour Geometric Type" },
2187 { 0x3006, 0x0044, "DS", "Contour SlabT hickness" },
2188 { 0x3006, 0x0045, "DS", "Contour Offset Vector" },
2189 { 0x3006, 0x0046, "IS", "Number of Contour Points" },
2190 { 0x3006, 0x0050, "DS", "Contour Data" },
2191 { 0x3006, 0x0080, "SQ", "RT ROI Observations Sequence" },
2192 { 0x3006, 0x0082, "IS", "Observation Number" },
2193 { 0x3006, 0x0084, "IS", "Referenced ROI Number" },
2194 { 0x3006, 0x0085, "SH", "ROI Observation Label" },
2195 { 0x3006, 0x0086, "SQ", "RT ROI Identification Code Sequence" },
2196 { 0x3006, 0x0088, "ST", "ROI Observation Description" },
2197 { 0x3006, 0x00a0, "SQ", "Related RT ROI Observations Sequence" },
2198 { 0x3006, 0x00a4, "CS", "RT ROI Interpreted Type" },
2199 { 0x3006, 0x00a6, "PN", "ROI Interpreter" },
2200 { 0x3006, 0x00b0, "SQ", "ROI Physical Properties Sequence" },
2201 { 0x3006, 0x00b2, "CS", "ROI Physical Property" },
2202 { 0x3006, 0x00b4, "DS", "ROI Physical Property Value" },
2203 { 0x3006, 0x00c0, "SQ", "Frame of Reference Relationship Sequence" },
2204 { 0x3006, 0x00c2, "UI", "Related Frame of Reference UID" },
2205 { 0x3006, 0x00c4, "CS", "Frame of Reference Transformation Type" },
2206 { 0x3006, 0x00c6, "DS", "Frame of Reference Transformation Matrix" },
2207 { 0x3006, 0x00c8, "LO", "Frame of Reference Transformation Comment" },
2208 { 0x300a, 0x0002, "SH", "RT Plan Label" },
2209 { 0x300a, 0x0003, "LO", "RT Plan Name" },
2210 { 0x300a, 0x0004, "ST", "RT Plan Description" },
2211 { 0x300a, 0x0006, "DA", "RT Plan Date" },
2212 { 0x300a, 0x0007, "TM", "RT Plan Time" },
2213 { 0x300a, 0x0009, "LO", "Treatment Protocols" },
2214 { 0x300a, 0x000a, "CS", "Treatment Intent" },
2215 { 0x300a, 0x000b, "LO", "Treatment Sites" },
2216 { 0x300a, 0x000c, "CS", "RT Plan Geometry" },
2217 { 0x300a, 0x000e, "ST", "Prescription Description" },
2218 { 0x300a, 0x0010, "SQ", "Dose ReferenceSequence" },
2219 { 0x300a, 0x0012, "IS", "Dose ReferenceNumber" },
2220 { 0x300a, 0x0014, "CS", "Dose Reference Structure Type" },
2221 { 0x300a, 0x0016, "LO", "Dose ReferenceDescription" },
2222 { 0x300a, 0x0018, "DS", "Dose Reference Point Coordinates" },
2223 { 0x300a, 0x001a, "DS", "Nominal Prior Dose" },
2224 { 0x300a, 0x0020, "CS", "Dose Reference Type" },
2225 { 0x300a, 0x0021, "DS", "Constraint Weight" },
2226 { 0x300a, 0x0022, "DS", "Delivery Warning Dose" },
2227 { 0x300a, 0x0023, "DS", "Delivery Maximum Dose" },
2228 { 0x300a, 0x0025, "DS", "Target Minimum Dose" },
2229 { 0x300a, 0x0026, "DS", "Target Prescription Dose" },
2230 { 0x300a, 0x0027, "DS", "Target Maximum Dose" },
2231 { 0x300a, 0x0028, "DS", "Target Underdose Volume Fraction" },
2232 { 0x300a, 0x002a, "DS", "Organ at Risk Full-volume Dose" },
2233 { 0x300a, 0x002b, "DS", "Organ at Risk Limit Dose" },
2234 { 0x300a, 0x002c, "DS", "Organ at Risk Maximum Dose" },
2235 { 0x300a, 0x002d, "DS", "Organ at Risk Overdose Volume Fraction" },
2236 { 0x300a, 0x0040, "SQ", "Tolerance Table Sequence" },
2237 { 0x300a, 0x0042, "IS", "Tolerance Table Number" },
2238 { 0x300a, 0x0043, "SH", "Tolerance Table Label" },
2239 { 0x300a, 0x0044, "DS", "Gantry Angle Tolerance" },
2240 { 0x300a, 0x0046, "DS", "Beam Limiting Device Angle Tolerance" },
2241 { 0x300a, 0x0048, "SQ", "Beam Limiting Device Tolerance Sequence" },
2242 { 0x300a, 0x004a, "DS", "Beam Limiting Device Position Tolerance" },
2243 { 0x300a, 0x004c, "DS", "Patient Support Angle Tolerance" },
2244 { 0x300a, 0x004e, "DS", "Table Top Eccentric Angle Tolerance" },
2245 { 0x300a, 0x0051, "DS", "Table Top Vertical Position Tolerance" },
2246 { 0x300a, 0x0052, "DS", "Table Top Longitudinal Position Tolerance" },
2247 { 0x300a, 0x0053, "DS", "Table Top Lateral Position Tolerance" },
2248 { 0x300a, 0x0055, "CS", "RT Plan Relationship" },
2249 { 0x300a, 0x0070, "SQ", "Fraction Group Sequence" },
2250 { 0x300a, 0x0071, "IS", "Fraction Group Number" },
2251 { 0x300a, 0x0078, "IS", "Number of Fractions Planned" },
2252 { 0x300a, 0x0079, "IS", "Number of Fractions Per Day" },
2253 { 0x300a, 0x007a, "IS", "Repeat Fraction Cycle Length" },
2254 { 0x300a, 0x007b, "LT", "Fraction Pattern" },
2255 { 0x300a, 0x0080, "IS", "Number of Beams" },
2256 { 0x300a, 0x0082, "DS", "Beam Dose Specification Point" },
2257 { 0x300a, 0x0084, "DS", "Beam Dose" },
2258 { 0x300a, 0x0086, "DS", "Beam Meterset" },
2259 { 0x300a, 0x00a0, "IS", "Number of Brachy Application Setups" },
2260 { 0x300a, 0x00a2, "DS", "Brachy Application Setup Dose Specification Point" },
2261 { 0x300a, 0x00a4, "DS", "Brachy Application Setup Dose" },
2262 { 0x300a, 0x00b0, "SQ", "Beam Sequence" },
2263 { 0x300a, 0x00b2, "SH", "Treatment Machine Name " },
2264 { 0x300a, 0x00b3, "CS", "Primary Dosimeter Unit" },
2265 { 0x300a, 0x00b4, "DS", "Source-Axis Distance" },
2266 { 0x300a, 0x00b6, "SQ", "Beam Limiting Device Sequence" },
2267 { 0x300a, 0x00b8, "CS", "RT Beam Limiting Device Type" },
2268 { 0x300a, 0x00ba, "DS", "Source to Beam Limiting Device Distance" },
2269 { 0x300a, 0x00bc, "IS", "Number of Leaf/Jaw Pairs" },
2270 { 0x300a, 0x00be, "DS", "Leaf Position Boundaries" },
2271 { 0x300a, 0x00c0, "IS", "Beam Number" },
2272 { 0x300a, 0x00c2, "LO", "Beam Name" },
2273 { 0x300a, 0x00c3, "ST", "Beam Description" },
2274 { 0x300a, 0x00c4, "CS", "Beam Type" },
2275 { 0x300a, 0x00c6, "CS", "Radiation Type" },
2276 { 0x300a, 0x00c8, "IS", "Reference Image Number" },
2277 { 0x300a, 0x00ca, "SQ", "Planned Verification Image Sequence" },
2278 { 0x300a, 0x00cc, "LO", "Imaging Device Specific Acquisition Parameters" },
2279 { 0x300a, 0x00ce, "CS", "Treatment Delivery Type" },
2280 { 0x300a, 0x00d0, "IS", "Number of Wedges" },
2281 { 0x300a, 0x00d1, "SQ", "Wedge Sequence" },
2282 { 0x300a, 0x00d2, "IS", "Wedge Number" },
2283 { 0x300a, 0x00d3, "CS", "Wedge Type" },
2284 { 0x300a, 0x00d4, "SH", "Wedge ID" },
2285 { 0x300a, 0x00d5, "IS", "Wedge Angle" },
2286 { 0x300a, 0x00d6, "DS", "Wedge Factor" },
2287 { 0x300a, 0x00d8, "DS", "Wedge Orientation" },
2288 { 0x300a, 0x00da, "DS", "Source to Wedge Tray Distance" },
2289 { 0x300a, 0x00e0, "IS", "Number of Compensators" },
2290 { 0x300a, 0x00e1, "SH", "Material ID" },
2291 { 0x300a, 0x00e2, "DS", "Total Compensator Tray Factor" },
2292 { 0x300a, 0x00e3, "SQ", "Compensator Sequence" },
2293 { 0x300a, 0x00e4, "IS", "Compensator Number" },
2294 { 0x300a, 0x00e5, "SH", "Compensator ID" },
2295 { 0x300a, 0x00e6, "DS", "Source to Compensator Tray Distance" },
2296 { 0x300a, 0x00e7, "IS", "Compensator Rows" },
2297 { 0x300a, 0x00e8, "IS", "Compensator Columns" },
2298 { 0x300a, 0x00e9, "DS", "Compensator Pixel Spacing" },
2299 { 0x300a, 0x00ea, "DS", "Compensator Position" },
2300 { 0x300a, 0x00eb, "DS", "Compensator Transmission Data" },
2301 { 0x300a, 0x00ec, "DS", "Compensator Thickness Data" },
2302 { 0x300a, 0x00ed, "IS", "Number of Boli" },
2303 { 0x300a, 0x00f0, "IS", "Number of Blocks" },
2304 { 0x300a, 0x00f2, "DS", "Total Block Tray Factor" },
2305 { 0x300a, 0x00f4, "SQ", "Block Sequence" },
2306 { 0x300a, 0x00f5, "SH", "Block Tray ID" },
2307 { 0x300a, 0x00f6, "DS", "Source to Block Tray Distance" },
2308 { 0x300a, 0x00f8, "CS", "Block Type" },
2309 { 0x300a, 0x00fa, "CS", "Block Divergence" },
2310 { 0x300a, 0x00fc, "IS", "Block Number" },
2311 { 0x300a, 0x00fe, "LO", "Block Name" },
2312 { 0x300a, 0x0100, "DS", "Block Thickness" },
2313 { 0x300a, 0x0102, "DS", "Block Transmission" },
2314 { 0x300a, 0x0104, "IS", "Block Number of Points" },
2315 { 0x300a, 0x0106, "DS", "Block Data" },
2316 { 0x300a, 0x0107, "SQ", "Applicator Sequence" },
2317 { 0x300a, 0x0108, "SH", "Applicator ID" },
2318 { 0x300a, 0x0109, "CS", "Applicator Type" },
2319 { 0x300a, 0x010a, "LO", "Applicator Description" },
2320 { 0x300a, 0x010c, "DS", "Cumulative Dose Reference Coefficient" },
2321 { 0x300a, 0x010e, "DS", "Final Cumulative Meterset Weight" },
2322 { 0x300a, 0x0110, "IS", "Number of Control Points" },
2323 { 0x300a, 0x0111, "SQ", "Control Point Sequence" },
2324 { 0x300a, 0x0112, "IS", "Control Point Index" },
2325 { 0x300a, 0x0114, "DS", "Nominal Beam Energy" },
2326 { 0x300a, 0x0115, "DS", "Dose Rate Set" },
2327 { 0x300a, 0x0116, "SQ", "Wedge Position Sequence" },
2328 { 0x300a, 0x0118, "CS", "Wedge Position" },
2329 { 0x300a, 0x011a, "SQ", "Beam Limiting Device Position Sequence" },
2330 { 0x300a, 0x011c, "DS", "Leaf Jaw Positions" },
2331 { 0x300a, 0x011e, "DS", "Gantry Angle" },
2332 { 0x300a, 0x011f, "CS", "Gantry Rotation Direction" },
2333 { 0x300a, 0x0120, "DS", "Beam Limiting Device Angle" },
2334 { 0x300a, 0x0121, "CS", "Beam Limiting Device Rotation Direction" },
2335 { 0x300a, 0x0122, "DS", "Patient Support Angle" },
2336 { 0x300a, 0x0123, "CS", "Patient Support Rotation Direction" },
2337 { 0x300a, 0x0124, "DS", "Table Top Eccentric Axis Distance" },
2338 { 0x300a, 0x0125, "DS", "Table Top Eccentric Angle" },
2339 { 0x300a, 0x0126, "CS", "Table Top Eccentric Rotation Direction" },
2340 { 0x300a, 0x0128, "DS", "Table Top Vertical Position" },
2341 { 0x300a, 0x0129, "DS", "Table Top Longitudinal Position" },
2342 { 0x300a, 0x012a, "DS", "Table Top Lateral Position" },
2343 { 0x300a, 0x012c, "DS", "Isocenter Position" },
2344 { 0x300a, 0x012e, "DS", "Surface Entry Point" },
2345 { 0x300a, 0x0130, "DS", "Source to Surface Distance" },
2346 { 0x300a, 0x0134, "DS", "Cumulative Meterset Weight" },
2347 { 0x300a, 0x0180, "SQ", "Patient Setup Sequence" },
2348 { 0x300a, 0x0182, "IS", "Patient Setup Number" },
2349 { 0x300a, 0x0184, "LO", "Patient Additional Position" },
2350 { 0x300a, 0x0190, "SQ", "Fixation Device Sequence" },
2351 { 0x300a, 0x0192, "CS", "Fixation Device Type" },
2352 { 0x300a, 0x0194, "SH", "Fixation Device Label" },
2353 { 0x300a, 0x0196, "ST", "Fixation Device Description" },
2354 { 0x300a, 0x0198, "SH", "Fixation Device Position" },
2355 { 0x300a, 0x01a0, "SQ", "Shielding Device Sequence" },
2356 { 0x300a, 0x01a2, "CS", "Shielding Device Type" },
2357 { 0x300a, 0x01a4, "SH", "Shielding Device Label" },
2358 { 0x300a, 0x01a6, "ST", "Shielding Device Description" },
2359 { 0x300a, 0x01a8, "SH", "Shielding Device Position" },
2360 { 0x300a, 0x01b0, "CS", "Setup Technique" },
2361 { 0x300a, 0x01b2, "ST", "Setup TechniqueDescription" },
2362 { 0x300a, 0x01b4, "SQ", "Setup Device Sequence" },
2363 { 0x300a, 0x01b6, "CS", "Setup Device Type" },
2364 { 0x300a, 0x01b8, "SH", "Setup Device Label" },
2365 { 0x300a, 0x01ba, "ST", "Setup Device Description" },
2366 { 0x300a, 0x01bc, "DS", "Setup Device Parameter" },
2367 { 0x300a, 0x01d0, "ST", "Setup ReferenceDescription" },
2368 { 0x300a, 0x01d2, "DS", "Table Top Vertical Setup Displacement" },
2369 { 0x300a, 0x01d4, "DS", "Table Top Longitudinal Setup Displacement" },
2370 { 0x300a, 0x01d6, "DS", "Table Top Lateral Setup Displacement" },
2371 { 0x300a, 0x0200, "CS", "Brachy Treatment Technique" },
2372 { 0x300a, 0x0202, "CS", "Brachy Treatment Type" },
2373 { 0x300a, 0x0206, "SQ", "Treatment Machine Sequence" },
2374 { 0x300a, 0x0210, "SQ", "Source Sequence" },
2375 { 0x300a, 0x0212, "IS", "Source Number" },
2376 { 0x300a, 0x0214, "CS", "Source Type" },
2377 { 0x300a, 0x0216, "LO", "Source Manufacturer" },
2378 { 0x300a, 0x0218, "DS", "Active Source Diameter" },
2379 { 0x300a, 0x021a, "DS", "Active Source Length" },
2380 { 0x300a, 0x0222, "DS", "Source Encapsulation Nominal Thickness" },
2381 { 0x300a, 0x0224, "DS", "Source Encapsulation Nominal Transmission" },
2382 { 0x300a, 0x0226, "LO", "Source IsotopeName" },
2383 { 0x300a, 0x0228, "DS", "Source Isotope Half Life" },
2384 { 0x300a, 0x022a, "DS", "Reference Air Kerma Rate" },
2385 { 0x300a, 0x022c, "DA", "Air Kerma Rate Reference Date" },
2386 { 0x300a, 0x022e, "TM", "Air Kerma Rate Reference Time" },
2387 { 0x300a, 0x0230, "SQ", "Application Setup Sequence" },
2388 { 0x300a, 0x0232, "CS", "Application Setup Type" },
2389 { 0x300a, 0x0234, "IS", "Application Setup Number" },
2390 { 0x300a, 0x0236, "LO", "Application Setup Name" },
2391 { 0x300a, 0x0238, "LO", "Application Setup Manufacturer" },
2392 { 0x300a, 0x0240, "IS", "Template Number" },
2393 { 0x300a, 0x0242, "SH", "Template Type" },
2394 { 0x300a, 0x0244, "LO", "Template Name" },
2395 { 0x300a, 0x0250, "DS", "Total Reference Air Kerma" },
2396 { 0x300a, 0x0260, "SQ", "Brachy Accessory Device Sequence" },
2397 { 0x300a, 0x0262, "IS", "Brachy Accessory Device Number" },
2398 { 0x300a, 0x0263, "SH", "Brachy Accessory Device ID" },
2399 { 0x300a, 0x0264, "CS", "Brachy Accessory Device Type" },
2400 { 0x300a, 0x0266, "LO", "Brachy Accessory Device Name" },
2401 { 0x300a, 0x026a, "DS", "Brachy Accessory Device Nominal Thickness" },
2402 { 0x300a, 0x026c, "DS", "Brachy Accessory Device Nominal Transmission" },
2403 { 0x300a, 0x0280, "SQ", "Channel Sequence" },
2404 { 0x300a, 0x0282, "IS", "Channel Number" },
2405 { 0x300a, 0x0284, "DS", "Channel Length" },
2406 { 0x300a, 0x0286, "DS", "Channel Total Time" },
2407 { 0x300a, 0x0288, "CS", "Source Movement Type" },
2408 { 0x300a, 0x028a, "IS", "Number of Pulses" },
2409 { 0x300a, 0x028c, "DS", "Pulse Repetition Interval" },
2410 { 0x300a, 0x0290, "IS", "Source Applicator Number" },
2411 { 0x300a, 0x0291, "SH", "Source Applicator ID" },
2412 { 0x300a, 0x0292, "CS", "Source Applicator Type" },
2413 { 0x300a, 0x0294, "LO", "Source Applicator Name" },
2414 { 0x300a, 0x0296, "DS", "Source Applicator Length" },
2415 { 0x300a, 0x0298, "LO", "Source Applicator Manufacturer" },
2416 { 0x300a, 0x029c, "DS", "Source Applicator Wall Nominal Thickness" },
2417 { 0x300a, 0x029e, "DS", "Source Applicator Wall Nominal Transmission" },
2418 { 0x300a, 0x02a0, "DS", "Source Applicator Step Size" },
2419 { 0x300a, 0x02a2, "IS", "Transfer Tube Number" },
2420 { 0x300a, 0x02a4, "DS", "Transfer Tube Length" },
2421 { 0x300a, 0x02b0, "SQ", "Channel Shield Sequence" },
2422 { 0x300a, 0x02b2, "IS", "Channel Shield Number" },
2423 { 0x300a, 0x02b3, "SH", "Channel Shield ID" },
2424 { 0x300a, 0x02b4, "LO", "Channel Shield Name" },
2425 { 0x300a, 0x02b8, "DS", "Channel Shield Nominal Thickness" },
2426 { 0x300a, 0x02ba, "DS", "Channel Shield Nominal Transmission" },
2427 { 0x300a, 0x02c8, "DS", "Final Cumulative Time Weight" },
2428 { 0x300a, 0x02d0, "SQ", "Brachy Control Point Sequence" },
2429 { 0x300a, 0x02d2, "DS", "Control Point Relative Position" },
2430 { 0x300a, 0x02d4, "DS", "Control Point 3D Position" },
2431 { 0x300a, 0x02d6, "DS", "Cumulative Time Weight" },
2432 { 0x300c, 0x0002, "SQ", "Referenced RT Plan Sequence" },
2433 { 0x300c, 0x0004, "SQ", "Referenced Beam Sequence" },
2434 { 0x300c, 0x0006, "IS", "Referenced Beam Number" },
2435 { 0x300c, 0x0007, "IS", "Referenced Reference Image Number" },
2436 { 0x300c, 0x0008, "DS", "Start Cumulative Meterset Weight" },
2437 { 0x300c, 0x0009, "DS", "End Cumulative Meterset Weight" },
2438 { 0x300c, 0x000a, "SQ", "Referenced Brachy Application Setup Sequence" },
2439 { 0x300c, 0x000c, "IS", "Referenced Brachy Application Setup Number" },
2440 { 0x300c, 0x000e, "IS", "Referenced Source Number" },
2441 { 0x300c, 0x0020, "SQ", "Referenced Fraction Group Sequence" },
2442 { 0x300c, 0x0022, "IS", "Referenced Fraction Group Number" },
2443 { 0x300c, 0x0040, "SQ", "Referenced Verification Image Sequence" },
2444 { 0x300c, 0x0042, "SQ", "Referenced Reference Image Sequence" },
2445 { 0x300c, 0x0050, "SQ", "Referenced Dose Reference Sequence" },
2446 { 0x300c, 0x0051, "IS", "Referenced Dose Reference Number" },
2447 { 0x300c, 0x0055, "SQ", "Brachy Referenced Dose Reference Sequence" },
2448 { 0x300c, 0x0060, "SQ", "Referenced Structure Set Sequence" },
2449 { 0x300c, 0x006a, "IS", "Referenced Patient Setup Number" },
2450 { 0x300c, 0x0080, "SQ", "Referenced Dose Sequence" },
2451 { 0x300c, 0x00a0, "IS", "Referenced Tolerance Table Number" },
2452 { 0x300c, 0x00b0, "SQ", "Referenced Bolus Sequence" },
2453 { 0x300c, 0x00c0, "IS", "Referenced Wedge Number" },
2454 { 0x300c, 0x00d0, "IS", "Referenced Compensato rNumber" },
2455 { 0x300c, 0x00e0, "IS", "Referenced Block Number" },
2456 { 0x300c, 0x00f0, "IS", "Referenced Control Point" },
2457 { 0x300e, 0x0002, "CS", "Approval Status" },
2458 { 0x300e, 0x0004, "DA", "Review Date" },
2459 { 0x300e, 0x0005, "TM", "Review Time" },
2460 { 0x300e, 0x0008, "PN", "Reviewer Name" },
2461 { 0x4000, 0x0000, "UL", "Text Group Length" },
2462 { 0x4000, 0x0010, "LT", "Text Arbitrary" },
2463 { 0x4000, 0x4000, "LT", "Text Comments" },
2464 { 0x4008, 0x0000, "UL", "Results Group Length" },
2465 { 0x4008, 0x0040, "SH", "Results ID" },
2466 { 0x4008, 0x0042, "LO", "Results ID Issuer" },
2467 { 0x4008, 0x0050, "SQ", "Referenced Interpretation Sequence" },
2468 { 0x4008, 0x00ff, "CS", "Report Production Status" },
2469 { 0x4008, 0x0100, "DA", "Interpretation Recorded Date" },
2470 { 0x4008, 0x0101, "TM", "Interpretation Recorded Time" },
2471 { 0x4008, 0x0102, "PN", "Interpretation Recorder" },
2472 { 0x4008, 0x0103, "LO", "Reference to Recorded Sound" },
2473 { 0x4008, 0x0108, "DA", "Interpretation Transcription Date" },
2474 { 0x4008, 0x0109, "TM", "Interpretation Transcription Time" },
2475 { 0x4008, 0x010a, "PN", "Interpretation Transcriber" },
2476 { 0x4008, 0x010b, "ST", "Interpretation Text" },
2477 { 0x4008, 0x010c, "PN", "Interpretation Author" },
2478 { 0x4008, 0x0111, "SQ", "Interpretation Approver Sequence" },
2479 { 0x4008, 0x0112, "DA", "Interpretation Approval Date" },
2480 { 0x4008, 0x0113, "TM", "Interpretation Approval Time" },
2481 { 0x4008, 0x0114, "PN", "Physician Approving Interpretation" },
2482 { 0x4008, 0x0115, "LT", "Interpretation Diagnosis Description" },
2483 { 0x4008, 0x0117, "SQ", "InterpretationDiagnosis Code Sequence" },
2484 { 0x4008, 0x0118, "SQ", "Results Distribution List Sequence" },
2485 { 0x4008, 0x0119, "PN", "Distribution Name" },
2486 { 0x4008, 0x011a, "LO", "Distribution Address" },
2487 { 0x4008, 0x0200, "SH", "Interpretation ID" },
2488 { 0x4008, 0x0202, "LO", "Interpretation ID Issuer" },
2489 { 0x4008, 0x0210, "CS", "Interpretation Type ID" },
2490 { 0x4008, 0x0212, "CS", "Interpretation Status ID" },
2491 { 0x4008, 0x0300, "ST", "Impressions" },
2492 { 0x4008, 0x4000, "ST", "Results Comments" },
2493 { 0x4009, 0x0001, "LT", "Report ID" },
2494 { 0x4009, 0x0020, "LT", "Report Status" },
2495 { 0x4009, 0x0030, "DA", "Report Creation Date" },
2496 { 0x4009, 0x0070, "LT", "Report Approving Physician" },
2497 { 0x4009, 0x00e0, "LT", "Report Text" },
2498 { 0x4009, 0x00e1, "LT", "Report Author" },
2499 { 0x4009, 0x00e3, "LT", "Reporting Radiologist" },
2500 { 0x5000, 0x0000, "UL", "Curve Group Length" },
2501 { 0x5000, 0x0005, "US", "Curve Dimensions" },
2502 { 0x5000, 0x0010, "US", "Number of Points" },
2503 { 0x5000, 0x0020, "CS", "Type of Data" },
2504 { 0x5000, 0x0022, "LO", "Curve Description" },
2505 { 0x5000, 0x0030, "SH", "Axis Units" },
2506 { 0x5000, 0x0040, "SH", "Axis Labels" },
2507 { 0x5000, 0x0103, "US", "Data Value Representation" },
2508 { 0x5000, 0x0104, "US", "Minimum Coordinate Value" },
2509 { 0x5000, 0x0105, "US", "Maximum Coordinate Value" },
2510 { 0x5000, 0x0106, "SH", "Curve Range" },
2511 { 0x5000, 0x0110, "US", "Curve Data Descriptor" },
2512 { 0x5000, 0x0112, "US", "Coordinate Start Value" },
2513 { 0x5000, 0x0114, "US", "Coordinate Step Value" },
2514 { 0x5000, 0x1001, "CS", "Curve Activation Layer" },
2515 { 0x5000, 0x2000, "US", "Audio Type" },
2516 { 0x5000, 0x2002, "US", "Audio Sample Format" },
2517 { 0x5000, 0x2004, "US", "Number of Channels" },
2518 { 0x5000, 0x2006, "UL", "Number of Samples" },
2519 { 0x5000, 0x2008, "UL", "Sample Rate" },
2520 { 0x5000, 0x200a, "UL", "Total Time" },
2521 { 0x5000, 0x200c, "xs", "Audio Sample Data" },
2522 { 0x5000, 0x200e, "LT", "Audio Comments" },
2523 { 0x5000, 0x2500, "LO", "Curve Label" },
2524 { 0x5000, 0x2600, "SQ", "CurveReferenced Overlay Sequence" },
2525 { 0x5000, 0x2610, "US", "CurveReferenced Overlay Group" },
2526 { 0x5000, 0x3000, "OW", "Curve Data" },
2527 { 0x6000, 0x0000, "UL", "Overlay Group Length" },
2528 { 0x6000, 0x0001, "US", "Gray Palette Color Lookup Table Descriptor" },
2529 { 0x6000, 0x0002, "US", "Gray Palette Color Lookup Table Data" },
2530 { 0x6000, 0x0010, "US", "Overlay Rows" },
2531 { 0x6000, 0x0011, "US", "Overlay Columns" },
2532 { 0x6000, 0x0012, "US", "Overlay Planes" },
2533 { 0x6000, 0x0015, "IS", "Number of Frames in Overlay" },
2534 { 0x6000, 0x0022, "LO", "Overlay Description" },
2535 { 0x6000, 0x0040, "CS", "Overlay Type" },
2536 { 0x6000, 0x0045, "CS", "Overlay Subtype" },
2537 { 0x6000, 0x0050, "SS", "Overlay Origin" },
2538 { 0x6000, 0x0051, "US", "Image Frame Origin" },
2539 { 0x6000, 0x0052, "US", "Plane Origin" },
2540 { 0x6000, 0x0060, "LO", "Overlay Compression Code" },
2541 { 0x6000, 0x0061, "SH", "Overlay Compression Originator" },
2542 { 0x6000, 0x0062, "SH", "Overlay Compression Label" },
2543 { 0x6000, 0x0063, "SH", "Overlay Compression Description" },
2544 { 0x6000, 0x0066, "AT", "Overlay Compression Step Pointers" },
2545 { 0x6000, 0x0068, "US", "Overlay Repeat Interval" },
2546 { 0x6000, 0x0069, "US", "Overlay Bits Grouped" },
2547 { 0x6000, 0x0100, "US", "Overlay Bits Allocated" },
2548 { 0x6000, 0x0102, "US", "Overlay Bit Position" },
2549 { 0x6000, 0x0110, "LO", "Overlay Format" },
2550 { 0x6000, 0x0200, "xs", "Overlay Location" },
2551 { 0x6000, 0x0800, "LO", "Overlay Code Label" },
2552 { 0x6000, 0x0802, "US", "Overlay Number of Tables" },
2553 { 0x6000, 0x0803, "AT", "Overlay Code Table Location" },
2554 { 0x6000, 0x0804, "US", "Overlay Bits For Code Word" },
2555 { 0x6000, 0x1001, "CS", "Overlay Activation Layer" },
2556 { 0x6000, 0x1100, "US", "Overlay Descriptor - Gray" },
2557 { 0x6000, 0x1101, "US", "Overlay Descriptor - Red" },
2558 { 0x6000, 0x1102, "US", "Overlay Descriptor - Green" },
2559 { 0x6000, 0x1103, "US", "Overlay Descriptor - Blue" },
2560 { 0x6000, 0x1200, "US", "Overlays - Gray" },
2561 { 0x6000, 0x1201, "US", "Overlays - Red" },
2562 { 0x6000, 0x1202, "US", "Overlays - Green" },
2563 { 0x6000, 0x1203, "US", "Overlays - Blue" },
2564 { 0x6000, 0x1301, "IS", "ROI Area" },
2565 { 0x6000, 0x1302, "DS", "ROI Mean" },
2566 { 0x6000, 0x1303, "DS", "ROI Standard Deviation" },
2567 { 0x6000, 0x1500, "LO", "Overlay Label" },
2568 { 0x6000, 0x3000, "OW", "Overlay Data" },
2569 { 0x6000, 0x4000, "LT", "Overlay Comments" },
2570 { 0x6001, 0x0000, "UN", "?" },
2571 { 0x6001, 0x0010, "LO", "?" },
2572 { 0x6001, 0x1010, "xs", "?" },
2573 { 0x6001, 0x1030, "xs", "?" },
2574 { 0x6021, 0x0000, "xs", "?" },
2575 { 0x6021, 0x0010, "xs", "?" },
2576 { 0x7001, 0x0010, "LT", "Dummy" },
2577 { 0x7003, 0x0010, "LT", "Info" },
2578 { 0x7005, 0x0010, "LT", "Dummy" },
2579 { 0x7000, 0x0004, "ST", "TextAnnotation" },
2580 { 0x7000, 0x0005, "IS", "Box" },
2581 { 0x7000, 0x0007, "IS", "ArrowEnd" },
2582 { 0x7fe0, 0x0000, "UL", "Pixel Data Group Length" },
2583 { 0x7fe0, 0x0010, "xs", "Pixel Data" },
2584 { 0x7fe0, 0x0020, "OW", "Coefficients SDVN" },
2585 { 0x7fe0, 0x0030, "OW", "Coefficients SDHN" },
2586 { 0x7fe0, 0x0040, "OW", "Coefficients SDDN" },
2587 { 0x7fe1, 0x0010, "xs", "Pixel Data" },
2588 { 0x7f00, 0x0000, "UL", "Variable Pixel Data Group Length" },
2589 { 0x7f00, 0x0010, "xs", "Variable Pixel Data" },
2590 { 0x7f00, 0x0011, "US", "Variable Next Data Group" },
2591 { 0x7f00, 0x0020, "OW", "Variable Coefficients SDVN" },
2592 { 0x7f00, 0x0030, "OW", "Variable Coefficients SDHN" },
2593 { 0x7f00, 0x0040, "OW", "Variable Coefficients SDDN" },
2594 { 0x7fe1, 0x0000, "OB", "Binary Data" },
2595 { 0x7fe3, 0x0000, "LT", "Image Graphics Format Code" },
2596 { 0x7fe3, 0x0010, "OB", "Image Graphics" },
2597 { 0x7fe3, 0x0020, "OB", "Image Graphics Dummy" },
2598 { 0x7ff1, 0x0001, "US", "?" },
2599 { 0x7ff1, 0x0002, "US", "?" },
2600 { 0x7ff1, 0x0003, "xs", "?" },
2601 { 0x7ff1, 0x0004, "IS", "?" },
2602 { 0x7ff1, 0x0005, "US", "?" },
2603 { 0x7ff1, 0x0007, "US", "?" },
2604 { 0x7ff1, 0x0008, "US", "?" },
2605 { 0x7ff1, 0x0009, "US", "?" },
2606 { 0x7ff1, 0x000a, "LT", "?" },
2607 { 0x7ff1, 0x000b, "US", "?" },
2608 { 0x7ff1, 0x000c, "US", "?" },
2609 { 0x7ff1, 0x000d, "US", "?" },
2610 { 0x7ff1, 0x0010, "US", "?" },
2611 { 0xfffc, 0xfffc, "OB", "Data Set Trailing Padding" },
2612 { 0xfffe, 0xe000, "!!", "Item" },
2613 { 0xfffe, 0xe00d, "!!", "Item Delimitation Item" },
2614 { 0xfffe, 0xe0dd, "!!", "Sequence Delimitation Item" },
dirk75aa9802014-10-25 12:30:45 +00002615 { 0xffff, 0xffff, "xs", (char *) NULL }
cristy3ed852e2009-09-05 21:47:34 +00002616 };
2617
2618/*
2619%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2620% %
2621% %
2622% %
2623% I s D C M %
2624% %
2625% %
2626% %
2627%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2628%
2629% IsDCM() returns MagickTrue if the image format type, identified by the
2630% magick string, is DCM.
2631%
2632% The format of the ReadDCMImage method is:
2633%
2634% MagickBooleanType IsDCM(const unsigned char *magick,const size_t length)
2635%
2636% A description of each parameter follows:
2637%
2638% o magick: compare image format pattern against these bytes.
2639%
2640% o length: Specifies the length of the magick string.
2641%
2642*/
2643static MagickBooleanType IsDCM(const unsigned char *magick,const size_t length)
2644{
2645 if (length < 132)
2646 return(MagickFalse);
2647 if (LocaleNCompare((char *) (magick+128),"DICM",4) == 0)
2648 return(MagickTrue);
2649 return(MagickFalse);
2650}
2651
2652/*
2653%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2654% %
2655% %
2656% %
2657% R e a d D C M I m a g e %
2658% %
2659% %
2660% %
2661%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2662%
2663% ReadDCMImage() reads a Digital Imaging and Communications in Medicine
2664% (DICOM) file and returns it. It allocates the memory necessary for the
2665% new Image structure and returns a pointer to the new image.
2666%
2667% The format of the ReadDCMImage method is:
2668%
2669% Image *ReadDCMImage(const ImageInfo *image_info,ExceptionInfo *exception)
2670%
2671% A description of each parameter follows:
2672%
2673% o image_info: the image info.
2674%
2675% o exception: return any errors or warnings in this structure.
2676%
2677*/
cristybc98a282009-10-09 17:52:22 +00002678typedef struct _DCMStreamInfo
2679{
2680 size_t
2681 remaining,
2682 segment_count;
2683
2684 ssize_t
2685 segments[15];
2686
2687 size_t
2688 offset_count;
2689
2690 ssize_t
2691 *offsets;
2692
2693 ssize_t
2694 count;
2695
2696 int
2697 byte;
2698} DCMStreamInfo;
2699
2700static int ReadDCMByte(DCMStreamInfo *stream_info,Image *image)
2701{
2702 if (image->compression != RLECompression)
2703 return(ReadBlobByte(image));
2704 if (stream_info->count == 0)
2705 {
2706 int
2707 byte;
2708
2709 ssize_t
2710 count;
2711
2712 if (stream_info->remaining <= 2)
2713 stream_info->remaining=0;
2714 else
2715 stream_info->remaining-=2;
2716 count=(ssize_t) ReadBlobByte(image);
2717 byte=ReadBlobByte(image);
2718 if (count == 128)
2719 return(0);
2720 else
2721 if (count < 128)
2722 {
2723 /*
2724 Literal bytes.
2725 */
2726 stream_info->count=count;
2727 stream_info->byte=(-1);
2728 return(byte);
2729 }
2730 else
2731 {
2732 /*
2733 Repeated bytes.
2734 */
2735 stream_info->count=256-count;
2736 stream_info->byte=byte;
2737 return(byte);
2738 }
2739 }
2740 stream_info->count--;
2741 if (stream_info->byte >= 0)
2742 return(stream_info->byte);
2743 if (stream_info->remaining > 0)
2744 stream_info->remaining--;
2745 return(ReadBlobByte(image));
2746}
2747
cristyba18d462014-11-02 00:28:12 +00002748static unsigned short ReadDCMShort(DCMStreamInfo *stream_info,Image *image)
cristybc98a282009-10-09 17:52:22 +00002749{
cristyf327da72011-03-24 12:32:36 +00002750 int
2751 shift;
2752
cristybc98a282009-10-09 17:52:22 +00002753 unsigned short
2754 value;
2755
2756 if (image->compression != RLECompression)
2757 return(ReadBlobLSBShort(image));
cristyf327da72011-03-24 12:32:36 +00002758 shift=image->depth < 16 ? 4 : 8;
cristybc98a282009-10-09 17:52:22 +00002759 value=ReadDCMByte(stream_info,image) | (unsigned short)
cristyf327da72011-03-24 12:32:36 +00002760 (ReadDCMByte(stream_info,image) << shift);
cristybc98a282009-10-09 17:52:22 +00002761 return(value);
2762}
2763
cristy3ed852e2009-09-05 21:47:34 +00002764static Image *ReadDCMImage(const ImageInfo *image_info,ExceptionInfo *exception)
2765{
2766 char
cristy151b66d2015-04-15 10:50:31 +00002767 explicit_vr[MagickPathExtent],
2768 implicit_vr[MagickPathExtent],
2769 magick[MagickPathExtent],
2770 photometric[MagickPathExtent];
cristy3ed852e2009-09-05 21:47:34 +00002771
cristybc98a282009-10-09 17:52:22 +00002772 DCMStreamInfo
2773 *stream_info;
2774
cristy3ed852e2009-09-05 21:47:34 +00002775 Image
2776 *image;
2777
cristybc98a282009-10-09 17:52:22 +00002778 int
cristy68931bc2010-03-19 17:11:43 +00002779 *bluemap,
cristyebc62bd2010-03-31 20:24:46 +00002780 datum,
cristy68931bc2010-03-19 17:11:43 +00002781 *greenmap,
cristybc98a282009-10-09 17:52:22 +00002782 *graymap,
cristy68931bc2010-03-19 17:11:43 +00002783 index,
2784 *redmap;
cristybc98a282009-10-09 17:52:22 +00002785
cristy3ed852e2009-09-05 21:47:34 +00002786 MagickBooleanType
2787 explicit_file,
cristy3ed852e2009-09-05 21:47:34 +00002788 explicit_retry,
dirkd4f05dd2013-09-26 01:22:44 +00002789 polarity,
2790 sequence,
2791 use_explicit;
cristy3ed852e2009-09-05 21:47:34 +00002792
2793 MagickOffsetType
2794 offset;
2795
2796 Quantum
2797 *scale;
2798
cristybb503372010-05-27 20:51:26 +00002799 register ssize_t
cristy3ed852e2009-09-05 21:47:34 +00002800 i,
2801 x;
2802
cristy4c08aed2011-07-01 19:47:50 +00002803 register Quantum
cristy3ed852e2009-09-05 21:47:34 +00002804 *q;
2805
2806 register unsigned char
2807 *p;
2808
cristy3ed852e2009-09-05 21:47:34 +00002809 size_t
cristy3ed852e2009-09-05 21:47:34 +00002810 bits_allocated,
2811 bytes_per_pixel,
cristy68931bc2010-03-19 17:11:43 +00002812 colors,
cristyd483c462011-04-27 01:24:58 +00002813 depth,
cristy3ed852e2009-09-05 21:47:34 +00002814 height,
cristy5a15b932011-03-26 12:50:33 +00002815 length,
cristy3ed852e2009-09-05 21:47:34 +00002816 mask,
2817 max_value,
cristy3ed852e2009-09-05 21:47:34 +00002818 number_scenes,
2819 quantum,
2820 samples_per_pixel,
2821 signed_data,
2822 significant_bits,
2823 status,
2824 width,
2825 window_width;
2826
cristy1b80ae32011-03-26 23:38:55 +00002827 ssize_t
cristy4e82e512011-04-24 01:33:42 +00002828 count,
dirk47fc2832015-11-24 21:18:34 +01002829 rescale_intercept,
2830 rescale_slope,
cristy4e82e512011-04-24 01:33:42 +00002831 scene,
2832 window_center,
2833 y;
2834
cristy5a15b932011-03-26 12:50:33 +00002835 unsigned char
2836 *data;
2837
dirka3cfb502014-11-01 12:17:29 +00002838 unsigned short
2839 group,
2840 element;
2841
cristy3ed852e2009-09-05 21:47:34 +00002842 /*
2843 Open image file.
2844 */
2845 assert(image_info != (const ImageInfo *) NULL);
cristye1c94d92015-06-28 12:16:33 +00002846 assert(image_info->signature == MagickCoreSignature);
cristy3ed852e2009-09-05 21:47:34 +00002847 if (image_info->debug != MagickFalse)
2848 (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
2849 image_info->filename);
2850 assert(exception != (ExceptionInfo *) NULL);
cristye1c94d92015-06-28 12:16:33 +00002851 assert(exception->signature == MagickCoreSignature);
cristy9950d572011-10-01 18:22:35 +00002852 image=AcquireImage(image_info,exception);
cristy3ed852e2009-09-05 21:47:34 +00002853 status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception);
2854 if (status == MagickFalse)
2855 {
2856 image=DestroyImageList(image);
2857 return((Image *) NULL);
2858 }
2859 image->depth=8UL;
dirka3cfb502014-11-01 12:17:29 +00002860 image->endian=LSBEndian;
cristy3ed852e2009-09-05 21:47:34 +00002861 /*
2862 Read DCM preamble.
2863 */
cristy73bd4a52010-10-05 11:24:23 +00002864 stream_info=(DCMStreamInfo *) AcquireMagickMemory(sizeof(*stream_info));
cristybc98a282009-10-09 17:52:22 +00002865 if (stream_info == (DCMStreamInfo *) NULL)
2866 ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
2867 (void) ResetMagickMemory(stream_info,0,sizeof(*stream_info));
cristy3ed852e2009-09-05 21:47:34 +00002868 count=ReadBlob(image,128,(unsigned char *) magick);
2869 if (count != 128)
2870 ThrowReaderException(CorruptImageError,"ImproperImageHeader");
2871 count=ReadBlob(image,4,(unsigned char *) magick);
2872 if ((count != 4) || (LocaleNCompare(magick,"DICM",4) != 0))
2873 {
2874 offset=SeekBlob(image,0L,SEEK_SET);
2875 if (offset < 0)
2876 ThrowReaderException(CorruptImageError,"ImproperImageHeader");
2877 }
2878 /*
2879 Read DCM Medical image.
2880 */
cristy151b66d2015-04-15 10:50:31 +00002881 (void) CopyMagickString(photometric,"MONOCHROME1 ",MagickPathExtent);
cristy3ed852e2009-09-05 21:47:34 +00002882 bits_allocated=8;
2883 bytes_per_pixel=1;
cristy3ed852e2009-09-05 21:47:34 +00002884 polarity=MagickFalse;
2885 data=(unsigned char *) NULL;
cristyd483c462011-04-27 01:24:58 +00002886 depth=8;
cristy3ed852e2009-09-05 21:47:34 +00002887 element=0;
2888 explicit_vr[2]='\0';
2889 explicit_file=MagickFalse;
cristy68931bc2010-03-19 17:11:43 +00002890 colors=0;
2891 redmap=(int *) NULL;
2892 greenmap=(int *) NULL;
2893 bluemap=(int *) NULL;
cristybc98a282009-10-09 17:52:22 +00002894 graymap=(int *) NULL;
cristy3ed852e2009-09-05 21:47:34 +00002895 height=0;
2896 max_value=255UL;
2897 mask=0xffff;
2898 number_scenes=1;
dirk47fc2832015-11-24 21:18:34 +01002899 rescale_intercept=0;
2900 rescale_slope=1;
cristy3ed852e2009-09-05 21:47:34 +00002901 samples_per_pixel=1;
2902 scale=(Quantum *) NULL;
dirkd4f05dd2013-09-26 01:22:44 +00002903 sequence=MagickFalse;
cristy3ed852e2009-09-05 21:47:34 +00002904 signed_data=(~0UL);
2905 significant_bits=0;
cristy3ed852e2009-09-05 21:47:34 +00002906 use_explicit=MagickFalse;
2907 explicit_retry = MagickFalse;
2908 width=0;
2909 window_center=0;
2910 window_width=0;
cristy5ec25e22013-09-26 12:21:43 +00002911 for (group=0; (group != 0x7FE0) || (element != 0x0010) ||
dirkd4f05dd2013-09-26 01:22:44 +00002912 (sequence != MagickFalse); )
cristy3ed852e2009-09-05 21:47:34 +00002913 {
2914 /*
2915 Read a group.
2916 */
cristybb503372010-05-27 20:51:26 +00002917 image->offset=(ssize_t) TellBlob(image);
dirka3cfb502014-11-01 12:17:29 +00002918 group=ReadBlobLSBShort(image);
2919 element=ReadBlobLSBShort(image);
2920 if ((group != 0x0002) && (image->endian == MSBEndian))
cristyba18d462014-11-02 00:28:12 +00002921 {
2922 group=(unsigned short) ((group << 8) | ((group >> 8) & 0xFF));
2923 element=(unsigned short) ((element << 8) | ((element >> 8) & 0xFF));
2924 }
cristy3ed852e2009-09-05 21:47:34 +00002925 quantum=0;
2926 /*
2927 Find corresponding VR for this group and element.
2928 */
2929 for (i=0; dicom_info[i].group < 0xffff; i++)
cristyba18d462014-11-02 00:28:12 +00002930 if ((group == dicom_info[i].group) && (element == dicom_info[i].element))
cristy3ed852e2009-09-05 21:47:34 +00002931 break;
cristy151b66d2015-04-15 10:50:31 +00002932 (void) CopyMagickString(implicit_vr,dicom_info[i].vr,MagickPathExtent);
cristy3ed852e2009-09-05 21:47:34 +00002933 count=ReadBlob(image,2,(unsigned char *) explicit_vr);
dirka3cfb502014-11-01 12:17:29 +00002934 if (count != 2)
2935 ThrowReaderException(CorruptImageError,"ImproperImageHeader");
cristy3ed852e2009-09-05 21:47:34 +00002936 /*
2937 Check for "explicitness", but meta-file headers always explicit.
2938 */
2939 if ((explicit_file == MagickFalse) && (group != 0x0002))
dirkd4f05dd2013-09-26 01:22:44 +00002940 explicit_file=(isupper((unsigned char) *explicit_vr) != MagickFalse) &&
2941 (isupper((unsigned char) *(explicit_vr+1)) != MagickFalse) ?
2942 MagickTrue : MagickFalse;
cristy3ed852e2009-09-05 21:47:34 +00002943 use_explicit=((group == 0x0002) && (explicit_retry == MagickFalse)) ||
2944 (explicit_file != MagickFalse) ? MagickTrue : MagickFalse;
cristyc500f082015-02-24 12:37:43 +00002945 if ((use_explicit != MagickFalse) && (strncmp(implicit_vr,"xs",2) == 0))
cristy151b66d2015-04-15 10:50:31 +00002946 (void) CopyMagickString(implicit_vr,explicit_vr,MagickPathExtent);
cristyc500f082015-02-24 12:37:43 +00002947 if ((use_explicit == MagickFalse) || (strncmp(implicit_vr,"!!",2) == 0))
cristy3ed852e2009-09-05 21:47:34 +00002948 {
2949 offset=SeekBlob(image,(MagickOffsetType) -2,SEEK_CUR);
2950 if (offset < 0)
2951 ThrowReaderException(CorruptImageError,"ImproperImageHeader");
2952 quantum=4;
2953 }
2954 else
2955 {
2956 /*
2957 Assume explicit type.
2958 */
2959 quantum=2;
cristyc500f082015-02-24 12:37:43 +00002960 if ((strncmp(explicit_vr,"OB",2) == 0) ||
2961 (strncmp(explicit_vr,"UN",2) == 0) ||
2962 (strncmp(explicit_vr,"OW",2) == 0) ||
2963 (strncmp(explicit_vr,"SQ",2) == 0))
cristy3ed852e2009-09-05 21:47:34 +00002964 {
2965 (void) ReadBlobLSBShort(image);
2966 quantum=4;
2967 }
2968 }
2969 datum=0;
2970 if (quantum == 4)
dirka3cfb502014-11-01 12:17:29 +00002971 {
2972 if (group == 0x0002)
2973 datum=(int) ReadBlobLSBLong(image);
2974 else
2975 datum=(int) ReadBlobLong(image);
2976 }
cristy3ed852e2009-09-05 21:47:34 +00002977 else
2978 if (quantum == 2)
dirka3cfb502014-11-01 12:17:29 +00002979 {
2980 if (group == 0x0002)
2981 datum=(int) ReadBlobLSBShort(image);
2982 else
2983 datum=(int) ReadBlobShort(image);
2984 }
cristy3ed852e2009-09-05 21:47:34 +00002985 quantum=0;
2986 length=1;
2987 if (datum != 0)
2988 {
cristyc500f082015-02-24 12:37:43 +00002989 if ((strncmp(implicit_vr,"SS",2) == 0) ||
2990 (strncmp(implicit_vr,"US",2) == 0))
cristy3ed852e2009-09-05 21:47:34 +00002991 quantum=2;
2992 else
cristyc500f082015-02-24 12:37:43 +00002993 if ((strncmp(implicit_vr,"UL",2) == 0) ||
2994 (strncmp(implicit_vr,"SL",2) == 0) ||
2995 (strncmp(implicit_vr,"FL",2) == 0))
cristy3ed852e2009-09-05 21:47:34 +00002996 quantum=4;
2997 else
cristyc500f082015-02-24 12:37:43 +00002998 if (strncmp(implicit_vr,"FD",2) != 0)
cristy3ed852e2009-09-05 21:47:34 +00002999 quantum=1;
3000 else
3001 quantum=8;
cristy735e8942010-04-02 20:32:57 +00003002 if (datum != ~0)
cristy3ed852e2009-09-05 21:47:34 +00003003 length=(size_t) datum/quantum;
3004 else
3005 {
3006 /*
3007 Sequence and item of undefined length.
3008 */
3009 quantum=0;
3010 length=0;
3011 }
3012 }
3013 if (image_info->verbose != MagickFalse)
3014 {
3015 /*
3016 Display Dicom info.
3017 */
3018 if (use_explicit == MagickFalse)
3019 explicit_vr[0]='\0';
3020 for (i=0; dicom_info[i].description != (char *) NULL; i++)
dirka3cfb502014-11-01 12:17:29 +00003021 if ((group == dicom_info[i].group) &&
3022 (element == dicom_info[i].element))
cristy3ed852e2009-09-05 21:47:34 +00003023 break;
cristyb51dff52011-05-19 16:55:47 +00003024 (void) FormatLocaleFile(stdout,"0x%04lX %4ld %s-%s (0x%04lx,0x%04lx)",
cristyba18d462014-11-02 00:28:12 +00003025 (unsigned long) image->offset,(long) length,implicit_vr,explicit_vr,
3026 (unsigned long) group,(unsigned long) element);
cristy3ed852e2009-09-05 21:47:34 +00003027 if (dicom_info[i].description != (char *) NULL)
cristyb51dff52011-05-19 16:55:47 +00003028 (void) FormatLocaleFile(stdout," %s",dicom_info[i].description);
3029 (void) FormatLocaleFile(stdout,": ");
cristy3ed852e2009-09-05 21:47:34 +00003030 }
dirkd4f05dd2013-09-26 01:22:44 +00003031 if ((sequence == MagickFalse) && (group == 0x7FE0) && (element == 0x0010))
cristy3ed852e2009-09-05 21:47:34 +00003032 {
3033 if (image_info->verbose != MagickFalse)
cristyb51dff52011-05-19 16:55:47 +00003034 (void) FormatLocaleFile(stdout,"\n");
cristy3ed852e2009-09-05 21:47:34 +00003035 break;
3036 }
3037 /*
3038 Allocate space and read an array.
3039 */
3040 data=(unsigned char *) NULL;
3041 if ((length == 1) && (quantum == 1))
cristyebc62bd2010-03-31 20:24:46 +00003042 datum=(int) ReadBlobByte(image);
cristy3ed852e2009-09-05 21:47:34 +00003043 else
3044 if ((length == 1) && (quantum == 2))
dirka3cfb502014-11-01 12:17:29 +00003045 {
3046 if (group == 0x0002)
3047 datum=(int) ReadBlobLSBShort(image);
3048 else
3049 datum=(int) ReadBlobShort(image);
3050 }
cristy3ed852e2009-09-05 21:47:34 +00003051 else
3052 if ((length == 1) && (quantum == 4))
dirka3cfb502014-11-01 12:17:29 +00003053 {
3054 if (group == 0x0002)
3055 datum=(int) ReadBlobLSBLong(image);
3056 else
3057 datum=(int) ReadBlobLong(image);
3058 }
cristy3ed852e2009-09-05 21:47:34 +00003059 else
3060 if ((quantum != 0) && (length != 0))
3061 {
cristy3ed852e2009-09-05 21:47:34 +00003062 if (~length >= 1)
3063 data=(unsigned char *) AcquireQuantumMemory(length+1,quantum*
3064 sizeof(*data));
3065 if (data == (unsigned char *) NULL)
3066 ThrowReaderException(ResourceLimitError,
3067 "MemoryAllocationFailed");
3068 count=ReadBlob(image,(size_t) quantum*length,data);
3069 if (count != (ssize_t) (quantum*length))
3070 {
dirke908c392014-10-25 11:33:36 +00003071 if (image_info->verbose != MagickFalse)
3072 (void) FormatLocaleFile(stdout,"count=%d quantum=%d "
3073 "length=%d group=%d\n",(int) count,(int) quantum,(int)
3074 length,(int) group);
cristy3ed852e2009-09-05 21:47:34 +00003075 ThrowReaderException(CorruptImageError,
3076 "InsufficientImageDataInFile");
3077 }
3078 data[length*quantum]='\0';
cristy5ec25e22013-09-26 12:21:43 +00003079 }
3080 else
cristyc2149c62014-01-29 19:36:59 +00003081 if ((unsigned int) datum == 0xFFFFFFFFU)
cristy5ec25e22013-09-26 12:21:43 +00003082 {
3083 sequence=MagickTrue;
3084 continue;
3085 }
3086
cristy0a2af032014-11-02 14:46:24 +00003087 if ((unsigned int) ((group << 16) | element) == 0xFFFEE0DD)
cristy5ec25e22013-09-26 12:21:43 +00003088 {
dirka3cfb502014-11-01 12:17:29 +00003089 if (data != (unsigned char *) NULL)
3090 data=(unsigned char *) RelinquishMagickMemory(data);
cristy5ec25e22013-09-26 12:21:43 +00003091 sequence=MagickFalse;
3092 continue;
3093 }
3094
cristycd8b3312013-12-22 01:51:11 +00003095 if (sequence != MagickFalse)
dirka3cfb502014-11-01 12:17:29 +00003096 {
3097 if (data != (unsigned char *) NULL)
3098 data=(unsigned char *) RelinquishMagickMemory(data);
3099 continue;
3100 }
dirkd4f05dd2013-09-26 01:22:44 +00003101
cristy3ed852e2009-09-05 21:47:34 +00003102 switch (group)
3103 {
3104 case 0x0002:
3105 {
3106 switch (element)
3107 {
3108 case 0x0010:
3109 {
cristy2cc39842009-10-10 20:04:02 +00003110 char
cristy151b66d2015-04-15 10:50:31 +00003111 transfer_syntax[MagickPathExtent];
cristy2cc39842009-10-10 20:04:02 +00003112
cristy3ed852e2009-09-05 21:47:34 +00003113 /*
3114 Transfer Syntax.
3115 */
cristy3ed852e2009-09-05 21:47:34 +00003116 if ((datum == 0) && (explicit_retry == MagickFalse))
3117 {
3118 explicit_retry=MagickTrue;
3119 (void) SeekBlob(image,(MagickOffsetType) 0,SEEK_SET);
3120 group=0;
3121 element=0;
3122 if (image_info->verbose != MagickFalse)
cristyb51dff52011-05-19 16:55:47 +00003123 (void) FormatLocaleFile(stdout,
cristy3ed852e2009-09-05 21:47:34 +00003124 "Corrupted image - trying explicit format\n");
3125 break;
3126 }
cristy2cc39842009-10-10 20:04:02 +00003127 *transfer_syntax='\0';
cristy3ed852e2009-09-05 21:47:34 +00003128 if (data != (unsigned char *) NULL)
3129 (void) CopyMagickString(transfer_syntax,(char *) data,
cristy151b66d2015-04-15 10:50:31 +00003130 MagickPathExtent);
cristy2cc39842009-10-10 20:04:02 +00003131 if (image_info->verbose != MagickFalse)
cristy1e604812011-05-19 18:07:50 +00003132 (void) FormatLocaleFile(stdout,"transfer_syntax=%s\n",
cristyba18d462014-11-02 00:28:12 +00003133 (const char *) transfer_syntax);
cristy2cc39842009-10-10 20:04:02 +00003134 if (strncmp(transfer_syntax,"1.2.840.10008.1.2",17) == 0)
3135 {
3136 int
cristyf9789822015-03-29 01:28:52 +00003137 count,
cristy2cc39842009-10-10 20:04:02 +00003138 subtype,
3139 type;
3140
dirkbb0bb412015-11-09 20:22:15 +01003141 type=1;
cristy2cc39842009-10-10 20:04:02 +00003142 subtype=0;
dirkbb0bb412015-11-09 20:22:15 +01003143 if (strlen(transfer_syntax) > 17)
3144 {
3145 count=sscanf(transfer_syntax+17,".%d.%d",&type,&subtype);
3146 if (count < 1)
3147 ThrowReaderException(CorruptImageError,
3148 "ImproperImageHeader");
3149 }
cristy2cc39842009-10-10 20:04:02 +00003150 switch (type)
3151 {
3152 case 1:
3153 {
3154 image->endian=LSBEndian;
3155 break;
3156 }
3157 case 2:
3158 {
3159 image->endian=MSBEndian;
3160 break;
3161 }
3162 case 4:
3163 {
3164 if ((subtype >= 80) && (subtype <= 81))
3165 image->compression=JPEGCompression;
3166 else
3167 if ((subtype >= 90) && (subtype <= 93))
3168 image->compression=JPEG2000Compression;
3169 else
3170 image->compression=JPEGCompression;
3171 break;
3172 }
3173 case 5:
3174 {
3175 image->compression=RLECompression;
3176 break;
3177 }
3178 }
3179 }
cristy3ed852e2009-09-05 21:47:34 +00003180 break;
3181 }
3182 default:
3183 break;
3184 }
3185 break;
3186 }
3187 case 0x0028:
3188 {
3189 switch (element)
3190 {
3191 case 0x0002:
3192 {
3193 /*
3194 Samples per pixel.
3195 */
cristyba18d462014-11-02 00:28:12 +00003196 samples_per_pixel=(size_t) datum;
cristy3ed852e2009-09-05 21:47:34 +00003197 break;
3198 }
3199 case 0x0004:
3200 {
3201 /*
3202 Photometric interpretation.
3203 */
cristy151b66d2015-04-15 10:50:31 +00003204 for (i=0; i < (ssize_t) MagickMin(length,MagickPathExtent-1); i++)
cristy3ed852e2009-09-05 21:47:34 +00003205 photometric[i]=(char) data[i];
3206 photometric[i]='\0';
3207 polarity=LocaleCompare(photometric,"MONOCHROME1 ") == 0 ?
3208 MagickTrue : MagickFalse;
3209 break;
3210 }
3211 case 0x0006:
3212 {
3213 /*
3214 Planar configuration.
3215 */
3216 if (datum == 1)
3217 image->interlace=PlaneInterlace;
3218 break;
3219 }
3220 case 0x0008:
3221 {
3222 /*
3223 Number of frames.
3224 */
cristye27293e2009-12-18 02:53:20 +00003225 number_scenes=StringToUnsignedLong((char *) data);
cristy3ed852e2009-09-05 21:47:34 +00003226 break;
3227 }
3228 case 0x0010:
3229 {
3230 /*
3231 Image rows.
3232 */
cristyba18d462014-11-02 00:28:12 +00003233 height=(size_t) datum;
cristy3ed852e2009-09-05 21:47:34 +00003234 break;
3235 }
3236 case 0x0011:
3237 {
3238 /*
3239 Image columns.
3240 */
cristyba18d462014-11-02 00:28:12 +00003241 width=(size_t) datum;
cristy3ed852e2009-09-05 21:47:34 +00003242 break;
3243 }
3244 case 0x0100:
3245 {
3246 /*
3247 Bits allocated.
3248 */
cristyba18d462014-11-02 00:28:12 +00003249 bits_allocated=(size_t) datum;
cristy3ed852e2009-09-05 21:47:34 +00003250 bytes_per_pixel=1;
3251 if (datum > 8)
3252 bytes_per_pixel=2;
cristyd483c462011-04-27 01:24:58 +00003253 depth=bits_allocated;
3254 if (depth > 32)
cristy3ed852e2009-09-05 21:47:34 +00003255 ThrowReaderException(CorruptImageError,"ImproperImageHeader");
3256 max_value=(1UL << bits_allocated)-1;
3257 break;
3258 }
3259 case 0x0101:
3260 {
3261 /*
3262 Bits stored.
3263 */
cristyba18d462014-11-02 00:28:12 +00003264 significant_bits=(size_t) datum;
cristy3ed852e2009-09-05 21:47:34 +00003265 bytes_per_pixel=1;
3266 if (significant_bits > 8)
3267 bytes_per_pixel=2;
cristyd483c462011-04-27 01:24:58 +00003268 depth=significant_bits;
3269 if (depth > 32)
cristy3ed852e2009-09-05 21:47:34 +00003270 ThrowReaderException(CorruptImageError,"ImproperImageHeader");
3271 max_value=(1UL << significant_bits)-1;
cristybb503372010-05-27 20:51:26 +00003272 mask=(size_t) GetQuantumRange(significant_bits);
cristy3ed852e2009-09-05 21:47:34 +00003273 break;
3274 }
3275 case 0x0102:
3276 {
3277 /*
3278 High bit.
3279 */
3280 break;
3281 }
3282 case 0x0103:
3283 {
3284 /*
3285 Pixel representation.
3286 */
cristyba18d462014-11-02 00:28:12 +00003287 signed_data=(size_t) datum;
cristy3ed852e2009-09-05 21:47:34 +00003288 break;
3289 }
3290 case 0x1050:
3291 {
3292 /*
3293 Visible pixel range: center.
3294 */
cristyca288092011-04-26 11:27:02 +00003295 if (data != (unsigned char *) NULL)
cristyba18d462014-11-02 00:28:12 +00003296 window_center=(ssize_t) StringToLong((char *) data);
cristy3ed852e2009-09-05 21:47:34 +00003297 break;
3298 }
3299 case 0x1051:
3300 {
3301 /*
3302 Visible pixel range: width.
3303 */
cristyca288092011-04-26 11:27:02 +00003304 if (data != (unsigned char *) NULL)
3305 window_width=StringToUnsignedLong((char *) data);
cristy3ed852e2009-09-05 21:47:34 +00003306 break;
3307 }
dirk47fc2832015-11-24 21:18:34 +01003308 case 0x1052:
3309 {
3310 /*
3311 Rescale intercept
3312 */
3313 if (data != (unsigned char *) NULL)
3314 rescale_intercept=(ssize_t) StringToLong((char *) data);
3315 break;
3316 }
3317 case 0x1053:
3318 {
3319 /*
3320 Rescale slope
3321 */
3322 if (data != (unsigned char *) NULL)
3323 rescale_slope=(ssize_t) StringToLong((char *) data);
3324 break;
3325 }
cristy3ed852e2009-09-05 21:47:34 +00003326 case 0x1200:
3327 case 0x3006:
3328 {
cristy3ed852e2009-09-05 21:47:34 +00003329 /*
cristy68931bc2010-03-19 17:11:43 +00003330 Populate graymap.
cristy3ed852e2009-09-05 21:47:34 +00003331 */
3332 if (data == (unsigned char *) NULL)
3333 break;
cristybb503372010-05-27 20:51:26 +00003334 colors=(size_t) (length/bytes_per_pixel);
cristyeaedf062010-05-29 22:36:02 +00003335 datum=(int) colors;
cristybc98a282009-10-09 17:52:22 +00003336 graymap=(int *) AcquireQuantumMemory((size_t) colors,
cristy3ed852e2009-09-05 21:47:34 +00003337 sizeof(*graymap));
cristybc98a282009-10-09 17:52:22 +00003338 if (graymap == (int *) NULL)
3339 ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
cristybb503372010-05-27 20:51:26 +00003340 for (i=0; i < (ssize_t) colors; i++)
cristy3ed852e2009-09-05 21:47:34 +00003341 if (bytes_per_pixel == 1)
cristybc98a282009-10-09 17:52:22 +00003342 graymap[i]=(int) data[i];
cristy3ed852e2009-09-05 21:47:34 +00003343 else
cristybc98a282009-10-09 17:52:22 +00003344 graymap[i]=(int) ((short *) data)[i];
cristy3ed852e2009-09-05 21:47:34 +00003345 break;
3346 }
3347 case 0x1201:
cristy3ed852e2009-09-05 21:47:34 +00003348 {
cristy3ed852e2009-09-05 21:47:34 +00003349 unsigned short
3350 index;
3351
3352 /*
cristy68931bc2010-03-19 17:11:43 +00003353 Populate redmap.
cristy3ed852e2009-09-05 21:47:34 +00003354 */
cristy68931bc2010-03-19 17:11:43 +00003355 if (data == (unsigned char *) NULL)
3356 break;
cristybb503372010-05-27 20:51:26 +00003357 colors=(size_t) (length/2);
cristyeaedf062010-05-29 22:36:02 +00003358 datum=(int) colors;
cristy68931bc2010-03-19 17:11:43 +00003359 redmap=(int *) AcquireQuantumMemory((size_t) colors,
3360 sizeof(*redmap));
3361 if (redmap == (int *) NULL)
3362 ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
cristy3ed852e2009-09-05 21:47:34 +00003363 p=data;
cristybb503372010-05-27 20:51:26 +00003364 for (i=0; i < (ssize_t) colors; i++)
cristy3ed852e2009-09-05 21:47:34 +00003365 {
cristy85f5e932012-11-14 18:45:23 +00003366 if (image->endian == MSBEndian)
cristyfcb4db12010-03-19 01:34:36 +00003367 index=(unsigned short) ((*p << 8) | *(p+1));
3368 else
3369 index=(unsigned short) (*p | (*(p+1) << 8));
cristy68931bc2010-03-19 17:11:43 +00003370 redmap[i]=(int) index;
3371 p+=2;
3372 }
3373 break;
3374 }
3375 case 0x1202:
3376 {
3377 unsigned short
3378 index;
3379
3380 /*
3381 Populate greenmap.
3382 */
3383 if (data == (unsigned char *) NULL)
3384 break;
cristybb503372010-05-27 20:51:26 +00003385 colors=(size_t) (length/2);
cristyeaedf062010-05-29 22:36:02 +00003386 datum=(int) colors;
cristy68931bc2010-03-19 17:11:43 +00003387 greenmap=(int *) AcquireQuantumMemory((size_t) colors,
3388 sizeof(*greenmap));
3389 if (greenmap == (int *) NULL)
3390 ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
3391 p=data;
cristybb503372010-05-27 20:51:26 +00003392 for (i=0; i < (ssize_t) colors; i++)
cristy68931bc2010-03-19 17:11:43 +00003393 {
cristy85f5e932012-11-14 18:45:23 +00003394 if (image->endian == MSBEndian)
cristy68931bc2010-03-19 17:11:43 +00003395 index=(unsigned short) ((*p << 8) | *(p+1));
3396 else
3397 index=(unsigned short) (*p | (*(p+1) << 8));
3398 greenmap[i]=(int) index;
3399 p+=2;
3400 }
3401 break;
3402 }
3403 case 0x1203:
3404 {
3405 unsigned short
3406 index;
3407
3408 /*
3409 Populate bluemap.
3410 */
3411 if (data == (unsigned char *) NULL)
3412 break;
cristybb503372010-05-27 20:51:26 +00003413 colors=(size_t) (length/2);
cristyeaedf062010-05-29 22:36:02 +00003414 datum=(int) colors;
cristy68931bc2010-03-19 17:11:43 +00003415 bluemap=(int *) AcquireQuantumMemory((size_t) colors,
3416 sizeof(*bluemap));
3417 if (bluemap == (int *) NULL)
3418 ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
3419 p=data;
cristybb503372010-05-27 20:51:26 +00003420 for (i=0; i < (ssize_t) colors; i++)
cristy68931bc2010-03-19 17:11:43 +00003421 {
cristy85f5e932012-11-14 18:45:23 +00003422 if (image->endian == MSBEndian)
cristyba18d462014-11-02 00:28:12 +00003423 index=(unsigned short) ((*p << 8) | *(p+1));
3424 else
cristy68931bc2010-03-19 17:11:43 +00003425 index=(unsigned short) (*p | (*(p+1) << 8));
3426 bluemap[i]=(int) index;
cristy3ed852e2009-09-05 21:47:34 +00003427 p+=2;
3428 }
3429 break;
3430 }
cristy690590f2013-09-25 10:29:38 +00003431 default:
cristy690590f2013-09-25 10:29:38 +00003432 break;
cristy3ed852e2009-09-05 21:47:34 +00003433 }
3434 break;
3435 }
3436 case 0x2050:
3437 {
3438 switch (element)
3439 {
3440 case 0x0020:
3441 {
3442 if ((data != (unsigned char *) NULL) &&
cristyc500f082015-02-24 12:37:43 +00003443 (strncmp((char *) data,"INVERSE",7) == 0))
cristy3ed852e2009-09-05 21:47:34 +00003444 polarity=MagickTrue;
3445 break;
3446 }
3447 default:
3448 break;
3449 }
3450 break;
3451 }
3452 default:
3453 break;
3454 }
3455 if (data != (unsigned char *) NULL)
3456 {
3457 char
3458 *attribute;
3459
3460 for (i=0; dicom_info[i].description != (char *) NULL; i++)
dirka3cfb502014-11-01 12:17:29 +00003461 if ((group == dicom_info[i].group) &&
3462 (element == dicom_info[i].element))
cristy3ed852e2009-09-05 21:47:34 +00003463 break;
dirk75aa9802014-10-25 12:30:45 +00003464 if (dicom_info[i].description != (char *) NULL)
cristy3ed852e2009-09-05 21:47:34 +00003465 {
dirk75aa9802014-10-25 12:30:45 +00003466 attribute=AcquireString("dcm:");
3467 (void) ConcatenateString(&attribute,dicom_info[i].description);
3468 for (i=0; i < (ssize_t) MagickMax(length,4); i++)
3469 if (isprint((int) data[i]) == MagickFalse)
3470 break;
3471 if ((i == (ssize_t) length) || (length > 4))
3472 {
3473 (void) SubstituteString(&attribute," ","");
3474 (void) SetImageProperty(image,attribute,(char *) data,exception);
3475 }
3476 attribute=DestroyString(attribute);
cristy3ed852e2009-09-05 21:47:34 +00003477 }
cristy3ed852e2009-09-05 21:47:34 +00003478 }
3479 if (image_info->verbose != MagickFalse)
3480 {
3481 if (data == (unsigned char *) NULL)
cristyb51dff52011-05-19 16:55:47 +00003482 (void) FormatLocaleFile(stdout,"%d\n",datum);
cristy3ed852e2009-09-05 21:47:34 +00003483 else
3484 {
3485 /*
3486 Display group data.
3487 */
cristybb503372010-05-27 20:51:26 +00003488 for (i=0; i < (ssize_t) MagickMax(length,4); i++)
cristy3ed852e2009-09-05 21:47:34 +00003489 if (isprint((int) data[i]) == MagickFalse)
3490 break;
cristybb503372010-05-27 20:51:26 +00003491 if ((i != (ssize_t) length) && (length <= 4))
cristy3ed852e2009-09-05 21:47:34 +00003492 {
cristybb503372010-05-27 20:51:26 +00003493 ssize_t
cristy3ed852e2009-09-05 21:47:34 +00003494 j;
3495
3496 datum=0;
cristybb503372010-05-27 20:51:26 +00003497 for (j=(ssize_t) length-1; j >= 0; j--)
cristy3ed852e2009-09-05 21:47:34 +00003498 datum=(256*datum+data[j]);
cristyb51dff52011-05-19 16:55:47 +00003499 (void) FormatLocaleFile(stdout,"%d",datum);
cristy3ed852e2009-09-05 21:47:34 +00003500 }
3501 else
cristybb503372010-05-27 20:51:26 +00003502 for (i=0; i < (ssize_t) length; i++)
cristy3ed852e2009-09-05 21:47:34 +00003503 if (isprint((int) data[i]) != MagickFalse)
cristyb51dff52011-05-19 16:55:47 +00003504 (void) FormatLocaleFile(stdout,"%c",data[i]);
cristy3ed852e2009-09-05 21:47:34 +00003505 else
cristyb51dff52011-05-19 16:55:47 +00003506 (void) FormatLocaleFile(stdout,"%c",'.');
3507 (void) FormatLocaleFile(stdout,"\n");
cristy3ed852e2009-09-05 21:47:34 +00003508 }
3509 }
cristy107abe62010-03-19 00:29:27 +00003510 if (data != (unsigned char *) NULL)
3511 data=(unsigned char *) RelinquishMagickMemory(data);
cristy3ed852e2009-09-05 21:47:34 +00003512 if (EOFBlob(image) != MagickFalse)
3513 {
3514 ThrowFileException(exception,CorruptImageError,"UnexpectedEndOfFile",
3515 image->filename);
3516 break;
3517 }
3518 }
3519 if ((width == 0) || (height == 0))
3520 ThrowReaderException(CorruptImageError,"ImproperImageHeader");
cristybb503372010-05-27 20:51:26 +00003521 image->columns=(size_t) width;
3522 image->rows=(size_t) height;
cristy3ed852e2009-09-05 21:47:34 +00003523 if (signed_data == 0xffff)
cristybb503372010-05-27 20:51:26 +00003524 signed_data=(size_t) (significant_bits == 16 ? 1 : 0);
cristy2cc39842009-10-10 20:04:02 +00003525 if ((image->compression == JPEGCompression) ||
3526 (image->compression == JPEG2000Compression))
cristy3ed852e2009-09-05 21:47:34 +00003527 {
3528 Image
3529 *images;
3530
3531 ImageInfo
3532 *read_info;
3533
3534 int
3535 c;
3536
cristybc98a282009-10-09 17:52:22 +00003537 size_t
3538 length;
cristy3ed852e2009-09-05 21:47:34 +00003539
cristybc98a282009-10-09 17:52:22 +00003540 unsigned int
3541 tag;
3542
3543 /*
3544 Read offset table.
3545 */
cristybb503372010-05-27 20:51:26 +00003546 for (i=0; i < (ssize_t) stream_info->remaining; i++)
cristybc98a282009-10-09 17:52:22 +00003547 (void) ReadBlobByte(image);
3548 tag=(ReadBlobLSBShort(image) << 16) | ReadBlobLSBShort(image);
cristyda16f162011-02-19 23:52:17 +00003549 (void) tag;
cristybc98a282009-10-09 17:52:22 +00003550 length=(size_t) ReadBlobLSBLong(image);
3551 stream_info->offset_count=length >> 2;
3552 if (stream_info->offset_count != 0)
3553 {
3554 MagickOffsetType
3555 offset;
3556
3557 stream_info->offsets=(ssize_t *) AcquireQuantumMemory(
3558 stream_info->offset_count,sizeof(*stream_info->offsets));
3559 if (stream_info->offsets == (ssize_t *) NULL)
3560 ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
cristybb503372010-05-27 20:51:26 +00003561 for (i=0; i < (ssize_t) stream_info->offset_count; i++)
cristyba18d462014-11-02 00:28:12 +00003562 stream_info->offsets[i]=(ssize_t) ((int) ReadBlobLSBLong(image));
cristybc98a282009-10-09 17:52:22 +00003563 offset=TellBlob(image);
cristybb503372010-05-27 20:51:26 +00003564 for (i=0; i < (ssize_t) stream_info->offset_count; i++)
cristybc98a282009-10-09 17:52:22 +00003565 stream_info->offsets[i]+=offset;
3566 }
cristy3ed852e2009-09-05 21:47:34 +00003567 /*
cristy20d23c52009-10-10 02:46:57 +00003568 Handle non-native image formats.
cristy3ed852e2009-09-05 21:47:34 +00003569 */
3570 read_info=CloneImageInfo(image_info);
3571 SetImageInfoBlob(read_info,(void *) NULL,0);
cristybc98a282009-10-09 17:52:22 +00003572 images=NewImageList();
cristybb503372010-05-27 20:51:26 +00003573 for (scene=0; scene < (ssize_t) number_scenes; scene++)
cristy3ed852e2009-09-05 21:47:34 +00003574 {
3575 char
cristy151b66d2015-04-15 10:50:31 +00003576 filename[MagickPathExtent];
cristy3ed852e2009-09-05 21:47:34 +00003577
3578 const char
3579 *property;
3580
3581 FILE
3582 *file;
3583
cristybc98a282009-10-09 17:52:22 +00003584 Image
3585 *jpeg_image;
3586
cristy3ed852e2009-09-05 21:47:34 +00003587 int
3588 unique_file;
3589
cristybc98a282009-10-09 17:52:22 +00003590 unsigned int
3591 tag;
cristy3ed852e2009-09-05 21:47:34 +00003592
dirkce6b1222014-11-06 21:09:46 +00003593 tag=(ReadBlobLSBShort(image) << 16) | ReadBlobLSBShort(image);
3594 length=(size_t) ReadBlobLSBLong(image);
3595 if (tag == 0xFFFEE0DD)
3596 break; /* sequence delimiter tag */
3597 if (tag != 0xFFFEE000)
3598 ThrowReaderException(CorruptImageError,"ImproperImageHeader");
cristy3ed852e2009-09-05 21:47:34 +00003599 file=(FILE *) NULL;
3600 unique_file=AcquireUniqueFileResource(filename);
3601 if (unique_file != -1)
3602 file=fdopen(unique_file,"wb");
dirkce6b1222014-11-06 21:09:46 +00003603 if (file == (FILE *) NULL)
cristy3ed852e2009-09-05 21:47:34 +00003604 {
dirkce6b1222014-11-06 21:09:46 +00003605 (void) RelinquishUniqueFileResource(filename);
cristy3ed852e2009-09-05 21:47:34 +00003606 ThrowFileException(exception,FileOpenError,
3607 "UnableToCreateTemporaryFile",filename);
3608 break;
3609 }
cristybc98a282009-10-09 17:52:22 +00003610 for ( ; length != 0; length--)
cristy3ed852e2009-09-05 21:47:34 +00003611 {
cristybc98a282009-10-09 17:52:22 +00003612 c=ReadBlobByte(image);
3613 if (c == EOF)
dirkce6b1222014-11-06 21:09:46 +00003614 {
3615 ThrowFileException(exception,CorruptImageError,
3616 "UnexpectedEndOfFile",image->filename);
3617 break;
3618 }
cristy3ed852e2009-09-05 21:47:34 +00003619 (void) fputc(c,file);
cristy3ed852e2009-09-05 21:47:34 +00003620 }
3621 (void) fclose(file);
cristy151b66d2015-04-15 10:50:31 +00003622 (void) FormatLocaleString(read_info->filename,MagickPathExtent,
cristy3ed852e2009-09-05 21:47:34 +00003623 "jpeg:%s",filename);
cristy2cc39842009-10-10 20:04:02 +00003624 if (image->compression == JPEG2000Compression)
cristy151b66d2015-04-15 10:50:31 +00003625 (void) FormatLocaleString(read_info->filename,MagickPathExtent,
dirk94ec76a2014-01-27 20:24:30 +00003626 "j2k:%s",filename);
cristy3ed852e2009-09-05 21:47:34 +00003627 jpeg_image=ReadImage(read_info,exception);
3628 if (jpeg_image != (Image *) NULL)
3629 {
3630 ResetImagePropertyIterator(image);
3631 property=GetNextImageProperty(image);
3632 while (property != (const char *) NULL)
3633 {
3634 (void) SetImageProperty(jpeg_image,property,
cristyd15e6592011-10-15 00:13:06 +00003635 GetImageProperty(image,property,exception),exception);
cristy3ed852e2009-09-05 21:47:34 +00003636 property=GetNextImageProperty(image);
3637 }
3638 AppendImageToList(&images,jpeg_image);
3639 }
3640 (void) RelinquishUniqueFileResource(filename);
3641 }
3642 read_info=DestroyImageInfo(read_info);
3643 image=DestroyImage(image);
3644 return(GetFirstImageInList(images));
3645 }
cristyd483c462011-04-27 01:24:58 +00003646 if (depth != (1UL*MAGICKCORE_QUANTUM_DEPTH))
cristy3ed852e2009-09-05 21:47:34 +00003647 {
3648 QuantumAny
3649 range;
3650
3651 size_t
3652 length;
3653
3654 /*
3655 Compute pixel scaling table.
3656 */
cristyd483c462011-04-27 01:24:58 +00003657 length=(size_t) (GetQuantumRange(depth)+1);
cristy3ed852e2009-09-05 21:47:34 +00003658 scale=(Quantum *) AcquireQuantumMemory(length,sizeof(*scale));
3659 if (scale == (Quantum *) NULL)
3660 ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
cristyd483c462011-04-27 01:24:58 +00003661 range=GetQuantumRange(depth);
3662 for (i=0; i < (ssize_t) (GetQuantumRange(depth)+1); i++)
cristybb503372010-05-27 20:51:26 +00003663 scale[i]=ScaleAnyToQuantum((size_t) i,range);
cristy3ed852e2009-09-05 21:47:34 +00003664 }
cristybc98a282009-10-09 17:52:22 +00003665 if (image->compression == RLECompression)
3666 {
cristybc98a282009-10-09 17:52:22 +00003667 size_t
3668 length;
3669
cristy4e82e512011-04-24 01:33:42 +00003670 unsigned int
3671 tag;
3672
cristybc98a282009-10-09 17:52:22 +00003673 /*
3674 Read RLE offset table.
3675 */
cristybb503372010-05-27 20:51:26 +00003676 for (i=0; i < (ssize_t) stream_info->remaining; i++)
cristybc98a282009-10-09 17:52:22 +00003677 (void) ReadBlobByte(image);
3678 tag=(ReadBlobLSBShort(image) << 16) | ReadBlobLSBShort(image);
cristyda16f162011-02-19 23:52:17 +00003679 (void) tag;
cristybc98a282009-10-09 17:52:22 +00003680 length=(size_t) ReadBlobLSBLong(image);
3681 stream_info->offset_count=length >> 2;
3682 if (stream_info->offset_count != 0)
3683 {
3684 MagickOffsetType
3685 offset;
3686
3687 stream_info->offsets=(ssize_t *) AcquireQuantumMemory(
3688 stream_info->offset_count,sizeof(*stream_info->offsets));
3689 if (stream_info->offsets == (ssize_t *) NULL)
3690 ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
cristybb503372010-05-27 20:51:26 +00003691 for (i=0; i < (ssize_t) stream_info->offset_count; i++)
cristyba18d462014-11-02 00:28:12 +00003692 stream_info->offsets[i]=(ssize_t) ((int) ReadBlobLSBLong(image));
cristybc98a282009-10-09 17:52:22 +00003693 offset=TellBlob(image);
cristybb503372010-05-27 20:51:26 +00003694 for (i=0; i < (ssize_t) stream_info->offset_count; i++)
cristybc98a282009-10-09 17:52:22 +00003695 stream_info->offsets[i]+=offset;
3696 }
3697 }
cristybb503372010-05-27 20:51:26 +00003698 for (scene=0; scene < (ssize_t) number_scenes; scene++)
cristy3ed852e2009-09-05 21:47:34 +00003699 {
3700 if (image_info->ping != MagickFalse)
3701 break;
cristybb503372010-05-27 20:51:26 +00003702 image->columns=(size_t) width;
3703 image->rows=(size_t) height;
cristyd483c462011-04-27 01:24:58 +00003704 image->depth=depth;
cristyacabb842014-12-14 23:36:33 +00003705 status=SetImageExtent(image,image->columns,image->rows,exception);
3706 if (status == MagickFalse)
3707 break;
cristya865ccd2012-07-28 00:33:10 +00003708 image->colorspace=RGBColorspace;
cristy101ab702011-10-13 13:06:32 +00003709 if ((image->colormap == (PixelInfo *) NULL) && (samples_per_pixel == 1))
cristy68931bc2010-03-19 17:11:43 +00003710 {
cristyeaedf062010-05-29 22:36:02 +00003711 size_t
3712 one;
3713
3714 one=1;
cristy68931bc2010-03-19 17:11:43 +00003715 if (colors == 0)
cristyd483c462011-04-27 01:24:58 +00003716 colors=one << depth;
cristy187c7962011-09-08 12:32:45 +00003717 if (AcquireImageColormap(image,one << depth,exception) == MagickFalse)
cristy68931bc2010-03-19 17:11:43 +00003718 ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
3719 if (redmap != (int *) NULL)
cristybb503372010-05-27 20:51:26 +00003720 for (i=0; i < (ssize_t) colors; i++)
cristy68931bc2010-03-19 17:11:43 +00003721 {
3722 index=redmap[i];
3723 if ((scale != (Quantum *) NULL) && (index <= (int) max_value))
3724 index=(int) scale[index];
cristyba18d462014-11-02 00:28:12 +00003725 image->colormap[i].red=(MagickRealType) index;
cristy68931bc2010-03-19 17:11:43 +00003726 }
3727 if (greenmap != (int *) NULL)
cristybb503372010-05-27 20:51:26 +00003728 for (i=0; i < (ssize_t) colors; i++)
cristy68931bc2010-03-19 17:11:43 +00003729 {
3730 index=greenmap[i];
3731 if ((scale != (Quantum *) NULL) && (index <= (int) max_value))
3732 index=(int) scale[index];
cristyba18d462014-11-02 00:28:12 +00003733 image->colormap[i].green=(MagickRealType) index;
cristy68931bc2010-03-19 17:11:43 +00003734 }
3735 if (bluemap != (int *) NULL)
cristybb503372010-05-27 20:51:26 +00003736 for (i=0; i < (ssize_t) colors; i++)
cristy68931bc2010-03-19 17:11:43 +00003737 {
3738 index=bluemap[i];
3739 if ((scale != (Quantum *) NULL) && (index <= (int) max_value))
3740 index=(int) scale[index];
cristyba18d462014-11-02 00:28:12 +00003741 image->colormap[i].blue=(MagickRealType) index;
cristy68931bc2010-03-19 17:11:43 +00003742 }
3743 if (graymap != (int *) NULL)
cristybb503372010-05-27 20:51:26 +00003744 for (i=0; i < (ssize_t) colors; i++)
cristy68931bc2010-03-19 17:11:43 +00003745 {
3746 index=graymap[i];
3747 if ((scale != (Quantum *) NULL) && (index <= (int) max_value))
3748 index=(int) scale[index];
cristyba18d462014-11-02 00:28:12 +00003749 image->colormap[i].red=(MagickRealType) index;
3750 image->colormap[i].green=(MagickRealType) index;
3751 image->colormap[i].blue=(MagickRealType) index;
cristy68931bc2010-03-19 17:11:43 +00003752 }
3753 }
cristyd483c462011-04-27 01:24:58 +00003754 if (image->compression == RLECompression)
3755 {
3756 unsigned int
3757 tag;
3758
3759 /*
3760 Read RLE segment table.
3761 */
3762 for (i=0; i < (ssize_t) stream_info->remaining; i++)
3763 (void) ReadBlobByte(image);
3764 tag=(ReadBlobLSBShort(image) << 16) | ReadBlobLSBShort(image);
3765 stream_info->remaining=(size_t) ReadBlobLSBLong(image);
3766 if ((tag != 0xFFFEE000) || (stream_info->remaining <= 64) ||
cristycd8b3312013-12-22 01:51:11 +00003767 (EOFBlob(image) != MagickFalse))
cristyd483c462011-04-27 01:24:58 +00003768 ThrowReaderException(CorruptImageError,"ImproperImageHeader");
3769 stream_info->count=0;
3770 stream_info->segment_count=ReadBlobLSBLong(image);
3771 if (stream_info->segment_count > 1)
3772 {
3773 bytes_per_pixel=1;
3774 depth=8;
3775 }
3776 for (i=0; i < 15; i++)
cristyba18d462014-11-02 00:28:12 +00003777 stream_info->segments[i]=(ssize_t) ((int) ReadBlobLSBLong(image));
cristyd483c462011-04-27 01:24:58 +00003778 stream_info->remaining-=64;
3779 }
cristy3ed852e2009-09-05 21:47:34 +00003780 if ((samples_per_pixel > 1) && (image->interlace == PlaneInterlace))
3781 {
3782 /*
3783 Convert Planar RGB DCM Medical image to pixel packets.
3784 */
cristybb503372010-05-27 20:51:26 +00003785 for (i=0; i < (ssize_t) samples_per_pixel; i++)
cristy3ed852e2009-09-05 21:47:34 +00003786 {
cristybb503372010-05-27 20:51:26 +00003787 for (y=0; y < (ssize_t) image->rows; y++)
cristy3ed852e2009-09-05 21:47:34 +00003788 {
3789 q=GetAuthenticPixels(image,0,y,image->columns,1,exception);
cristyacd2ed22011-08-30 01:44:23 +00003790 if (q == (Quantum *) NULL)
cristy3ed852e2009-09-05 21:47:34 +00003791 break;
cristybb503372010-05-27 20:51:26 +00003792 for (x=0; x < (ssize_t) image->columns; x++)
cristy3ed852e2009-09-05 21:47:34 +00003793 {
3794 switch ((int) i)
3795 {
3796 case 0:
3797 {
cristy4c08aed2011-07-01 19:47:50 +00003798 SetPixelRed(image,ScaleCharToQuantum((unsigned char)
3799 ReadDCMByte(stream_info,image)),q);
cristy3ed852e2009-09-05 21:47:34 +00003800 break;
3801 }
3802 case 1:
3803 {
cristy4c08aed2011-07-01 19:47:50 +00003804 SetPixelGreen(image,ScaleCharToQuantum((unsigned char)
3805 ReadDCMByte(stream_info,image)),q);
cristy3ed852e2009-09-05 21:47:34 +00003806 break;
3807 }
3808 case 2:
3809 {
cristy4c08aed2011-07-01 19:47:50 +00003810 SetPixelBlue(image,ScaleCharToQuantum((unsigned char)
3811 ReadDCMByte(stream_info,image)),q);
cristy3ed852e2009-09-05 21:47:34 +00003812 break;
3813 }
3814 case 3:
3815 {
cristy4c08aed2011-07-01 19:47:50 +00003816 SetPixelAlpha(image,ScaleCharToQuantum((unsigned char)
3817 ReadDCMByte(stream_info,image)),q);
cristy3ed852e2009-09-05 21:47:34 +00003818 break;
3819 }
3820 default:
3821 break;
3822 }
cristyed231572011-07-14 02:18:59 +00003823 q+=GetPixelChannels(image);
cristy3ed852e2009-09-05 21:47:34 +00003824 }
3825 if (SyncAuthenticPixels(image,exception) == MagickFalse)
3826 break;
3827 if (image->previous == (Image *) NULL)
3828 {
cristycee97112010-05-28 00:44:52 +00003829 status=SetImageProgress(image,LoadImageTag,(MagickOffsetType) y,
cristy4e82e512011-04-24 01:33:42 +00003830 image->rows);
cristy3ed852e2009-09-05 21:47:34 +00003831 if (status == MagickFalse)
3832 break;
3833 }
3834 }
3835 }
3836 }
3837 else
3838 {
3839 const char
3840 *option;
3841
cristybc98a282009-10-09 17:52:22 +00003842 int
3843 byte;
3844
cristy101ab702011-10-13 13:06:32 +00003845 PixelPacket
cristy3ed852e2009-09-05 21:47:34 +00003846 pixel;
3847
cristy3ed852e2009-09-05 21:47:34 +00003848 /*
3849 Convert DCM Medical image to pixel packets.
3850 */
3851 byte=0;
3852 i=0;
3853 if ((window_center != 0) && (window_width == 0))
cristybb503372010-05-27 20:51:26 +00003854 window_width=(size_t) window_center;
cristy092ec8d2013-04-26 13:46:22 +00003855 option=GetImageOption(image_info,"dcm:display-range");
cristy3ed852e2009-09-05 21:47:34 +00003856 if (option != (const char *) NULL)
3857 {
3858 if (LocaleCompare(option,"reset") == 0)
3859 window_width=0;
3860 }
3861 (void) ResetMagickMemory(&pixel,0,sizeof(pixel));
cristybb503372010-05-27 20:51:26 +00003862 for (y=0; y < (ssize_t) image->rows; y++)
cristy3ed852e2009-09-05 21:47:34 +00003863 {
3864 q=QueueAuthenticPixels(image,0,y,image->columns,1,exception);
cristyacd2ed22011-08-30 01:44:23 +00003865 if (q == (Quantum *) NULL)
cristy3ed852e2009-09-05 21:47:34 +00003866 break;
cristybb503372010-05-27 20:51:26 +00003867 for (x=0; x < (ssize_t) image->columns; x++)
cristy3ed852e2009-09-05 21:47:34 +00003868 {
3869 if (samples_per_pixel == 1)
3870 {
cristybc98a282009-10-09 17:52:22 +00003871 int
cristyc5de6992009-10-06 19:19:48 +00003872 pixel_value;
cristy3ed852e2009-09-05 21:47:34 +00003873
3874 if (bytes_per_pixel == 1)
cristybc98a282009-10-09 17:52:22 +00003875 pixel_value=polarity != MagickFalse ?
3876 ((int) max_value-ReadDCMByte(stream_info,image)) :
3877 ReadDCMByte(stream_info,image);
cristy3ed852e2009-09-05 21:47:34 +00003878 else
3879 if ((bits_allocated != 12) || (significant_bits != 12))
dirk75168912015-11-16 23:21:58 +01003880 {
3881 if (signed_data)
3882 pixel_value=(signed short) ReadDCMShort(stream_info,
3883 image);
3884 else
3885 pixel_value=ReadDCMShort(stream_info,image);
3886 if (polarity != MagickFalse)
dirk47fc2832015-11-24 21:18:34 +01003887 pixel_value=(int)max_value-pixel_value;
dirk75168912015-11-16 23:21:58 +01003888 }
cristy3ed852e2009-09-05 21:47:34 +00003889 else
3890 {
3891 if ((i & 0x01) != 0)
cristybc98a282009-10-09 17:52:22 +00003892 pixel_value=(ReadDCMByte(stream_info,image) << 8) |
3893 byte;
cristy3ed852e2009-09-05 21:47:34 +00003894 else
3895 {
cristyba18d462014-11-02 00:28:12 +00003896 pixel_value=(int) ReadDCMShort(stream_info,image);
cristybc98a282009-10-09 17:52:22 +00003897 byte=(int) (pixel_value & 0x0f);
cristy3ed852e2009-09-05 21:47:34 +00003898 pixel_value>>=4;
3899 }
3900 i++;
3901 }
dirk47fc2832015-11-24 21:18:34 +01003902 index=(pixel_value*rescale_slope)+rescale_intercept;
cristy3ed852e2009-09-05 21:47:34 +00003903 if (window_width == 0)
cristyc5de6992009-10-06 19:19:48 +00003904 {
cristy5ad902a2011-09-12 11:53:42 +00003905 if (signed_data == 1)
dirk47fc2832015-11-24 21:18:34 +01003906 index-=32767;
cristyc5de6992009-10-06 19:19:48 +00003907 }
cristybc98a282009-10-09 17:52:22 +00003908 else
cristy3ed852e2009-09-05 21:47:34 +00003909 {
cristybb503372010-05-27 20:51:26 +00003910 ssize_t
cristy3ed852e2009-09-05 21:47:34 +00003911 window_max,
3912 window_min;
3913
cristyba18d462014-11-02 00:28:12 +00003914 window_min=(ssize_t) ceil((double) window_center-
3915 (window_width-1.0)/2.0-0.5);
3916 window_max=(ssize_t) floor((double) window_center+
3917 (window_width-1.0)/2.0+0.5);
dirk47fc2832015-11-24 21:18:34 +01003918 if ((ssize_t)index <= window_min)
cristy3ed852e2009-09-05 21:47:34 +00003919 index=0;
3920 else
dirk47fc2832015-11-24 21:18:34 +01003921 if ((ssize_t)index > window_max)
cristybc98a282009-10-09 17:52:22 +00003922 index=(int) max_value;
cristy3ed852e2009-09-05 21:47:34 +00003923 else
dirk47fc2832015-11-24 21:18:34 +01003924 index=(int) (max_value*(((index-window_center-
cristybc98a282009-10-09 17:52:22 +00003925 0.5)/(window_width-1))+0.5));
cristy3ed852e2009-09-05 21:47:34 +00003926 }
3927 index&=mask;
cristyc82a27b2011-10-21 01:07:16 +00003928 index=(int) ConstrainColormapIndex(image,(size_t) index,
3929 exception);
cristyba18d462014-11-02 00:28:12 +00003930 SetPixelIndex(image,(Quantum) index,q);
3931 pixel.red=(unsigned int) image->colormap[index].red;
3932 pixel.green=(unsigned int) image->colormap[index].green;
3933 pixel.blue=(unsigned int) image->colormap[index].blue;
cristy3ed852e2009-09-05 21:47:34 +00003934 }
3935 else
3936 {
3937 if (bytes_per_pixel == 1)
3938 {
cristyba18d462014-11-02 00:28:12 +00003939 pixel.red=(unsigned int) ReadDCMByte(stream_info,image);
3940 pixel.green=(unsigned int) ReadDCMByte(stream_info,image);
3941 pixel.blue=(unsigned int) ReadDCMByte(stream_info,image);
cristy3ed852e2009-09-05 21:47:34 +00003942 }
3943 else
3944 {
cristyba18d462014-11-02 00:28:12 +00003945 pixel.red=ReadDCMShort(stream_info,image);
3946 pixel.green=ReadDCMShort(stream_info,image);
3947 pixel.blue=ReadDCMShort(stream_info,image);
cristy3ed852e2009-09-05 21:47:34 +00003948 }
3949 pixel.red&=mask;
3950 pixel.green&=mask;
3951 pixel.blue&=mask;
3952 if (scale != (Quantum *) NULL)
3953 {
3954 pixel.red=scale[pixel.red];
3955 pixel.green=scale[pixel.green];
3956 pixel.blue=scale[pixel.blue];
3957 }
3958 }
cristyba18d462014-11-02 00:28:12 +00003959 SetPixelRed(image,(Quantum) pixel.red,q);
3960 SetPixelGreen(image,(Quantum) pixel.green,q);
3961 SetPixelBlue(image,(Quantum) pixel.blue,q);
cristyed231572011-07-14 02:18:59 +00003962 q+=GetPixelChannels(image);
cristy3ed852e2009-09-05 21:47:34 +00003963 }
3964 if (SyncAuthenticPixels(image,exception) == MagickFalse)
3965 break;
3966 if (image->previous == (Image *) NULL)
3967 {
cristycee97112010-05-28 00:44:52 +00003968 status=SetImageProgress(image,LoadImageTag,(MagickOffsetType) y,
3969 image->rows);
cristy3ed852e2009-09-05 21:47:34 +00003970 if (status == MagickFalse)
3971 break;
3972 }
3973 }
cristy46c3c9d2011-03-27 15:05:00 +00003974 if (stream_info->segment_count > 1)
3975 for (y=0; y < (ssize_t) image->rows; y++)
3976 {
3977 q=QueueAuthenticPixels(image,0,y,image->columns,1,exception);
cristyacd2ed22011-08-30 01:44:23 +00003978 if (q == (Quantum *) NULL)
cristy46c3c9d2011-03-27 15:05:00 +00003979 break;
cristy46c3c9d2011-03-27 15:05:00 +00003980 for (x=0; x < (ssize_t) image->columns; x++)
3981 {
3982 if (samples_per_pixel == 1)
3983 {
3984 int
3985 pixel_value;
3986
3987 if (bytes_per_pixel == 1)
3988 pixel_value=polarity != MagickFalse ?
3989 ((int) max_value-ReadDCMByte(stream_info,image)) :
3990 ReadDCMByte(stream_info,image);
3991 else
3992 if ((bits_allocated != 12) || (significant_bits != 12))
3993 {
dirkc47dca92015-11-10 22:45:33 +01003994 pixel_value=(int) (polarity != MagickFalse ?
3995 (max_value-ReadDCMShort(stream_info,image)) :
3996 ReadDCMShort(stream_info,image));
cristy5ad902a2011-09-12 11:53:42 +00003997 if (signed_data == 1)
cristy46c3c9d2011-03-27 15:05:00 +00003998 pixel_value=((signed short) pixel_value);
3999 }
4000 else
4001 {
4002 if ((i & 0x01) != 0)
4003 pixel_value=(ReadDCMByte(stream_info,image) << 8) |
4004 byte;
4005 else
4006 {
cristyba18d462014-11-02 00:28:12 +00004007 pixel_value=(int) ReadDCMShort(stream_info,
4008 image);
cristy46c3c9d2011-03-27 15:05:00 +00004009 byte=(int) (pixel_value & 0x0f);
4010 pixel_value>>=4;
4011 }
4012 i++;
4013 }
dirk47fc2832015-11-24 21:18:34 +01004014 index=(pixel_value*rescale_slope)+rescale_intercept;
cristy46c3c9d2011-03-27 15:05:00 +00004015 if (window_width == 0)
4016 {
cristy5ad902a2011-09-12 11:53:42 +00004017 if (signed_data == 1)
dirk47fc2832015-11-24 21:18:34 +01004018 index-=32767;
cristy46c3c9d2011-03-27 15:05:00 +00004019 }
4020 else
4021 {
4022 ssize_t
4023 window_max,
4024 window_min;
4025
cristyba18d462014-11-02 00:28:12 +00004026 window_min=(ssize_t) ceil((double) window_center-
4027 (window_width-1.0)/2.0-0.5);
4028 window_max=(ssize_t) floor((double) window_center+
4029 (window_width-1.0)/2.0+0.5);
dirk47fc2832015-11-24 21:18:34 +01004030 if ((ssize_t)index <= window_min)
cristy46c3c9d2011-03-27 15:05:00 +00004031 index=0;
4032 else
dirk47fc2832015-11-24 21:18:34 +01004033 if ((ssize_t)index > window_max)
cristy46c3c9d2011-03-27 15:05:00 +00004034 index=(int) max_value;
4035 else
dirk47fc2832015-11-24 21:18:34 +01004036 index=(int) (max_value*(((index-window_center-
cristy46c3c9d2011-03-27 15:05:00 +00004037 0.5)/(window_width-1))+0.5));
4038 }
4039 index&=mask;
cristyc82a27b2011-10-21 01:07:16 +00004040 index=(int) ConstrainColormapIndex(image,(size_t) index,
4041 exception);
cristyba18d462014-11-02 00:28:12 +00004042 SetPixelIndex(image,(Quantum) (((size_t)
4043 GetPixelIndex(image,q)) | (((size_t) index) << 8)),q);
4044 pixel.red=(unsigned int) image->colormap[index].red;
4045 pixel.green=(unsigned int) image->colormap[index].green;
4046 pixel.blue=(unsigned int) image->colormap[index].blue;
cristy46c3c9d2011-03-27 15:05:00 +00004047 }
4048 else
4049 {
4050 if (bytes_per_pixel == 1)
4051 {
cristyba18d462014-11-02 00:28:12 +00004052 pixel.red=(unsigned int) ReadDCMByte(stream_info,image);
4053 pixel.green=(unsigned int) ReadDCMByte(stream_info,image);
4054 pixel.blue=(unsigned int) ReadDCMByte(stream_info,image);
cristy46c3c9d2011-03-27 15:05:00 +00004055 }
4056 else
4057 {
cristyba18d462014-11-02 00:28:12 +00004058 pixel.red=ReadDCMShort(stream_info,image);
4059 pixel.green=ReadDCMShort(stream_info,image);
4060 pixel.blue=ReadDCMShort(stream_info,image);
cristy46c3c9d2011-03-27 15:05:00 +00004061 }
4062 pixel.red&=mask;
4063 pixel.green&=mask;
4064 pixel.blue&=mask;
4065 if (scale != (Quantum *) NULL)
4066 {
4067 pixel.red=scale[pixel.red];
4068 pixel.green=scale[pixel.green];
4069 pixel.blue=scale[pixel.blue];
4070 }
4071 }
cristyba18d462014-11-02 00:28:12 +00004072 SetPixelRed(image,(Quantum) (((size_t) GetPixelRed(image,q)) |
cristy4c08aed2011-07-01 19:47:50 +00004073 (((size_t) pixel.red) << 8)),q);
cristyba18d462014-11-02 00:28:12 +00004074 SetPixelGreen(image,(Quantum) (((size_t) GetPixelGreen(image,q)) |
cristy4c08aed2011-07-01 19:47:50 +00004075 (((size_t) pixel.green) << 8)),q);
cristyba18d462014-11-02 00:28:12 +00004076 SetPixelBlue(image,(Quantum) (((size_t) GetPixelBlue(image,q)) |
cristy4c08aed2011-07-01 19:47:50 +00004077 (((size_t) pixel.blue) << 8)),q);
cristyed231572011-07-14 02:18:59 +00004078 q+=GetPixelChannels(image);
cristy46c3c9d2011-03-27 15:05:00 +00004079 }
4080 if (SyncAuthenticPixels(image,exception) == MagickFalse)
4081 break;
4082 if (image->previous == (Image *) NULL)
4083 {
4084 status=SetImageProgress(image,LoadImageTag,(MagickOffsetType) y,
4085 image->rows);
4086 if (status == MagickFalse)
4087 break;
4088 }
4089 }
cristy3ed852e2009-09-05 21:47:34 +00004090 }
dirkf1d85482015-04-06 00:36:00 +00004091 if (SetImageGray(image,exception) != MagickFalse)
cristya865ccd2012-07-28 00:33:10 +00004092 (void) SetImageColorspace(image,GRAYColorspace,exception);
cristy8f85a402009-10-10 14:14:40 +00004093 if (EOFBlob(image) != MagickFalse)
4094 {
4095 ThrowFileException(exception,CorruptImageError,"UnexpectedEndOfFile",
4096 image->filename);
4097 break;
4098 }
cristy3ed852e2009-09-05 21:47:34 +00004099 /*
4100 Proceed to next image.
4101 */
4102 if (image_info->number_scenes != 0)
4103 if (image->scene >= (image_info->scene+image_info->number_scenes-1))
4104 break;
cristybb503372010-05-27 20:51:26 +00004105 if (scene < (ssize_t) (number_scenes-1))
cristy3ed852e2009-09-05 21:47:34 +00004106 {
4107 /*
4108 Allocate next image structure.
4109 */
cristy9950d572011-10-01 18:22:35 +00004110 AcquireNextImage(image_info,image,exception);
cristy3ed852e2009-09-05 21:47:34 +00004111 if (GetNextImageInList(image) == (Image *) NULL)
4112 {
4113 image=DestroyImageList(image);
4114 return((Image *) NULL);
4115 }
4116 image=SyncNextImageInList(image);
4117 status=SetImageProgress(image,LoadImagesTag,TellBlob(image),
4118 GetBlobSize(image));
4119 if (status == MagickFalse)
4120 break;
4121 }
4122 }
4123 /*
cristybc98a282009-10-09 17:52:22 +00004124 Free resources.
cristy3ed852e2009-09-05 21:47:34 +00004125 */
cristybc98a282009-10-09 17:52:22 +00004126 if (stream_info->offsets != (ssize_t *) NULL)
4127 stream_info->offsets=(ssize_t *)
4128 RelinquishMagickMemory(stream_info->offsets);
4129 stream_info=(DCMStreamInfo *) RelinquishMagickMemory(stream_info);
cristy3ed852e2009-09-05 21:47:34 +00004130 if (scale != (Quantum *) NULL)
4131 scale=(Quantum *) RelinquishMagickMemory(scale);
cristybc98a282009-10-09 17:52:22 +00004132 if (graymap != (int *) NULL)
4133 graymap=(int *) RelinquishMagickMemory(graymap);
cristy68931bc2010-03-19 17:11:43 +00004134 if (bluemap != (int *) NULL)
4135 bluemap=(int *) RelinquishMagickMemory(bluemap);
4136 if (greenmap != (int *) NULL)
4137 greenmap=(int *) RelinquishMagickMemory(greenmap);
4138 if (redmap != (int *) NULL)
4139 redmap=(int *) RelinquishMagickMemory(redmap);
cristy3ed852e2009-09-05 21:47:34 +00004140 (void) CloseBlob(image);
4141 return(GetFirstImageInList(image));
4142}
4143
4144/*
4145%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4146% %
4147% %
4148% %
4149% R e g i s t e r D C M I m a g e %
4150% %
4151% %
4152% %
4153%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4154%
4155% RegisterDCMImage() adds attributes for the DCM image format to
4156% the list of supported formats. The attributes include the image format
4157% tag, a method to read and/or write the format, whether the format
4158% supports the saving of more than one frame to the same file or blob,
4159% whether the format supports native in-memory I/O, and a brief
4160% description of the format.
4161%
4162% The format of the RegisterDCMImage method is:
4163%
cristybb503372010-05-27 20:51:26 +00004164% size_t RegisterDCMImage(void)
cristy3ed852e2009-09-05 21:47:34 +00004165%
4166*/
cristybb503372010-05-27 20:51:26 +00004167ModuleExport size_t RegisterDCMImage(void)
cristy3ed852e2009-09-05 21:47:34 +00004168{
4169 MagickInfo
4170 *entry;
4171
4172 static const char
4173 *DCMNote=
4174 {
4175 "DICOM is used by the medical community for images like X-rays. The\n"
4176 "specification, \"Digital Imaging and Communications in Medicine\n"
4177 "(DICOM)\", is available at http://medical.nema.org/. In particular,\n"
4178 "see part 5 which describes the image encoding (RLE, JPEG, JPEG-LS),\n"
4179 "and supplement 61 which adds JPEG-2000 encoding."
4180 };
4181
dirk06b627a2015-04-06 18:59:17 +00004182 entry=AcquireMagickInfo("DCM","DCM",
4183 "Digital Imaging and Communications in Medicine image");
cristy3ed852e2009-09-05 21:47:34 +00004184 entry->decoder=(DecodeImageHandler *) ReadDCMImage;
4185 entry->magick=(IsImageFormatHandler *) IsDCM;
dirk08e9a112015-02-22 01:51:41 +00004186 entry->flags^=CoderAdjoinFlag;
4187 entry->flags|=CoderSeekableStreamFlag;
cristy3ed852e2009-09-05 21:47:34 +00004188 entry->note=ConstantString(DCMNote);
cristy3ed852e2009-09-05 21:47:34 +00004189 (void) RegisterMagickInfo(entry);
4190 return(MagickImageCoderSignature);
4191}
4192
4193/*
4194%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4195% %
4196% %
4197% %
4198% U n r e g i s t e r D C M I m a g e %
4199% %
4200% %
4201% %
4202%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4203%
4204% UnregisterDCMImage() removes format registrations made by the
4205% DCM module from the list of supported formats.
4206%
4207% The format of the UnregisterDCMImage method is:
4208%
4209% UnregisterDCMImage(void)
4210%
4211*/
4212ModuleExport void UnregisterDCMImage(void)
4213{
4214 (void) UnregisterMagickInfo("DCM");
4215}