~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Linux Cross Reference
Tina4/src/file/dicom.old/CTN/dcmdict.c

Version: ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /*
  2           Copyright (C) 1993, 1994, RSNA and Washington University
  3 
  4           The software and supporting documentation for the Radiological
  5           Society of North America (RSNA) 1993, 1994 Digital Imaging and
  6           Communications in Medicine (DICOM) Demonstration were developed
  7           at the
  8                   Electronic Radiology Laboratory
  9                   Mallinckrodt Institute of Radiology
 10                   Washington University School of Medicine
 11                   510 S. Kingshighway Blvd.
 12                   St. Louis, MO 63110
 13           as part of the 1993, 1994 DICOM Central Test Node project for, and
 14           under contract with, the Radiological Society of North America.
 15 
 16           THIS SOFTWARE IS MADE AVAILABLE, AS IS, AND NEITHER RSNA NOR
 17           WASHINGTON UNIVERSITY MAKE ANY WARRANTY ABOUT THE SOFTWARE, ITS
 18           PERFORMANCE, ITS MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR
 19           USE, FREEDOM FROM ANY COMPUTER DISEASES OR ITS CONFORMITY TO ANY
 20           SPECIFICATION. THE ENTIRE RISK AS TO QUALITY AND PERFORMANCE OF
 21           THE SOFTWARE IS WITH THE USER.
 22 
 23           Copyright of the software and supporting documentation is
 24           jointly owned by RSNA and Washington University, and free access
 25           is hereby granted as a license to use this software, copy this
 26           software and prepare derivative works based upon this software.
 27           However, any distribution of this software source code or
 28           supporting documentation or derivative works (source code and
 29           supporting documentation) must include the three paragraphs of
 30           the copyright notice.
 31 */
 32 /* Copyright marker.  Copyright will be inserted above.  Do not remove */
 33 
 34 /*
 35 **                              DICOM 93
 36 **                   Electronic Radiology Laboratory
 37 **                 Mallinckrodt Institute of Radiology
 38 **              Washington University School of Medicine
 39 **
 40 ** Module Name(s):      DCM_LookupElement(DCM_ELEMENT *element)
 41 ** Author, Date:        Stephen M. Moore, 30-Apr-93
 42 ** Intent:              This module contains the routine and data which
 43 **                      define the DICOM data dictionary.  A number of
 44 **                      static objects are maintained which define how
 45 **                      elements in the DICOM V3.0 standard are to be
 46 **                      interpreted.
 47 ** Last Update:         $Author: smm $, $Date: 1998/10/22 15:58:57 $
 48 ** Source File:         $RCSfile: dcmdict.c,v $
 49 ** Revision:            $Revision: 1.67 $
 50 ** Status:              $State: Exp $
 51 */
 52 
 53 static char rcsid[] = "$Revision: 1.67 $ $RCSfile: dcmdict.c,v $";
 54 
 55 #include <stdio.h>
 56 #include <sys/types.h>
 57 #include <string.h>
 58 #include "dicom.h"
 59 #include "lst.h"
 60 #include "condition.h"
 61 #include "dicom_objects.h"
 62 #include "dcmprivate.h"
 63 
 64 /*  The DCM dictionary consists of a list of lists.  Each group (COMMAND,
 65 **  IMAGE, ...) is defined in a list separately.  The object DCMDICT
 66 **  below is used to define the entry for a single data element in a
 67 **  known group.  We define the fields:
 68 **      element
 69 **      representation
 70 **      english Description
 71 **  The outer layer DCM dictionary consists of a list of groups.  The
 72 **  group entries define the "group" number and give a pointer to the
 73 **  DCMDICT list for that group.  The intent is to search the outer layer
 74 **  dictionary to find the proper group, then search the particular group
 75 **  list to find the proper element.
 76 */
 77 typedef struct {
 78     DCM_TAG tag;
 79     DCM_VALUEREPRESENTATION representation;
 80     char englishDescription[48];
 81 }   DCMDICT;
 82 
 83 typedef struct {
 84     unsigned short group;
 85     unsigned long entries;
 86     DCMDICT *dict;
 87 }   GROUPPTR;
 88 
 89 
 90 /*  Define the entries for the COMMAND group
 91 */
 92 static DCMDICT CMD_dictionary[] = {
 93     {DCM_CMDGROUPLENGTH, DCM_UL, "CMD Group Length"},
 94     {DCM_CMDAFFECTEDCLASSUID, DCM_UI, "CMD Affected SOP Class UID"},
 95     {DCM_CMDREQUESTEDCLASSUID, DCM_UI, "CMD Requested SOP Class UID"},
 96     {DCM_CMDCOMMANDFIELD, DCM_US, "CMD Command Field"},
 97     {DCM_CMDMSGID, DCM_US, "CMD Message ID"},
 98     {DCM_CMDMSGIDRESPOND, DCM_US, "CMD Message ID Responded to"},
 99     {DCM_CMDMOVEDESTINATION, DCM_AE, "CMD Move Destination"},
100     {DCM_CMDPRIORITY, DCM_US, "CMD Priority"},
101     {DCM_CMDDATASETTYPE, DCM_US, "CMD Data Set Type"},
102     {DCM_CMDSTATUS, DCM_US, "CMD Status"},
103     {DCM_CMDOFFENDINGELEMENT, DCM_AT, "CMD Offending Element"},
104     {DCM_CMDERRORCOMMENT, DCM_LO, "CMD Error Comment"},
105     {DCM_CMDERRORID, DCM_US, "CMD Error ID"},
106     {DCM_CMDREQUESTEDINSTANCEUID, DCM_UI, "CMD SOP Requested Instance UID"},
107     {DCM_CMDAFFECTEDINSTANCEUID, DCM_UI, "CMD SOP Affected Instance UID"},
108     {DCM_CMDEVENTTYPEID, DCM_US, "CMD Event Type ID"},
109     {DCM_CMDACTIONTYPEID, DCM_US, "CMD Action Type ID"},
110     {DCM_CMDREMAININGSUBOPERATIONS, DCM_US, "CMD Remaining Suboperations"},
111     {DCM_CMDCOMPLETEDSUBOPERATIONS, DCM_US, "CMD Completed Suboperations"},
112     {DCM_CMDFAILEDSUBOPERATIONS, DCM_US, "CMD Failed Suboperations"},
113     {DCM_CMDWARNINGSUBOPERATIONS, DCM_US, "CMD Warning Suboperations"},
114     {DCM_CMDMOVEAETITLE, DCM_AE, "CMD AE Title"},
115     {DCM_CMDMOVEMESSAGEID, DCM_US, "CMD Message ID"},
116     {DCM_CMDATTRIBUTEIDLIST, DCM_AT, "CMD Attribute Identifier List"},
117 
118 };
119 
120 /* Define the entries for the file Meta Header group
121 */
122 
123 static DCMDICT META_dictionary[] = {
124     {DCM_METAGROUPLENGTH, DCM_UL, "META Group Length"},
125     {DCM_METAINFORMATIONVERSION, DCM_OB, "META File Meta Information Version"},
126     {DCM_METAMEDIASTORAGESOPCLASS, DCM_UI, "META Media Stored SOP Class UID"},
127     {DCM_METAMEDIASTORAGESOPINSTANCE, DCM_UI, "META Media Stored SOP Instance UID"},
128     {DCM_METATRANSFERSYNTAX, DCM_UI, "META Transfer Syntax UID"},
129     {DCM_METAIMPLEMENTATIONCLASS, DCM_UI, "META Implementation Class UID"},
130     {DCM_METAIMPLEMENTATIONVERSION, DCM_SH, "META Implementation Version Name"},
131     {DCM_METASOURCEAETITLE, DCM_AE, "META Source Application Entity Title"},
132     {DCM_METAPRIVATEINFORMATIONCREATOR, DCM_UI, "META Private Information Creator"},
133     {DCM_METAPRIVATEINFORMATION, DCM_OB, "META Private Information"}
134 };
135 
136 /* Define the elements in the Basic Directory Information Group, 0x0004 */
137 
138 static DCMDICT BASICDIR_dictionary[] = {
139     {DCM_DIRFILESETID, DCM_CS, "DIR File-set ID"},
140     {DCM_DIRFILESETDESCRFILEID, DCM_CS, "DIR File-set descriptor ID"},
141     {DCM_DIRSPECIFICCHARACTER, DCM_CS, "DIR Specific character set"},
142     {DCM_DIRFIRSTOFFSET, DCM_UL, "DIR Offset of the first dir of root dir entity"},
143     {DCM_DIRLASTOFFSET, DCM_UL, "DIR Offset of the last dir of root dir entity"},
144     {DCM_DIRFILESETCONSISTENCY, DCM_US, "DIR File-set consistency flag"},
145     {DCM_DIRRECORDSEQUENCE, DCM_SQ, "DIR Directory record sequence"},
146     {DCM_DIRNEXTRECORDOFFSET, DCM_UL, "DIR Offset of next directory record"},
147     {DCM_DIRRECORDINUSE, DCM_US, "DIR Record in use flag"},
148     {DCM_DIRLOWERLEVELOFFSET, DCM_UL, "DIR Offset of referenced lower-level dir entity"},
149     {DCM_DIRRECORDTYPE, DCM_CS, "DIR Directory Record Type"},
150     {DCM_DIRPRIVATERECORDUID, DCM_UI, "DIR Private Record UID"},
151     {DCM_DIRREFERENCEDFILEID, DCM_CS, "DIR Referenced File ID"},
152     {DCM_DIRMRDRRECORDOFFSET, DCM_UL, "DIR Directory Record Offset"},
153     {DCM_DIRREFSOPCLASSUID, DCM_UI, "DIR Referenced SOP Class UID in File"},
154     {DCM_DIRREFSOPINSTANCEUID, DCM_UI, "DIR Referenced SOP Instance UID in File"},
155     {DCM_DIRREFTRANSFERSYNTAXUID, DCM_UI, "DIR Referenced Transfer Syntax in File"},
156     {DCM_DIRNUMREFERENCES, DCM_UL, "DIR Number of References"}
157 };
158 
159 /* Define the entries for the IDENTIFYING group
160 */
161 static DCMDICT ID_dictionary[] = {
162     {DCM_IDGROUPLENGTH, DCM_UL, "ID Group Length"},
163 /*    {DCM_IDLENGTHTOEND, DCM_RET, "ID Length to End (RET)"}, */
164     {DCM_IDLENGTHTOEND, DCM_UL, "ID Length to End (RET)"},
165     {DCM_IDSPECIFICCHARACTER, DCM_CS, "ID Specific Character Set"},
166     {DCM_IDIMAGETYPE, DCM_CS, "ID Image Type"},
167     {DCM_IDRECOGNITIONCODE, DCM_RET, "ID Recognition Code (RET)"},
168     {DCM_IDINSTANCECREATEDATE, DCM_DA, "ID Instance Creation Date"},
169     {DCM_IDINSTANCECREATETIME, DCM_TM, "ID Instance Creation Time"},
170     {DCM_IDINSTANCECREATORUID, DCM_UI, "ID Instance Creator UID"},
171     {DCM_IDSOPCLASSUID, DCM_UI, "ID SOP Class UID"},
172     {DCM_IDSOPINSTANCEUID, DCM_UI, "ID SOP Instance UID"},
173     {DCM_IDSTUDYDATE, DCM_DA, "ID Study Date"},
174     {DCM_IDSERIESDATE, DCM_DA, "ID Series Date"},
175     {DCM_IDACQUISITIONDATE, DCM_DA, "ID Acquisition Date"},
176     {DCM_IDIMAGEDATE, DCM_DA, "ID Image Date"},
177     {DCM_IDOVERLAYDATE, DCM_DA, "ID Overlay Date"},
178     {DCM_IDCURVEDATE, DCM_DA, "ID Curve Date"},
179     {DCM_IDSTUDYTIME, DCM_TM, "ID Study Time"},
180     {DCM_IDSERIESTIME, DCM_TM, "ID Series Time"},
181     {DCM_IDACQUISITIONTIME, DCM_TM, "ID Acquisition Time"},
182     {DCM_IDIMAGETIME, DCM_TM, "ID Image Time"},
183     {DCM_IDOVERLAYTIME, DCM_TM, "ID Overlay Time"},
184     {DCM_IDCURVETIME, DCM_TM, "ID Curve Time"},
185     {DCM_IDDATASETTYPE, DCM_RET, "ID Data Set Type (RET)"},
186     {DCM_IDDATASETSUBTYPE, DCM_RET, "ID Data Set Subtype (RET)"},
187     {DCM_IDNMSERIESTYPE, DCM_CS, "ID Nuc Med Series Type (RET)"},
188     {DCM_IDACCESSIONNUMBER, DCM_SH, "ID Accession Number"},
189     {DCM_IDQUERYLEVEL, DCM_CS, "ID Query Level"},
190     {DCM_IDRETRIEVEAETITLE, DCM_AE, "ID Retrieve AE Title"},
191     {DCM_IDFAILEDINSTANCEUIDLIST, DCM_UI, "ID Failed SOP Instances"},
192     {DCM_IDMODALITY, DCM_CS, "ID Modality"},
193     {DCM_IDMODALITYSUBTYPE, DCM_SQ, "ID Modality Subtype"},     /* Sup 30 0.6 */
194     {DCM_IDCONVERSIONTYPE, DCM_CS, "ID Conversion Type"},
195     {DCM_IDMANUFACTURER, DCM_LO, "ID Manufacturer"},
196     {DCM_IDINSTITUTIONNAME, DCM_LO, "ID Institution Name"},
197     {DCM_IDINSTITUTIONADDR, DCM_ST, "ID Institution Address"},
198     {DCM_IDINSTITUTECODESEQUENCE, DCM_SQ, "ID Institution Code Sequence"},
199     {DCM_IDREFERRINGPHYSICIAN, DCM_PN, "ID Referring Physician's Name"},
200     {DCM_IDREFERRINGPHYSADDR, DCM_ST, "ID Referring Physician's Address"},
201     {DCM_IDREFERRINGPHYSPHONE, DCM_SH, "ID Referring Physician's Telephone"},
202     {DCM_IDCODEVALUE, DCM_SH, "ID Code Value"},
203     {DCM_IDCODINGSCHEMEDESIGNATOR, DCM_SH, "ID Coding Scheme Designator"},
204     {DCM_IDCODINGSCHEMEVERSION, DCM_SH, "ID Coding Scheme Version"},
205     /* Sup 15, Version 1.2_interim_971226 */
206     {DCM_IDCODEMEANING, DCM_LO, "ID Code Meaning"},
207     {DCM_IDMAPPINGRESOURCE, DCM_CS, "ID Mapping Resource"},     /* Sup 15, 1.1a */
208     {DCM_IDCONTEXTGROUPVERSION, DCM_DT, "ID Context Group Version"},
209     /* Sup 15, Version 1.1a */
210     {DCM_IDCODESETEXTENSIONFLAG, DCM_CS, "ID Code Set Extension Flag"},
211     /* 0x010B: Sup 15, Version 1.a */
212     {DCM_IDPRIVATECODINGSCHEMECREATORUID, DCM_UI, "ID Private Coding Scheme Creator UID"},
213     /* 0x010C: Sup 15, Version 1.1 */
214     {DCM_IDCODESETEXTENSIONCREATORUID, DCM_UI, "ID Coding Scheme Creator UID"},
215     /* 0x010D: Sup 15, Version 1.1 */
216     {DCM_IDMAPPINGRESOURCESEQ, DCM_SQ, "ID Mapping Resource Sequence"},
217     /* Sup 15, Version 1.1 */
218     {DCM_IDCONTEXTIDENTIFIER, DCM_CS, "ID Context Identifier"}, /* Sup 15 */
219     {DCM_IDNETWORKID, DCM_LO, "ID Network ID (RET)"},
220     {DCM_IDSTATIONNAME, DCM_SH, "ID Station Name"},
221     {DCM_IDSTUDYDESCRIPTION, DCM_LO, "ID Study Description"},
222     {DCM_IDPROCEDURECODESEQUENCE, DCM_SQ, "ID Procedure Code Sequence"},
223     {DCM_IDSERIESDESCR, DCM_LO, "ID Series Description"},
224     {DCM_IDINSTITUTIONALDEPT, DCM_LO, "ID Institutional Department Name"},
225     {DCM_IDPHYSICIANOFRECORD, DCM_PN, "ID Physician of Record"},
226     {DCM_IDPERFORMINGPHYSICIAN, DCM_PN, "ID Performing Physician's Name"},
227     {DCM_IDPHYSREADINGSTUDY, DCM_PN, "ID Name of Physician(s) Reading Study"},
228     {DCM_IDOPERATORNAME, DCM_PN, "ID Operator's Name"},
229     {DCM_IDADMITTINGDIAGDESCR, DCM_LO, "ID Admitting Diagnoses Description"},
230     {DCM_IDADMITDIAGCODESEQUENCE, DCM_SQ, "ID Admitting Diagnosis Code Sequence"},
231     {DCM_IDMANUFACTURERMODEL, DCM_LO, "ID Manufacturer Model Name"},
232     {DCM_IDREFERENCEDRESULTSSEQ, DCM_SQ, "ID Referenced Results Sequence"},
233     {DCM_IDREFERENCEDSTUDYSEQ, DCM_SQ, "ID Referenced Study Sequence"},
234     {DCM_IDREFERENCEDSTUDYCOMPONENTSEQ, DCM_SQ, "ID Referenced Study Component Sequence"},
235     {DCM_IDREFERENCEDSERIESSEQ, DCM_SQ, "ID Referenced Series Sequence"},
236     {DCM_IDREFERENCEDPATIENTSEQ, DCM_SQ, "ID Referenced Patient Sequence"},
237     {DCM_IDREFERENCEDVISITSEQ, DCM_SQ, "ID Referenced Visit Sequence"},
238     {DCM_IDREFERENCEDOVERLAYSEQ, DCM_SQ, "ID Referenced Overlay Sequence"},
239     {DCM_IDREFERENCEDIMAGESEQ, DCM_SQ, "ID Referenced Image Sequence"},
240     {DCM_IDREFERENCEDCURVESEQ, DCM_SQ, "ID Referenced Curve Sequence"},
241     {DCM_IDREFERENCEDPREVIOUSWAVEFORM, DCM_SQ, "ID Referenced Previous Waveform"},      /* Sup 30 0.6 */
242     {DCM_IDREFERENCEDSIMULTANEOUSWAVEFORMS, DCM_SQ, "ID Referenced Simultaneous Waveforms"},    /* Sup 30 0.6 */
243     {DCM_IDREFERENCEDSUBSEQUENTWAVEFORM, DCM_SQ, "ID Referenced Subsequent Waveform"},  /* Sup 30 0.6 */
244     {DCM_IDREFERENCEDSOPCLASSUID, DCM_UI, "ID Referenced SOP Class UID"},
245     {DCM_IDREFERENCEDSOPINSTUID, DCM_UI, "ID Referenced SOP Instance UID"},
246     {DCM_IDREFERENCEDFRAMENUMBER, DCM_IS, "ID Referenced Frame Number"},
247     {DCM_IDTRANSACTIONUID, DCM_UI, "ID Transaction UID"},
248     {DCM_IDFAILUREREASON, DCM_US, "ID Failure Reason"},
249     {DCM_IDFAILEDSOPSEQUENCE, DCM_SQ, "ID Failed SOP Sequence"},
250     {DCM_IDREFERENCEDSOPSEQUENCE, DCM_SQ, "ID Referenced SOP Sequence"},
251     {DCM_IDLOSSYIMAGECOMPRESSION, DCM_CS, "ID Lossy Image Compression (RET)"},
252     {DCM_IDDERIVATIONDESCR, DCM_ST, "ID Derivation Description"},
253     {DCM_IDSOURCEIMAGESEQ, DCM_SQ, "ID Source Image Sequence"},
254     {DCM_IDSTAGENAME, DCM_SH, "ID Stage Name"},
255     {DCM_IDSTAGENUMBER, DCM_IS, "ID Stage Number"},
256     {DCM_IDNUMBEROFSTAGES, DCM_IS, "ID Number of Stages"},
257     {DCM_IDVIEWNUMBER, DCM_IS, "ID View Number"},
258     {DCM_IDNUMBEROFEVENTTIMERS, DCM_IS, "ID Number of Event Timers"},
259     {DCM_IDNUMBERVIEWSINSTAGE, DCM_IS, "ID Number of Views in Stage"},
260     {DCM_IDEVENTELAPSEDTIME, DCM_DS, "ID Event Elapsed Time(s)"},
261     {DCM_IDEVENTTIMERNAME, DCM_LO, "ID Event Event Timer Name(s)"},
262     {DCM_IDSTARTTRIM, DCM_IS, "ID Start Trim"},
263     {DCM_IDSTOPTRIM, DCM_IS, "ID Stop Trim"},
264     {DCM_IDDISPLAYFRAMERATE, DCM_IS, "ID Recommended Display Frame Rate"},
265     {DCM_IDTRANSDUCERPOSITION, DCM_CS, "ID Transducer Position (RET)"},
266     {DCM_IDTRANSDUCERORIENTATION, DCM_CS, "ID Transducer Orientation (RET)"},
267     {DCM_IDANATOMICSTRUCTURE, DCM_CS, "ID Anatomic Structure (RET)"},
268     {DCM_IDANATOMICREGIONSEQUENCE, DCM_SQ, "ID Anatomic Region of Interest Sequence"},
269     {DCM_IDANATOMICREGIONMODIFIERSEQ, DCM_SQ,
270     "ID Anatomic Region Modifier Sequence"},
271     {DCM_IDPRIMARYANATOMICSTRUCTURESEQ, DCM_SQ,
272     "ID Primary Anatomic Structure Sequence"},
273     {DCM_IDPRIMARYANATOMICSTRUCTUREMODIFIERSEQ, DCM_SQ,
274     "ID Primary Anatomic Structure Modifier Sequence"},
275     {DCM_IDTRANSDUCERPOSITIONSEQ, DCM_SQ, "ID Transducer Position Sequence"},
276     {DCM_IDTRANSDUCERPOSITIONMODIFIERSEQ, DCM_SQ, "ID Transducer Position Modifer Sequence"},
277     {DCM_IDTRANSDUCERORIENTATIONSEQ, DCM_SQ, "ID Transducer Orientation Sequence"},
278     {DCM_IDTRANSDUCERORIENTATIONMODIFIERSEQ, DCM_SQ, "ID Transducer Orientation Modifer Sequence"},
279     {DCM_IDCOMMENTS, DCM_RET, "ID Comments (RET)"}
280 };
281 
282 /* Define the entries for the PATIENT INFORMATION group
283 */
284 static DCMDICT PAT_dictionary[] = {
285     {DCM_PATGROUPLENGTH, DCM_UL, "PAT Group Length"},
286     {DCM_PATNAME, DCM_PN, "PAT Patient Name"},
287     {DCM_PATID, DCM_LO, "PAT Patient ID"},
288     {DCM_ISSUERPATIENTID, DCM_LO, "PAT Issuer of Patient ID"},
289     {DCM_PATBIRTHDATE, DCM_DA, "PAT Patient Birthdate"},
290     {DCM_PATBIRTHTIME, DCM_TM, "PAT Patient Birth Time"},
291     {DCM_PATSEX, DCM_CS, "PAT Patient Sex"},
292     {DCM_PATINSURANCEPLANCODESEQ, DCM_SQ, "PAT Patient's Insurance Plan Code Sequence"},
293     {DCM_PATOTHERIDS, DCM_LO, "PAT Other Patient IDs"},
294     {DCM_PATOTHERNAMES, DCM_PN, "PAT Other Patient Names"},
295     {DCM_PATBIRTHNAME, DCM_PN, "PAT Patient's Birth Name "},
296     {DCM_PATAGE, DCM_AS, "PAT Patient Age"},
297     {DCM_PATSIZE, DCM_DS, "PAT Patient Size"},
298     {DCM_PATWEIGHT, DCM_DS, "PAT Patient Weight"},
299     {DCM_PATADDRESS, DCM_LO, "PAT Patient Address"},
300     {DCM_PATINSURANCEPLANID, DCM_RET, "PAT Insurance Plan Identifier"},
301     {DCM_PATMOTHERBIRTHNAME, DCM_PN, "PAT Patient's Mother's Birth Name"},
302     {DCM_PATMILITARYRANK, DCM_LO, "PAT Military Rank"},
303     {DCM_PATBRANCHOFSERVICE, DCM_LO, "PAT Branch of Service"},
304     {DCM_PATMEDICALRECORDLOCATOR, DCM_LO, "PAT Medical Record Locator"},
305     {DCM_PATMEDICALALERTS, DCM_LO, "PAT Medical Alerts"},
306     {DCM_PATCONTRASTALLERGIES, DCM_LO, "PAT Contrast Allergies"},
307     {DCM_COUNTRYOFRESIDENCE, DCM_LO, "PAT Country of Residence"},
308     {DCM_REGIONOFRESIDENCE, DCM_LO, "PAT Region of Residence"},
309     {DCM_PATTELEPHONENUMBER, DCM_SH, "PAT Patient's Telephone Numbers"},
310     {DCM_PATETHNICGROUP, DCM_SH, "PAT Ethnic Group"},
311     {DCM_PATOCCUPATION, DCM_SH, "PAT Occupation"},
312     {DCM_PATSMOKINGSTATUS, DCM_CS, "PAT Smoking Status"},
313     {DCM_PATADDITIONALPATHISTORY, DCM_LT, "PAT Additional Patient History"},
314     {DCM_PATPREGNANCYSTATUS, DCM_US, "PAT Pregnancy Status"},
315     {DCM_PATLASTMENSTRUALDATE, DCM_DA, "PAT Last Menstrual Date"},
316     {DCM_PATRELIGIOUSPREFERENCE, DCM_LO, "PAT Religious Preference"},
317     {DCM_PATCOMMENTS, DCM_LT, "PAT Comments"}
318 };
319 
320 /* Define the entries for the ACQUISITION group, 0018
321 */
322 
323 static DCMDICT ACQ_dictionary[] = {
324     {DCM_ACQGROUPLENGTH, DCM_UL, "ACQ Group Length"},
325     {DCM_ACQCONTRASTBOLUSAGENT, DCM_LO, "ACQ Contrast/Bolus Agent"},
326     {DCM_ACQCONTRASTBOLUSAGENTSEQ, DCM_SQ, "ACQ Contrast/Bolus Agent Sequence"},
327     {DCM_ACQCONTRASTBOLUSADMINROUTESEQ, DCM_SQ, "ACQ Contrast/Bolus Administration Route Seq"},
328     {DCM_ACQBODYPARTEXAMINED, DCM_CS, "ACQ Body Part Examined"},
329     {DCM_ACQSCANNINGSEQUENCE, DCM_CS, "ACQ Scanning Sequence"},
330     {DCM_ACQSEQUENCEVARIANT, DCM_CS, "ACQ Sequence Variant"},
331     {DCM_ACQSCANOPTIONS, DCM_CS, "ACQ Scan Options"},
332     {DCM_ACQMRACQUISITIONTYPE, DCM_CS, "ACQ MR Acquisition Type "},
333     {DCM_ACQSEQUENCENAME, DCM_SH, "ACQ Sequence Name"},
334     {DCM_ACQANGIOFLAG, DCM_CS, "ACQ Angio Flag"},
335     {DCM_ACQINTERVENTIONDRUGINFOSEQ, DCM_SQ, "ACQ Intervention Drug Information Sequence"},
336     {DCM_ACQINTERVENTIONDRUGSTOPTIME, DCM_TM, "ACQ Intervention Drug Stop Time"},
337     {DCM_ACQINTERVENTIONDRUGDOSE, DCM_DS, "ACQ Intervention Drug Dose"},
338     {DCM_ACQINTERVENTIONDRUGCODESEQ, DCM_SQ, "ACQ Intervention Drug Code Sequence"},
339     {DCM_ACQADDITIONALDRUGSEQ, DCM_SQ, "ACQ Additional Drug Sequence"},
340     {DCM_ACQRADIONUCLIDE, DCM_LO, "ACQ Radionuclide (RET)"},
341     {DCM_ACQRADIOPHARMACEUTICAL, DCM_LO, "ACQ Radiopharmaceutical"},
342     {DCM_ACQENERGYWCENTERLINE, DCM_DS, "ACQ Energy Window Centerline (RET)"},
343     {DCM_ACQENERGYWTOTALWIDTH, DCM_DS, "ACQ Energy Window Total Width (RET)"},
344     {DCM_ACQINTERVENTIONDRUGNAME, DCM_LO, "ACQ Intervention Drug Name"},
345     {DCM_ACQINTERVENTIONDRUGSTART, DCM_TM, "ACQ Intervention Drug Start Time"},
346     {DCM_ACQINTERVENTIONALTHERAPYSEQ, DCM_SQ, "ACQ Interventional Therapy Sequence"},
347     {DCM_ACQTHERAPYTYPE, DCM_CS, "ACQ Therapy type"},
348     {DCM_ACQINTERVENTIONALSTATUS, DCM_CS, "ACQ Interventional status"},
349     {DCM_ACQTHERAPYDESCRIPTION, DCM_CS, "ACQ Therapy descriptionm"},
350     {DCM_ACQCINERATE, DCM_IS, "ACQ Cine Rate"},
351     {DCM_ACQSLICETHICKNESS, DCM_DS, "ACQ Slice Thickness"},
352     {DCM_ACQKVP, DCM_DS, "ACQ KVP"},
353     {DCM_ACQCOUNTSACCUMULATED, DCM_IS, "ACQ Counts Accumulated"},
354     {DCM_ACQTERMINATIONCONDITION, DCM_CS, "ACQ Acquisition Termination Condition"},
355     {DCM_ACQEFFECTIVESERIESDURATION, DCM_DS, "ACQ Effective Series Duration"},
356     {DCM_ACQSTARTCONDITION, DCM_CS, "ACQ Start Condition"},
357     {DCM_ACQSTARTCONDITIONDATA, DCM_IS, "ACQ Start Condition Data"},
358     {DCM_ACQTERMINATIONCONDITIONDATA, DCM_IS, "ACQ Termination Condition Data"},
359     {DCM_ACQREPETITIONTIME, DCM_DS, "ACQ Repetition Time"},
360     {DCM_ACQECHOTIME, DCM_DS, "ACQ Echo Time"},
361     {DCM_ACQINVERSIONTIME, DCM_DS, "ACQ Inversion Time"},
362     {DCM_ACQNUMBEROFAVERAGES, DCM_DS, "ACQ Number of Averages"},
363     {DCM_ACQIMAGINGFREQUENCY, DCM_DS, "ACQ Imaging Frequency"},
364     {DCM_ACQIMAGEDNUCLEUS, DCM_SH, "ACQ Imaged Nucleus"},
365     {DCM_ACQECHONUMBER, DCM_IS, "ACQ Echo Number"},
366     {DCM_ACQMAGNETICFIELDSTRENGTH, DCM_DS, "ACQ Magnetic Field Strength"},
367     {DCM_ACQSLICESPACING, DCM_DS, "ACQ Spacing Between Slices"},
368     {DCM_ACQPHASEENCODINGSTEPS, DCM_IS, "ACQ Number of Phase Encoding Steps"},
369     {DCM_ACQDATACOLLECTIONDIAMETER, DCM_DS, "ACQ Data Collection Diameter"},
370     {DCM_ACQECHOTRAINLENGTH, DCM_IS, "ACQ Echo Train Length"},
371     {DCM_ACQPERCENTSAMPLING, DCM_DS, "ACQ Percent Sampling"},
372     {DCM_ACQPERCENTPHASEFIELDVIEW, DCM_DS, "ACQ Percent Phase Field of View"},
373     {DCM_ACQPIXELBANDWIDTH, DCM_DS, "ACQ Pixel Bandwidth"},
374     {DCM_ACQDEVICESERIALNUM, DCM_LO, "ACQ Device Serial Number"},
375     {DCM_ACQPLATEID, DCM_LO, "ACQ Plate ID"},
376     {DCM_ACQSECONDARYCAPTUREDEVID, DCM_LO, "ACQ Secondary Capture Device ID"},
377     {DCM_ACQDATESECONDARYCAPTURE, DCM_DA, "ACQ Date of Secondary Capture"},
378     {DCM_ACQTIMESECONDARYCAPTURE, DCM_TM, "ACQ Time of Secondary Capture"},
379     {DCM_ACQSECONDARYCAPTMANUFACTURER, DCM_LO,
380     "ACQ Secondary Capture Device Manufacturer"},
381     {DCM_ACQSECONDARYCAPTMODEL, DCM_LO, "ACQ Secondary Capture Device Model Name"},
382     {DCM_ACQSECONDARYCAPTSOFTWAREVERSION, DCM_LO,
383     "ACQ Secondary Capture Device Software Version"},
384     {DCM_ACQSOFTWAREVERSION, DCM_LO, "ACQ Software Version"},
385     {DCM_ACQVIDEOIMAGEFORMATACQ, DCM_SH, "ACQ Video Image Format Acquired"},
386     {DCM_ACQDIGITALIMAGEFORMATACQ, DCM_LO, "ACQ Digital Image Format Acquired"},
387     {DCM_ACQPROTOCOLNAME, DCM_LO, "ACQ Protocol Name"},
388     {DCM_ACQCONTRASTBOLUSROUTE, DCM_LO, "ACQ Contrast/Bolus Route"},
389     {DCM_ACQCONTRASTBOLUSVOL, DCM_DS, "ACQ Contrast/Bolus Volume"},
390     {DCM_ACQCONTRASTBOLUSSTARTTIME, DCM_TM, "ACQ Contrast/Bolus Start Time"},
391     {DCM_ACQCONTRASTBOLUSSTOPTIME, DCM_TM, "ACQ Contrast/Bolus Stop Time"},
392     {DCM_ACQCONTRASTBOLUSTOTALDOSE, DCM_DS, "ACQ Contrast/Bolus Total Dose"},
393     {DCM_ACQSYRINGECOUNTS, DCM_IS, "ACQ Syringe Counts"},
394     {DCM_ACQCONTRASTFLOWRATE, DCM_DS, "ACQ Contrast Flow Rate (ml/sec)"},
395     {DCM_ACQCONTRASTFLOWDURATION, DCM_DS, "ACQ Contrast Flow Duration (sec)"},
396     {DCM_ACQCONTRASTBOLUSINGREDIENT, DCM_CS, "ACQ Contrast Bolus Ingredient"},
397     {DCM_ACQCONTRASTBOLUSINGREDIENTCONCENTRATION, DCM_DS, "ACQ Contrast Bolus Ingredient Concentration"},
398     {DCM_ACQSPATIALRESOLUTION, DCM_DS, "ACQ Spatial Resolution"},
399     {DCM_ACQTRIGGERTIME, DCM_DS, "ACQ Trigger Time"},
400     {DCM_ACQTRIGGERSRCTYPE, DCM_LO, "ACQ Trigger Source or Type"},
401     {DCM_ACQNOMINALINTERVAL, DCM_IS, "ACQ Nominal Interval"},
402     {DCM_ACQFRAMETIME, DCM_DS, "ACQ Frame Time"},
403     {DCM_ACQFRAMINGTYPE, DCM_LO, "ACQ Framing Type"},
404     {DCM_ACQFRAMETIMEVECTOR, DCM_DS, "ACQ Frame Time Vector"},
405     {DCM_ACQFRAMEDELAY, DCM_DS, "ACQ Frame Delay"},
406     {DCM_ACQIMAGETRIGGERDELAY, DCM_DS, "ACQ Image Trigger Delay"},      /* Sup 30 0.6 */
407     {DCM_ACQGROUPTIMEOFFSET, DCM_DS, "ACQ Group Time Offset"},  /* Sup 30 0.6 */
408     {DCM_ACQTRIGGERTIMEOFFSET, DCM_DS, "ACQ Trigger Time Offset"},      /* Sup 30 0.6 */
409     {DCM_ACQSYNCTRIGGER, DCM_CS, "ACQ Synchronization Trigger"},        /* Sup 30 0.6 */
410     {DCM_ACQSYNCFRAMEOFREFERENCE, DCM_UI, "ACQ Synchronization Frame of Reference"},    /* Sup 30 0.6 */
411     {DCM_ACQTRIGGERSAMPLEPOSITION, DCM_UL, "ACQ Trigger Sample Position"},      /* Sup 30 0.6 */
412     {DCM_ACQRADIOPHARMROUTE, DCM_LO, "ACQ Radiopharmaceutical Route"},
413     {DCM_ACQRADIOPHARMVOLUME, DCM_DS, "ACQ Radiopharmaceutical Volume"},
414     {DCM_ACQRADIOPHARMSTARTTIME, DCM_TM, "ACQ Radiopharmaceutical Start Time"},
415     {DCM_ACQRADIOPHARMSTOPTIME, DCM_TM, "ACQ Radiopharmaceutical Stop Time"},
416     {DCM_ACQRADIONUCLIDETOTALDOSE, DCM_DS, "ACQ Radionuclide Total Dose"},
417     {DCM_ACQRADIONUCLIDEHALFLIFE, DCM_DS, "ACQ Radionuclide Half Life"},
418     {DCM_ACQRADIONUCLIDEPOSITRONFRACTION, DCM_DS, "ACQ Radionuclide Positron Fraction"},
419     {DCM_ACQRADIOPHARMACEUTICALSPECIFICACTIVITY, DCM_DS,
420     "ACQ Radiopharmaceutical Specific Activity"},
421     {DCM_ACQBEATREJECTIONFLAG, DCM_CS, "ACQ Beat Rejection Flag"},
422     {DCM_ACQLOWRRVALUE, DCM_IS, "ACQ Low R-R Value"},
423     {DCM_ACQHIGHRRVALUE, DCM_IS, "ACQ High R-R Value"},
424     {DCM_ACQINTERVALSACQUIRED, DCM_IS, "ACQ Intervals Acquired"},
425     {DCM_ACQINTERVALSREJECTED, DCM_IS, "ACQ Intervals Rejected"},
426     {DCM_ACQPVCREJECTION, DCM_LO, "ACQ PVC Rejection"},
427     {DCM_ACQSKIPBEATS, DCM_IS, "ACQ Skip Beats"},
428     {DCM_ACQHEARTRATE, DCM_IS, "ACQ Heart Rate"},
429     {DCM_ACQCARDIACNUMBEROFIMAGES, DCM_IS, "ACQ Cardiac Number of Images"},
430     {DCM_ACQTRIGGERWINDOW, DCM_IS, "ACQ Trigger Window"},
431     {DCM_ACQRECONSTRUCTIONDIAMETER, DCM_DS, "ACQ Reconstruction Diameter"},
432     {DCM_ACQDISTANCESRCTODETECTOR, DCM_DS, "ACQ Distance Source-Detector"},
433     {DCM_ACQDISTANCESRCTOPATIENT, DCM_DS, "ACQ Distance Source-Patient"},
434     {DCM_ACQESTIMATEDRADIOGRAPHICMAGFACTOR, DCM_DS, "ACQ Estimated Radiographic Mag Factor"},
435     {DCM_ACQGANTRYTILT, DCM_DS, "ACQ Gantry/Detector Tilt"},
436     {DCM_ACQGANTRYSLEW, DCM_DS, "ACQ Gantry/Detector Slew"},
437     {DCM_ACQTABLEHEIGHT, DCM_DS, "ACQ Table Height"},
438     {DCM_ACQTABLETRAVERSE, DCM_DS, "ACQ Table Traverse"},
439     {DCM_ACQTABLEMOTION, DCM_CS, "ACQ Table Motion (STATIC, DYNAMIC)"},
440     {DCM_ACQTABLEVERTICALINCREMENT, DCM_DS, "ACQ Table Vertical Increment (mm)"},
441     {DCM_ACQTABLELATERALINCREMENT, DCM_DS, "ACQ Table Lateral Increment (mm)"},
442     {DCM_ACQTABLELONGITUDINALINCREMENT, DCM_DS, "ACQ Table Longitudinal Increment (mm)"},
443     {DCM_ACQTABLEANGLE, DCM_DS, "ACQ Table Angle (relative to horizontal: deg)"},
444     {DCM_ACQROTATIONDIRECTION, DCM_CS, "ACQ Rotation Direction"},
445     {DCM_ACQANGULARPOSITION, DCM_DS, "ACQ Angular Position"},
446     {DCM_ACQRADIALPOSITION, DCM_DS, "ACQ Radial Position"},
447     {DCM_ACQSCANARC, DCM_DS, "ACQ Scan Arc"},
448     {DCM_ACQANGULARSTEP, DCM_DS, "ACQ Angular Step"},
449     {DCM_ACQCENTERROTATIONOFFSET, DCM_DS, "ACQ Center of Rotation Offset"},
450     {DCM_ACQROTATIONOFFSET, DCM_DS, "ACQ Rotation Offset (RET)"},
451     {DCM_ACQFIELDOFVIEWSHAPE, DCM_CS, "ACQ Field of View Shape"},
452     {DCM_ACQFIELDOFVIEWDIMENSION, DCM_IS, "ACQ Field of View Dimension(s)"},
453     {DCM_ACQEXPOSURETIME, DCM_IS, "ACQ Exposure Time"},
454     {DCM_ACQXRAYTUBECURRENT, DCM_IS, "ACQ X-ray Tube Current"},
455     {DCM_ACQEXPOSURE, DCM_IS, "ACQ Exposure"},
456     {DCM_ACQAVERAGEPULSEWIDTH, DCM_DS, "ACQ Average width of X-Ray pulse (ms)"},
457     {DCM_ACQRADIATIONSETTING, DCM_CS, "ACQ General level of X-Ray dose exposure"},
458     {DCM_ACQRADIATIONMODE, DCM_CS, "ACQ X-Ray radiation mode (CONTINUOUS, PULSED)"},
459     {DCM_ACQIMAGEAREADOSEPRODUCT, DCM_DS, "ACQ X-Ray dose to which patient was exposed"},
460     {DCM_ACQFILTERTYPE, DCM_SH, "ACQ Filter Type, extremity"},
461     {DCM_ACQTYPEOFFILTERS, DCM_LO, "ACQ Type of filter(s) inserted into X-Ray beam"},
462     {DCM_ACQINTENSIFIERSIZE, DCM_DS, "ACQ Intensifier Size (mm)"},
463     {DCM_ACQIMAGERPIXELSPACING, DCM_DS, "ACQ Image Pixel Spacing"},
464     {DCM_ACQGRID, DCM_CS, "ACQ Grid (IN, NONE)"},
465     {DCM_ACQGENERATORPOWER, DCM_IS, "ACQ Generator Power"},
466     {DCM_ACQCOLLIMATORGRIDNAME, DCM_SH, "ACQ Collimator/Grid Name"},
467     {DCM_ACQCOLLIMATORTYPE, DCM_CS, "ACQ Collimator Type"},
468     {DCM_ACQFOCALDISTANCE, DCM_IS, "ACQ Focal Distance"},
469     {DCM_ACQXFOCUSCENTER, DCM_DS, "ACQ X Focus Center"},
470     {DCM_ACQYFOCUSCENTER, DCM_DS, "ACQ Y Focus Center"},
471     {DCM_ACQFOCALSPOT, DCM_DS, "ACQ Focal Spot"},
472     {DCM_ACQDATELASTCALIBRATION, DCM_DA, "ACQ Date of Last Calibration"},
473     {DCM_ACQTIMELASTCALIBRATION, DCM_TM, "ACQ Time of Last Calibration"},
474     {DCM_ACQCONVOLUTIONKERNEL, DCM_SH, "ACQ Convolution Kernel"},
475     {DCM_ACQUPPERLOWERPIXELVALUES, DCM_RET, "ACQ Upper/Lower Pixel Values (RET)"},
476     {DCM_ACQACTUALFRAMEDURATION, DCM_IS, "ACQ Actual Frame Duration"},
477     {DCM_ACQCOUNTRATE, DCM_IS, "ACQ Count Rate"},
478     {DCM_ACQPREFPLAYBACKSEQUENCING, DCM_US, "ACQ Preferred Playback Sequencing"},
479     {DCM_ACQRECEIVINGCOIL, DCM_SH, "ACQ Receiving Coil"},
480     {DCM_ACQTRANSMITTINGCOIL, DCM_SH, "ACQ Transmitting Coil"},
481     {DCM_ACQPLATETYPE, DCM_SH, "ACQ Plate Type"},
482     {DCM_ACQPHOSPHORTYPE, DCM_LO, "ACQ Phosphor Type"},
483 #if STANDARD_VERSION < VERSION_APR1995
484     {DCM_ACQSCANVELOCITY, DCM_IS, "ACQ Scan Velocity"},
485 #else
486     {DCM_ACQSCANVELOCITY, DCM_DS, "ACQ Scan Velocity"},
487 #endif
488     {DCM_ACQWHOLEBODYTECHNIQUE, DCM_CS, "ACQ Whole Body Technique"},
489     {DCM_ACQSCANLENGTH, DCM_IS, "ACQ Scan Length"},
490     {DCM_ACQACQUISITIONMATRIX, DCM_US, "ACQ Acquisition Matrix"},
491     {DCM_ACQPHASEENCODINGDIRECTION, DCM_CS, "ACQ Phase Encoding Direction"},
492     {DCM_ACQFLIPANGLE, DCM_DS, "ACQ Flip Angle"},
493     {DCM_ACQVARIABLEFLIPANGLE, DCM_CS, "ACQ Variable Flip Angle"},
494     {DCM_ACQSAR, DCM_DS, "ACQ SAR"},
495     {DCM_ACQDBDT, DCM_DS, "ACQ DB/DT"},
496     {DCM_ACQDEVICEPROCESSINGDESCR, DCM_LO, "ACQ Acquisition Device Processing Description"},
497     {DCM_ACQDEVICEPROCESSINGCODE, DCM_LO, "ACQ Acquisition Device Processing Code"},
498     {DCM_ACQCASSETTEORIENTATION, DCM_CS, "ACQ Cassette Orientation"},
499     {DCM_ACQCASSETTESIZE, DCM_CS, "ACQ Cassette Size"},
500     {DCM_ACQEXPOSURESONPLATE, DCM_US, "ACQ Exposures on Plate"},
501     {DCM_ACQRELATIVEXRAYEXPOSURE, DCM_IS, "ACQ Relative X-ray Exposure"},
502     {DCM_ACQCOLUMNANGULATION, DCM_CS, "ACQ Column Angulation"},
503     {DCM_ACQTOMOLAYERHEIGHT, DCM_DS, "ACQ Tomo Layer Height (mm)"},
504     {DCM_ACQTOMOANGLE, DCM_DS, "ACQ Tomo Angle"},
505     {DCM_ACQTOMOTIME, DCM_DS, "ACQ Tomo Time"},
506     {DCM_ACQPOSITIONERMOTION, DCM_CS, "ACQ Positioner Motion"},
507     {DCM_ACQPOSITIONERPRIMARYANGLE, DCM_DS, "ACQ Positioner Primary Angle"},
508     {DCM_ACQPOSITIONERSECONDARYANGLE, DCM_DS, "ACQ Positioner Secondary Angle"},
509     {DCM_ACQPOSITIONERPRIMARYANGLEINCR, DCM_DS, "ACQ Positioner Primary Angle Increment"},
510     {DCM_ACQPOSITIONERSECONDARYANGLEINCR, DCM_DS, "ACQ Positioner Secondary Angle Increment"},
511     {DCM_ACQDETECTORPRIMARYANGLE, DCM_DS, "ACQ Detector Primary Angle"},
512     {DCM_ACQDETECTORSECONDARYANGLE, DCM_DS, "ACQ Detector Secondary Angle"},
513     {DCM_ACQSHUTTERSHAPE, DCM_CS, "ACQ Shutter Shape"},
514     {DCM_ACQSHUTTERLEFTVERTICALEDGE, DCM_IS, "ACQ Shutter Left Vertical Edge"},
515     {DCM_ACQSHUTTERRIGHTVERTICALEDGE, DCM_IS, "ACQ Shutter Right Vertical Edge"},
516     {DCM_ACQSHUTTERUPPERHORIZONTALEDGE, DCM_IS, "ACQ Shutter Upper Horizontal Edge"},
517     {DCM_ACQSHUTTERLOWERHORIZONTALEDGE, DCM_IS, "ACQ Shutter Lower Horizontal Edge"},
518     {DCM_ACQCENTEROFCIRCULARSHUTTER, DCM_IS, "ACQ Center of Circular Shutter"},
519     {DCM_ACQRADIUSOFCIRCULARSHUTTER, DCM_IS, "ACQ Radius of Circular Shutter"},
520     {DCM_ACQVERTICESOFPOLYGONALSHUTTER, DCM_IS, "ACQ Vertices of the Polygonal Shutter"},
521     {DCM_ACQCOLLIMATORSHAPE, DCM_CS, "ACQ Collimator Shape"},
522     {DCM_ACQCOLLIMATORLEFTVERTICALEDGE, DCM_IS, "ACQ Collimator Left Vertical Edge"},
523     {DCM_ACQCOLLIMATORRIGHTVERTICALEDGE, DCM_IS, "ACQ Collimator Right Vertical Edge"},
524     {DCM_ACQCOLLIMATORUPPERHORIZONTALEDGE, DCM_IS, "ACQ Collimator Upper Horizontal Edge"},
525     {DCM_ACQCOLLIMATORLOWERHORIZONTALEDGE, DCM_IS, "ACQ Collimator Lower Horizontal Edge"},
526     {DCM_ACQCENTEROFCIRCULARCOLLIMATOR, DCM_IS, "ACQ Center of Circular Collimator"},
527     {DCM_ACQRADIUSOFCIRCULARCOLLIMATOR, DCM_IS, "ACQ Radius of Circular Collimator"},
528     {DCM_ACQVERTICESOFPOLYGONALCOLLIMATOR, DCM_IS, "ACQ Vertices of the Polygonal Collimator"},
529     {DCM_ACQACQUISITIONTIMESYNCHRONIZED, DCM_CS,
530     "ACQ Acquisition Time Synchronized"},       /* Sup 30 0.7 */
531     {DCM_ACQTIMESOURCE, DCM_SH, "ACQ Time Source"},     /* Sup 30 0.7 */
532     {DCM_ACQTIMEDISTRIBUTIONPROTOCOL, DCM_CS,
533     "ACQ Time Distribution Protocol"},  /* Sup 30 0.7 */
534     {DCM_ACQCOMMENTS, DCM_RET, "ACQ Comments"},
535     {DCM_ACQOUTPUTPOWER, DCM_SH, "ACQ Output Power"},
536     {DCM_ACQTRANSDUCERDATA, DCM_LO, "ACQ Transducer Data"},
537     {DCM_ACQFOCUSDEPTH, DCM_DS, "ACQ Focus Depth"},
538 #if STANDARD_VERSION < VERSION_APR1995
539     {DCM_ACQPREPROCESSINGFUNCTION, DCM_LO, "ACQ Preprocessing Function"},
540 #else
541     {DCM_ACQPROCESSINGFUNCTION, DCM_LO, "ACQ Processing Function"},
542 #endif
543     {DCM_ACQPOSTPROCESSINGFUNCTION, DCM_LO, "ACQ Postprocessing Function"},
544     {DCM_ACQMECHANICALINDEX, DCM_DS, "ACQ Mechanical Index"},
545     {DCM_ACQTHERMALINDEX, DCM_DS, "ACQ Thermal Index"},
546     {DCM_ACQCRANIALTHERMALINDEX, DCM_DS, "ACQ Cranial Thermal Index"},
547     {DCM_ACQSOFTTISSUETHERMALINDEX, DCM_DS, "ACQ Soft Tissue Thermal Index"},
548     {DCM_ACQSOFTTISSUEFOCUSTHERMALINDEX, DCM_DS,
549     "ACQ Soft Tissue-focus Thermal Index"},
550     {DCM_ACQSOFTTISSUESURFACETHERMALINDEX, DCM_CS,
551     "ACQ Soft Tissue-surface Thermal Index"},
552     {DCM_ACQDEPTHOFSCANFIELD, DCM_IS, "ACQ Depth of Scan Field"},
553     {DCM_ACQPATIENTPOSITION, DCM_CS, "ACQ Patient Position"},
554     {DCM_ACQVIEWPOSITION, DCM_CS, "ACQ View Position"},
555     {DCM_ACQIMAGETRANSFORMATIONMATRIX, DCM_DS,
556     "ACQ Image Transformation Matrix"},
557     {DCM_ACQIMAGETRANSLATIONVECTOR, DCM_DS,
558     "ACQ Image Translation Vector"},
559     {DCM_ACQSENSITIVITY, DCM_DS, "ACQ Sensitivity"},
560     {DCM_ACQUSREGIONSEQUENCE, DCM_SQ, "ACQ Ultrasound Region Sequence"},
561     {DCM_ACQREGIONSPATIALFORMAT, DCM_US, "ACQ Region Spatial Format"},
562     {DCM_ACQREGIONDATATYPE, DCM_US, "ACQ Region Data Type"},
563     {DCM_ACQREGIONFLAGS, DCM_UL, "ACQ Region Flags"},
564     {DCM_ACQREGIONLOCATIONMINX0, DCM_UL, "ACQ Region Location Min X(0)"},
565     {DCM_ACQREGIONLOCATIONMINY0, DCM_UL, "ACQ Region Location Min Y(0)"},
566     {DCM_ACQREGIONLOCATIONMAXX1, DCM_UL, "ACQ Region Location Max X(1)"},
567     {DCM_ACQREGIONLOCATIONMAXY1, DCM_UL, "ACQ Region Location Max Y(1)"},
568     {DCM_ACQREFERENCEPIXELX, DCM_SL, "ACQ Reference Pixel X"},
569     {DCM_ACQREFERENCEPIXELY, DCM_SL, "ACQ Reference Pixel Y"},
570     {DCM_ACQPHYSICALUNITSXDIRECTION, DCM_US, "ACQ Physical Units X Direction"},
571     {DCM_ACQPHYSICALUNITSYDIRECTION, DCM_US, "ACQ Physical Units Y Direction"},
572     {DCM_ACQREFPIXELPHYSICALVALUEX, DCM_FD, "ACQ Reference Pixel Physical Value X"},
573     {DCM_ACQREFPIXELPHYSICALVALUEY, DCM_FD, "ACQ Reference Pixel Physical Value Y"},
574     {DCM_ACQPHYSICALDELTAX, DCM_FD, "ACQ Physical Delta X"},
575     {DCM_ACQPHYSICALDELTAY, DCM_FD, "ACQ Physical Delta Y"},
576     {DCM_ACQTRANSDUCERFREQUENCY, DCM_UL, "ACQ Transducer Frequency"},
577     {DCM_ACQTRANSDUCERTYPE, DCM_CS, "ACQ Transducer Type"},
578     {DCM_ACQPULSEREPETITIONFREQ, DCM_UL, "ACQ Pulse Repetition Frequency"},
579     {DCM_ACQDOPPLERCORRECTIONANGLE, DCM_FD, "ACQ Doppler Correction Angle"},
580     {DCM_ACQSTERRINGANGLE, DCM_FD, "ACQ Sterring Angle"},
581     {DCM_ACQDOPPLERSAMPLEVOLXPOS, DCM_UL, "ACQ Doppler Sample Volume X Position"},
582     {DCM_ACQDOPPLERSAMPLEVOLYPOS, DCM_UL, "ACQ Doppler Sample Volume Y Position"},
583     {DCM_ACQTMLINEPOSITIONX0, DCM_UL, "ACQ TM-Line Position X(0)"},
584     {DCM_ACQTMLINEPOSITIONY0, DCM_UL, "ACQ TM-Line Position Y(0)"},
585     {DCM_ACQTMLINEPOSITIONX1, DCM_UL, "ACQ TM-Line Position X(1)"},
586     {DCM_ACQTMLINEPOSITIONY1, DCM_UL, "ACQ TM-Line Position Y(1)"},
587     {DCM_ACQPIXELCOMPORGANIZATION, DCM_US, "ACQ Pixel Component Organization"},
588     {DCM_ACQPIXELCOMPMASK, DCM_UL, "ACQ Pixel Component Mask"},
589     {DCM_ACQPIXELCOMPRANGESTART, DCM_UL, "ACQ Pixel Component Range Start"},
590     {DCM_ACQPIXELCOMPRANGESTOP, DCM_UL, "ACQ Pixel Component Range Stop"},
591     {DCM_ACQPIXELCOMPPHYSUNITS, DCM_US, "ACQ Pixel Component Physical Units"},
592     {DCM_ACQPIXELCOMPDATATYPE, DCM_US, "ACQ Pixel Component Data Type"},
593     {DCM_ACQNUMBERTABLEBREAKPOINTS, DCM_UL, "ACQ Number of Table Break Points"},
594     {DCM_ACQTABLEXBREAKPOINTS, DCM_UL, "ACQ Table of X Break Points"},
595     {DCM_ACQTABLEYBREAKPOINTS, DCM_FD, "ACQ Table of Y Break Points"},
596     {DCM_ACQNUMBEROFTABLEENTRIES, DCM_UL, "ACQ Number of Table Entries"},
597     {DCM_ACQTABLEOFPIXELVALUES, DCM_UL, "ACQ Table of Pixel Values"},
598     {DCM_ACQTABLEOFPARAMETERVALUES, DCM_FL, "ACQ Table of Parameter Values"}
599 };
600 
601 /* Define the entries for the RELATIONSHIP group (0020)
602 */
603 static DCMDICT REL_dictionary[] = {
604     {DCM_RELGROUPLENGTH, DCM_UL, "REL Group Length"},
605     {DCM_RELSTUDYINSTANCEUID, DCM_UI, "REL Study Instance UID"},
606     {DCM_RELSERIESINSTANCEUID, DCM_UI, "REL Series Instance UID"},
607     {DCM_RELSTUDYID, DCM_SH, "REL Study ID"},
608     {DCM_RELSERIESNUMBER, DCM_IS, "REL Series Number"},
609     {DCM_RELACQUISITIONNUMBER, DCM_IS, "REL Acquisition Number"},
610     {DCM_RELIMAGENUMBER, DCM_IS, "REL Image Number"},
611 
612     {DCM_RELISOTOPENUMBER, DCM_IS, "REL Isotope Number (RET)"},
613     {DCM_RELPHASENUMBER, DCM_IS, "REL Phase Number (RET)"},
614     {DCM_RELINTERVALNUMBER, DCM_IS, "REL Interval Number (RET)"},
615     {DCM_RELTIMESLOTNUMBER, DCM_IS, "REL Time Slot Number (RET)"},
616     {DCM_RELANGLENUMBER, DCM_IS, "REL Angle Number (RET)"},
617 
618     {DCM_RELPATIENTORIENTATION, DCM_CS, "REL Patient Orientation"},
619     {DCM_RELOVERLAYNUMBER, DCM_IS, "REL Overlay Number"},
620     {DCM_RELCURVENUMBER, DCM_IS, "REL Curve Number"},
621     {DCM_RELLOOKUPTABLENUMBER, DCM_IS, "REL Looup Table Number"},
622     {DCM_RELIMAGEPOSITION, DCM_RET, "REL Image Position (RET)"},
623     {DCM_RELIMAGEPOSITIONPATIENT, DCM_DS, "REL Image Position Patient"},
624     {DCM_RELIMAGEORIENTATION, DCM_RET, "REL Image Orientation"},
625     {DCM_RELIMAGEORIENTATIONPATIENT, DCM_DS, "REL Image Orientation (Patient)"},
626     {DCM_RELLOCATION, DCM_RET, "REL Location (RET)"},
627     {DCM_RELFRAMEOFREFERENCEUID, DCM_UI, "REL Frame of Reference UID"},
628     {DCM_RELLATERALITY, DCM_CS, "REL Laterality"},
629     {DCM_RELIMAGEGEOMETRYTYPE, DCM_RET, "REL Image Geometry Type (RET)"},
630     {DCM_RELMASKINGIMAGE, DCM_RET, "REL Masking Image (RET)"},
631     {DCM_RELTEMPORALPOSITIONID, DCM_IS, "REL Temporal Position Identifier"},
632     {DCM_RELNUMBERTEMPORALPOSITIONS, DCM_IS, "REL Number of Temporal Positions"},
633     {DCM_RELTEMPORALRESOLUTION, DCM_DS, "REL Temporal Resolution"},
634     {DCM_RELSERIESINSTUDY, DCM_IS, "REL Series in Study"},
635     {DCM_RELACQUISITIONSINSERIES, DCM_RET, "REL Acquisitions in Series"},
636     {DCM_RELIMAGESINACQUISITION, DCM_IS, "REL Images in Acquisition"},
637     {DCM_RELACQUISITIONSINSTUDY, DCM_IS, "REL Acquisitions in Study"},
638     {DCM_RELREFERENCE, DCM_RET, "REL Reference (RET)"},
639     {DCM_RELPOSITIONREFINDICATOR, DCM_LO, "REL Position Reference Indicator"},
640     {DCM_RELSLICELOCATION, DCM_DS, "REL Slice Location"},
641     {DCM_RELOTHERSTUDYNUMBERS, DCM_IS, "REL Other Study Numbers"},
642     {DCM_RELNUMBERPATRELATEDSTUDIES, DCM_IS,
643     "REL Number of Patient Related Studies"},
644     {DCM_RELNUMBERPATRELATEDSERIES, DCM_IS, "REL Number of Patient Related Series"},
645     {DCM_RELNUMBERPATRELATEDIMAGES, DCM_IS, "REL Number of Patient Related Images"},
646     {DCM_RELNUMBERSTUDYRELATEDSERIES, DCM_IS, "REL Number of Study Related Series"},
647     {DCM_RELNUMBERSTUDYRELATEDIMAGES, DCM_IS, "REL Number of Study Related Images"},
648     {DCM_RELSOURCEIMAGEID, DCM_RET, "REL Source Image IDs (RET)"},
649     {DCM_RELMODIFYINGDEVICEID, DCM_RET, "REL Modifying Device ID (RET)"},
650     {DCM_RELMODIFIEDIMAGEID, DCM_RET, "REL Modified Image ID (RET)"},
651     {DCM_RELMODIFIEDIMAGEDATE, DCM_RET, "REL Modified Image Date (RET)"},
652     {DCM_RELMODIFYINGDEVICEMFR, DCM_RET, "REL Modifying Device Mfr (RET)"},
653     {DCM_RELMODIFIEDIMAGETIME, DCM_RET, "REL Modified Image Time"},
654     {DCM_RELMODIFIEDIMAGEDESCRIPTION, DCM_RET,
655     "REL Modified Image Description (RET)"},
656     {DCM_RELIMAGECOMMENTS, DCM_LT, "REL Image Comments"},
657     {DCM_RELORIGINALIMAGEID, DCM_RET, "REL Original Image ID (RET)"},
658     {DCM_RELORIGINALIMAGEIDNOMENCLATURE, DCM_RET,
659     "REL Orig Image ID Nomenclature (RET)"}
660 };
661 
662 /* Define the entries for the IMAGE group (0028)
663 */
664 static DCMDICT IMG_dictionary[] = {
665     {DCM_IMGGROUPLENGTH, DCM_UL, "IMG Group Length"},
666     {DCM_IMGSAMPLESPERPIXEL, DCM_US, "IMG Samples Per Pixel"},
667     {DCM_IMGPHOTOMETRICINTERP, DCM_CS, "IMG Photometric Interpretation"},
668     {DCM_IMGIMAGEDIMENSIONS, DCM_RET, "IMG Image Dimensions (RET)"},
669     {DCM_IMGPLANARCONFIGURATION, DCM_US, "IMG Planar Configuration"},
670     {DCM_IMGNUMBEROFFRAMES, DCM_IS, "IMG Number of Frames"},
671     {DCM_IMGFRAMEINCREMENTPOINTER, DCM_AT, "IMG Frame Increment Pointer"},
672     {DCM_IMGROWS, DCM_US, "IMG Rows"},
673     {DCM_IMGCOLUMNS, DCM_US, "IMG Columns"},
674     {DCM_IMGPLANES, DCM_US, "IMG Planes"},
675     {DCM_IMGUSOUNDCOLORDATAPRESENT, DCM_US, "IMG Ultrasound Color Data Present"},
676     {DCM_IMGPIXELSPACING, DCM_DS, "IMG Pixel Spacing"},
677     {DCM_IMGZOOMFACTOR, DCM_DS, "IMG Zoom Factor"},
678     {DCM_IMGZOOMCENTER, DCM_DS, "IMG Zoom Center"},
679     {DCM_IMGPIXELASPECTRATIO, DCM_IS, "IMG Pixel Aspect Ratio"},
680     {DCM_IMGIMAGEFORMAT, DCM_RET, "IMG Image Format (RET)"},
681     {DCM_IMGMANIPULATEDIMAGE, DCM_RET, "IMG Manipulated Image (RET)"},
682     {DCM_IMGCORRECTEDIMAGE, DCM_CS, "IMG Corrected Image"},
683     {DCM_IMGCOMPRESSIONCODE, DCM_RET, "IMG Compression Code"},
684     {DCM_IMGBITSALLOCATED, DCM_US, "IMG Bits Allocated"},
685     {DCM_IMGBITSSTORED, DCM_US, "IMG Bits Stored"},
686     {DCM_IMGHIGHBIT, DCM_US, "IMG High Bit"},
687     {DCM_IMGPIXELREPRESENTATION, DCM_US, "IMG Pixel Representation"},
688     {DCM_IMGSMALLESTPIXELVALUE, DCM_RET, "IMG Smallest Pixel Value (RET)"},
689     {DCM_IMGLARGESTPIXELVALUE, DCM_RET, "IMG Largest Pixel Vaue (RET)"},
690     {DCM_IMGSMALLESTIMAGEPIXELVALUE, DCM_CTX, "IMG Smallest Image Pixel Value"},
691     {DCM_IMGLARGESTIMAGEPIXELVALUE, DCM_CTX, "IMG Largest Image Pixel Value"},
692     {DCM_IMGSMALLESTPIXELVALUESERIES, DCM_CTX, "IMG Smallest Pixel Value in Series"},
693     {DCM_IMGLARGESTPIXELVALUESERIES, DCM_CTX, "IMG Largest Pixel Value in Series"},
694     {DCM_IMGSMALLESTIMAGEPIXELVALUEPLANE, DCM_CTX, "IMG Smallest Pixel Value in Plane"},
695     {DCM_IMGLARGESTIMAGEPIXELVALUEPLANE, DCM_CTX, "IMG Largest Pixel Value in Plane"},
696     {DCM_IMGPIXELPADDINGVALUE, DCM_CTX, "IMG Pixel Padding Value"},
697     {DCM_IMGWAVEFORMPADDINGVALUE, DCM_CTX, "IMG Waveform Padding Value"},       /* Sup 30 0.6 */
698     {DCM_IMGIMAGELOCATION, DCM_RET, "IMG Image Location"},
699     {DCM_IMGPIXELINTENSITYRELATIONSHIP, DCM_CS, "IMG Pixel Intensity Relationship"},
700     {DCM_IMGWINDOWCENTER, DCM_DS, "IMG Window Center"},
701     {DCM_IMGWINDOWWIDTH, DCM_DS, "IMG Window Width"},
702     {DCM_IMGRESCALEINTERCEPT, DCM_DS, "IMG Rescale Intercept"},
703     {DCM_IMGRESCALESLOPE, DCM_DS, "IMG Rescale Slope"},
704     {DCM_IMGRESCALETYPE, DCM_LO, "IMG Rescale Type"},
705     {DCM_IMGWINDOWCWEXPLANATION, DCM_LO, "IMG Window Center & Width Explanation"},
706     {DCM_IMGGRAYSCALE, DCM_RET, "IMG Gray Scale (RET)"},
707     {DCM_IMGRECOMMENDEDVIEWINGMODE, DCM_CS, "IMG Recommended Viewing Mode"},
708     {DCM_IMGLUTDESCRIPTGRAY, DCM_RET, "IMG Lookup Table Desc-Gray (RET)"},
709     {DCM_IMGLUTDESCRIPTRED, DCM_US, "IMG Lookup Table Desc-Red"},
710     {DCM_IMGLUTDESCRIPTGREEN, DCM_US, "IMG Lookup Table Desc-Green"},
711     {DCM_IMGLUTDESCRIPTBLUE, DCM_US, "IMG Lookup Table Desc-Blue"},
712     {DCM_IMGPALETTECOLORLUTUID, DCM_UI, "IMG Palette Color Lookup Table UID"},
713     {DCM_IMGLOOKUPDATAGRAY, DCM_RET, "IMG Lookup Data-Gray"},
714 
715 #if 0
716     /* As originally defined in 1993 */
717     {DCM_IMGLOOKUPDATARED, DCM_US, "IMG Lookup Data-Red"},
718     {DCM_IMGLOOKUPDATAGREEN, DCM_US, "IMG Lookup Data-Green"},
719     {DCM_IMGLOOKUPDATABLUE, DCM_US, "IMG Lookup Data-Blue"},
720 #endif
721 
722     {DCM_IMGLOOKUPDATARED, DCM_CTX, "IMG Lookup Data-Red"},
723     {DCM_IMGLOOKUPDATAGREEN, DCM_CTX, "IMG Lookup Data-Green"},
724     {DCM_IMGLOOKUPDATABLUE, DCM_CTX, "IMG Lookup Data-Blue"},
725 
726     {DCM_IMGSEGMENTEDREDLUTDATA, DCM_OW, "IMG Segmented Red Palette Color LUT Data"},
727     {DCM_IMGSEGMENTEDGREENLUTDATA, DCM_OW, "IMG Segmented Green Palette Color LUT Data"},
728     {DCM_IMGSEGMENTEDBLUELUTDATA, DCM_OW, "IMG Segmented Blue Palette Color LUT Data"},
729 
730     {DCM_IMGLOSSYIMAGECOMPRESSION, DCM_CS, "IMG Lossy Image Compression"},
731     {DCM_IMGMODALITYLUTSEQUENCE, DCM_SQ, "IMG Modality LUT Sequence"},
732     {DCM_IMGLUTDESCRIPTOR, DCM_CTX, "IMG LUT Descriptor"},
733     {DCM_IMGLUTEXPLANATION, DCM_LO, "IMG LUT Explanation"},
734     {DCM_IMGMODALITYLUTTYPE, DCM_LO, "IMG Modality LUT Type"},
735     {DCM_IMGLUTDATA, DCM_CTX, "IMG LUT Data"},
736     {DCM_IMGVOILUTSEQUENCE, DCM_SQ, "IMG VOI LUT Sequence"},
737     {DCM_IMGCOMMENTS, DCM_RET, "IMG Comments (RET)"},
738     {DCM_IMGBIPLANEACQSEQUENCE, DCM_SQ, "IMG Bi-Plane Acquisition Sequence"},
739     {DCM_IMGREPRESENTATIVEFRAMENUMBER, DCM_US, "IMG Representative Frame Number"},
740     {DCM_IMGFRAMENUMBERSOFINTEREST, DCM_US, "IMG Frame Numbers of Interest"},
741     {DCM_IMGFRAMEOFINTERESTDESCRIPTION, DCM_LO, "IMG Frame of Interest Description"},
742     {DCM_IMGMASKPOINTER, DCM_US, "IMG Mask Pointer(s)"},
743     {DCM_IMGRWAVEPOINTER, DCM_US, "IMG R Wave Pointer"},
744     {DCM_IMGMASKSUBTRACTIONSEQ, DCM_SQ, "IMG Mask Subtraction Sequence"},
745     {DCM_IMGMASKOPERATION, DCM_CS, "IMG Mask Operation"},
746     {DCM_IMGAPPLICABLEFRAMERANGE, DCM_US, "IMG Applicable Frame Range"},
747     {DCM_IMGMASKFRAMENUMBERS, DCM_US, "IMG Mask Frame Numbers"},
748     {DCM_IMGCONTRASTFRAMEAVERAGING, DCM_US, "IMG Contrast Frame Averaging"},
749     {DCM_IMGMASKSUBPIXELSHIFT, DCM_FL, "IMG Mask Sub-pixel shift"},
750     {DCM_IMGTIDOFFSET, DCM_SS, "IMG TID Offset"},
751     {DCM_MASKOPERATIONEXPLANATION, DCM_ST, "IMG Mask Operation Explanation"}
752 };
753 
754 /* Define the entries for the STUDY group (0032)
755 */
756 static DCMDICT SDY_dictionary[] = {
757     {DCM_SDYGROUPLENGTH, DCM_UL, "SDY Study Group length"},
758     {DCM_SDYSTATUSID, DCM_CS, "SDY Study Status ID"},
759     {DCM_SDYPRIORITYID, DCM_CS, "SDY Study Priority ID"},
760     {DCM_SDYIDISSUER, DCM_LO, "SDY Study ID Issuer"},
761     {DCM_SDYVERIFIEDDATE, DCM_DA, "SDY Study Verified Date"},
762     {DCM_SDYVERIFIEDTIME, DCM_TM, "SDY Study Verified Time"},
763     {DCM_SDYREADDATE, DCM_DA, "SDY Study Read Date"},
764     {DCM_SDYREADTIME, DCM_TM, "SDY Study Read Time"},
765     {DCM_SDYSCHEDULEDSTARTDATE, DCM_DA, "SDY Scheduled Study Start Date"},
766     {DCM_SDYSCHEDULEDSTARTTIME, DCM_TM, "SDY Scheduled Study Start Time"},
767     {DCM_SDYSCHEDULEDSTOPDATE, DCM_DA, "SDY Scheduled Study Stop Date"},
768     {DCM_SDYSCHEDULEDSTOPTIME, DCM_TM, "SDY Scheduled Study Stop Time"},
769     {DCM_SDYSCHEDULEDLOCATION, DCM_LO, "SDY Scheduled Study Location"},
770     {DCM_SDYSCHEDULEDLOCATIONAETITLE, DCM_AE,
771     "SDY Scheduled Study Location AE Title(s)"},
772     {DCM_SDYREASON, DCM_LO, "SDY Study Reason"},
773     {DCM_SDYREQUESTINGPHYSICIAN, DCM_PN, "SDY Requesting Physician "},
774     {DCM_SDYREQUESTINGSERVICE, DCM_LO, "SDY Requesting Service"},
775     {DCM_SDYARRIVALDATE, DCM_DA, "SDY Study Arrival Date"},
776     {DCM_SDYARRIVALTIME, DCM_TM, "SDY Study Arrival Time"},
777     {DCM_SDYCOMPLETIONDATE, DCM_DA, "SDY Study Completion Date"},
778     {DCM_SDYCOMPLETIONTIME, DCM_TM, "SDY Study Completion Time"},
779     {DCM_SDYSTUDYCOMPONENTSTATUSID, DCM_CS, "SDY Study Component Status ID"},
780     {DCM_SDYREQUESTEDPRODESCRIPTION, DCM_LO, "SDY Requested Procedure Description"},
781     {DCM_SDYREQUESTEDPROCODESEQ, DCM_SQ, "SDY Requested Procedure Code"},
782     {DCM_SDYREQUESTEDCONTRASTAGENT, DCM_LO, "SDY Requested Contrast Agent"},
783     {DCM_SDYCOMMENTS, DCM_LT, "SDY Comments"}
784 };
785 
786 /* Define the entries for the VISIT group, 0038
787 */
788 static DCMDICT VIS_dictionary[] = {
789     {DCM_VISGROUPLENGTH, DCM_UL, "VIS Group Length"},
790     {DCM_VISREFERENCEDPATALIASSEQ, DCM_SQ, "VIS Referenced Patient Alias Sequence"},
791     {DCM_VISSTATUSID, DCM_CS, "VIS Visit Status ID"},
792     {DCM_VISADMISSIONID, DCM_LO, "VIS Admission ID"},
793     {DCM_VISISSUEROFADMISSIONID, DCM_LO, "VIS Issuer of Admission ID"},
794     {DCM_VISROUTEOFADMISSION, DCM_LO, "VIS Route of Admission"},
795     {DCM_VISSCHEDULEDADMISSIONDATE, DCM_DA, "VIS Scheduled Admission Date"},
796     {DCM_VISSCHEDULEDADMISSIONTIME, DCM_TM, "VIS Scheduled Admission Time"},
797     {DCM_VISSCHEDULEDDISCHARGEDATE, DCM_DA, "VIS Scheduled Discharge Date"},
798     {DCM_VISSCHEDULEDDISCHARGETIME, DCM_TM, "VIS Scheduled Discharge Time"},
799     {DCM_VISSCHEDULEDPATINSTRESIDENCE, DCM_LO, "VIS Scheduled Patient Institution Residence"},
800     {DCM_VISADMITTINGDATE, DCM_DA, "VIS Admitting Date"},
801     {DCM_VISADMITTINGTIME, DCM_TM, "VIS Admitting Time"},
802     {DCM_VISDISCHARGEDATE, DCM_DA, "VIS Discharge Date"},
803     {DCM_VISDISCHARGETIME, DCM_TM, "VIS Discharge Time"},
804     {DCM_VISDISCHARGEDIAGDESCRIPTION, DCM_LO, "VIS Discharge Diagnosis Description"},
805     {DCM_VISDISCHARGEDIAGNOSISCODESEQ, DCM_SQ, "VIS Discharge Diagnosis Code Sequence"},
806     {DCM_VISSPECIALNEEDS, DCM_LO, "VIS Special Needs"},
807     {DCM_VISCURRENTPATIENTLOCATION, DCM_LO, "VIS Current Patient Location"},
808     {DCM_VISPATIENTSINSTRESIDENCE, DCM_LO, "VIS Patient's Institution Residence"},
809     {DCM_VISPATIENTSTATE, DCM_LO, "VIS Patient State"},
810     {DCM_VISCOMMENTS, DCM_LT, "VIS Comments"}
811 };
812 
813 /* Define the entries for the Waveform group, 003a
814 */
815 static DCMDICT WAV_dictionary[] = {
816     {DCM_MAKETAG(0x003a, 0x0000), DCM_UL, "WAV Group Length"},
817     {DCM_MAKETAG(0x003a, 0x0002), DCM_SQ, "WAV Waveform Sequence"},     /* Sup 30 0.6 */
818     {DCM_MAKETAG(0x003a, 0x0005), DCM_US, "WAV Number of Channels"},    /* Sup 30 0.6 */
819     {DCM_MAKETAG(0x003a, 0x0010), DCM_UL, "WAV Number of Samples"},     /* Sup 30 0.6 */
820     {DCM_MAKETAG(0x003a, 0x001a), DCM_DS, "WAV Sampling Frequency"},    /* Sup 30 0.6 */
821     {DCM_MAKETAG(0x003a, 0x0020), DCM_SH, "WAV Group Label"},   /* Sup 30 0.6 */
822     {DCM_MAKETAG(0x003a, 0x0103), DCM_CS, "WAV Data Value Representation"},     /* Sup 30 0.6 */
823     {DCM_MAKETAG(0x003a, 0x0200), DCM_SQ, "WAV Channel Definition"},    /* Sup 30 0.6 */
824     {DCM_MAKETAG(0x003a, 0x0202), DCM_IS, "WAV Channel Number"},        /* Sup 30 0.6 */
825     {DCM_MAKETAG(0x003a, 0x0203), DCM_SH, "WAV Channel Label"}, /* Sup 30 0.6 */
826     {DCM_MAKETAG(0x003a, 0x0205), DCM_CS, "WAV Channel Status"},        /* Sup 30 0.6 */
827     {DCM_MAKETAG(0x003a, 0x0208), DCM_SQ, "WAV Waveform Source"},       /* Sup 30 0.6 */
828     {DCM_MAKETAG(0x003a, 0x0209), DCM_SQ, "WAV Waveform Source Modifiers"},     /* Sup 30 0.6 */
829     {DCM_MAKETAG(0x003a, 0x020a), DCM_SQ, "WAV Differential Waveform Source"},  /* Sup 30 0.6 */
830     {DCM_MAKETAG(0x003a, 0x020b), DCM_SQ, "WAV Differential Waveform Source Modifiers"},        /* Sup 30 0.6 */
831     {DCM_MAKETAG(0x003a, 0x0210), DCM_DS, "WAV Channel Sensitivity"},   /* Sup 30 0.6 */
832     {DCM_MAKETAG(0x003a, 0x0211), DCM_SQ, "WAV Channel Sensitivity Units"},     /* Sup 30 0.6 */
833     {DCM_MAKETAG(0x003a, 0x0212), DCM_DS, "WAV Channel Sensitivity Correction Factor"}, /* Sup 30 0.6 */
834     {DCM_MAKETAG(0x003a, 0x0213), DCM_DS, "WAV Channel Baseline"},      /* Sup 30 0.6 */
835     {DCM_MAKETAG(0x003a, 0x0214), DCM_DS, "WAV Channel Time Skew"},     /* Sup 30 0.6 */
836     {DCM_MAKETAG(0x003a, 0x0215), DCM_DS, "WAV Channel Sample Skew"},   /* Sup 30 0.6 */
837     {DCM_MAKETAG(0x003a, 0x0218), DCM_DS, "WAV Channel Offset"},        /* Sup 30 0.6 */
838     {DCM_MAKETAG(0x003a, 0x021a), DCM_US, "WAV Bits Per Sample"},       /* Sup 30 0.6 */
839     {DCM_MAKETAG(0x003a, 0x0216), DCM_CTX, "WAV Channel Minimum Value"},        /* Sup 30 0.6 */
840     {DCM_MAKETAG(0x003a, 0x0217), DCM_CTX, "WAV Channel Maximum Value"},        /* Sup 30 0.6 */
841     {DCM_MAKETAG(0x003a, 0x0220), DCM_DS, "WAV Filter Low Frequency"},  /* Sup 30 0.6 */
842     {DCM_MAKETAG(0x003a, 0x0221), DCM_DS, "WAV Filter High Frequency"}, /* Sup 30 0.6 */
843     {DCM_MAKETAG(0x003a, 0x0222), DCM_DS, "WAV Notch Filter Frequency"},        /* Sup 30 0.6 */
844     {DCM_MAKETAG(0x003a, 0x0223), DCM_DS, "WAV Notch Filter Bandwidth"},        /* Sup 30 0.6 */
845     {DCM_MAKETAG(0x003a, 0x1000), DCM_CTX, "WAV Waveform Data"} /* Sup 30 0.6 */
846 };
847 
848 /* Define the entries for the Procedure Step group, 0040
849 */
850 
851 static DCMDICT PRC_dictionary[] = {
852     {DCM_PRCGROUPLENGTH, DCM_UL, "PRC Group Length"},
853     {DCM_PRCSCHEDULEDSTATIONAETITLE, DCM_AE, "PRC Scheduled Station AE Title"},
854     {DCM_PRCSCHEDULEDPROCSTEPSTARTDATE, DCM_DA, "PRC Scheduled Procedure Step Start Date"},
855     {DCM_PRCSCHEDULEDPROCSTEPSTARTTIME, DCM_TM, "PRC Scheduled Procedure Step Start Time"},
856     {DCM_PRCSCHEDULEDPROCSTEPENDDATE, DCM_DA, "PRC Scheduled Procedure Step End Date"},
857     {DCM_PRCSCHEDULEDPROCSTEPENDTIME, DCM_TM, "PRC Scheduled Procedure Step End Time"},
858     {DCM_PRCSCHEDULEDPERFORMINGPHYSNAME, DCM_PN, "PRC Scheduled Performing Physician's Name"},
859     {DCM_PRCSCHEDULEDPROCSTEPDESCRIPTION, DCM_LO, "PRC Scheduled Step Description"},
860     {DCM_PRCSCHEDULEDACTIONITEMCODESEQ, DCM_SQ, "PRC Scheduled Action Item Code Sequence"},
861     {DCM_PRCSCHEDULEDPROCSTEPID, DCM_SH, "PRC Scheduled Step ID"},
862     {DCM_PRCSCHEDULEDSTATIONNAME, DCM_SH, "PRC Scheduled Station Name"},
863     {DCM_PRCSCHEDULEDPROCSTEPLOCATION, DCM_SH, "PRC Scheduled Procedure Step Location"},
864     {DCM_PRCPREMEDICATION, DCM_LO, "PRC Pre-Medication"},
865     {DCM_PRCSCHEDULEDPROCSTEPSEQ, DCM_SQ, "PRC Scheduled Procedure Step Sequence"},
866     {DCM_PRCCOMMENTSONSCHEDULEDPROCSTEP, DCM_LT, "PRC Comments on the Scheduled Procedure Step"},
867     {DCM_MAKETAG(0x0040, 0x050a), DCM_LO, "PRC Specimen Accession Number"},     /* Sup 15 */
868     {DCM_MAKETAG(0x0040, 0x0550), DCM_SQ, "PRC Specimen Sequence"},     /* Sup 15 */
869     {DCM_MAKETAG(0x0040, 0x0551), DCM_LO, "PRC Specimen Identifier"},   /* Sup 15 */
870     {DCM_MAKETAG(0x0040, 0x0552), DCM_SQ, "PRC Specimen Description Sequence"}, /* Sup 15 */
871     {DCM_MAKETAG(0x0040, 0x0553), DCM_ST, "PRC Specimen Description"},  /* Sup 15 */
872     {DCM_MAKETAG(0x0040, 0x0555), DCM_SQ, "PRC Acquisition Context Sequence"},  /* Sup 15 */
873     {DCM_MAKETAG(0x0040, 0x0556), DCM_ST, "PRC Acquisition Context Description"},       /* Sup 15 */
874     {DCM_MAKETAG(0x0040, 0x059a), DCM_SQ, "PRC Specimen Type Code Sequence"},   /* Sup 15 */
875     {DCM_MAKETAG(0x0040, 0x06fa), DCM_LO, "PRC Slide Identifier"},      /* Sup 15 */
876     {DCM_MAKETAG(0x0040, 0x071a), DCM_SQ, "PRC Image Center Point Coordinates Sequence"},       /* Sup 15 */
877     {DCM_MAKETAG(0x0040, 0x072a), DCM_DS, "PRC X offset in Slide Coordinate System"},   /* Sup 15 */
878     {DCM_MAKETAG(0x0040, 0x073a), DCM_DS, "PRC Y offset in Slide Coordinate System"},   /* Sup 15 */
879     {DCM_MAKETAG(0x0040, 0x074a), DCM_DS, "PRC Z offset in Slide Coordinate System"},   /* Sup 15 */
880     {DCM_MAKETAG(0x0040, 0x08d8), DCM_SQ, "PRC Pixel Spacing Sequence"},        /* Sup 15 */
881     {DCM_MAKETAG(0x0040, 0x08da), DCM_SQ, "PRC Coordinate System Axis Code Sequence"},  /* Sup 15 */
882     {DCM_MAKETAG(0x0040, 0x08ea), DCM_SQ, "PRC Measurement Units Code Sequence"},       /* Sup 15 */
883     {DCM_MAKETAG(0x0040, 0x09f8), DCM_SQ, "PRC Vital Stain Code Sequence"},     /* Sup 15 */
884     {DCM_PRCREQUESTEDPROCEDUREID, DCM_SH, "PRC Requested Procedure ID"},
885     {DCM_PRCREASONFORREQUESTEDPROC, DCM_LO, "PRC Reason for the Requested Procedure"},
886     {DCM_PRCREQUESTEDPROCPRIORITY, DCM_SH, "PRC Patient Transport Arrangements"},
887     {DCM_PRCPATIENTTRANSPORTARRANGEMENTS, DCM_LO, "PRC Patient Transport Arrangements"},
888     {DCM_PRCREQUESTEDPROCLOCATION, DCM_LO, "PRC Requested Procedure Location"},
889     {DCM_PRCPLACERORDERNUMBERPROC, DCM_SH, "PRC Placer Order Number / Procedure"},
890 
891     {DCM_PRCFILLERORDERNUMBERPROC, DCM_SH, "PRC Filler Order Number / Procedure"},
892     {DCM_PRCCONFIDENTIALITYCODE, DCM_LO, "PRC Confidentiality Code"},
893     {DCM_PRCREPORTINGPRIORITY, DCM_SH, "PRC  Reporting Priority"},
894     {DCM_PRCNAMESINTENDEDRECIPIENTSRESULTS, DCM_PN, "PRC Names of Intended Recipients of Results"},
895     {DCM_PRCREQUESTEDPROCCOMMENTS, DCM_LT, "PRC Requested Procedure Comments"},
896     {DCM_PRCREASONFORIMAGINGSERVICEREQ, DCM_LO, "PRC Reason for teh Imaging Service Request"},
897     {DCM_PRCISSUEDATEIMAGINGSERVICEREQ, DCM_DA, "PRC Issue Date of Imaging Service Request"},
898     {DCM_PRCISSUETIMEIMAGINGSERVICEREQ, DCM_TM, "PRC Issue Time of Imaging Service Request"},
899     {DCM_PRCPLACERORDERNUMBERIMAGINGSRVREQ, DCM_SH, "PRC Placer Order Number/Imaging Service Request"},
900     {DCM_PRCFILLERORDERNUMBERIMAGINGSRVREQ, DCM_SH, "PRC Filler Order Number/Imaging Service Request"},
901     {DCM_PRCORDERENTEREDBY, DCM_PN, "PRC Order Entered By"},
902     {DCM_PRCORDERENTERERSLOCATION, DCM_SH, "PRC Order Enterer's Location"},
903     {DCM_PRCORDERCALLBACKPHONENUMBER, DCM_SH, "PRC Order Callback Phone Number"},
904     {DCM_PRCIMAGINGSERVICEREQCOMMENTS, DCM_LT, "PRC Imaging Service Request Comments"},
905     {DCM_PRCCONFIDIENTIALITYCONSTRAINTPATIENTDATADES, DCM_LO, "PRC Confidientiality Constraint Patient Data..."},
906 
907     {DCM_MAKETAG(0x0040, 0xa043), DCM_SQ, "PRC Concept-name Code Sequence"},    /* Sup 15 */
908     {DCM_MAKETAG(0x0040, 0xa0a0), DCM_CS, "PRC Referenced Type of Data"},       /* Sup 30 0.6 */
909     {DCM_MAKETAG(0x0040, 0xa0b0), DCM_US, "PRC Referenced Waveform Channels"},  /* Sup 30 0.6 */
910     {DCM_MAKETAG(0x0040, 0xa121), DCM_DA, "PRC Date"},  /* Sup 15 */
911     {DCM_MAKETAG(0x0040, 0xa122), DCM_TM, "PRC Time"},  /* Sup 15 */
912     {DCM_MAKETAG(0x0040, 0xa123), DCM_PN, "PRC Person Name"},   /* Sup 15 */
913     {DCM_MAKETAG(0x0040, 0xa130), DCM_CS, "PRC Temporal Range Type"},   /* Sup 30 0.6 */
914     {DCM_MAKETAG(0x0040, 0xa132), DCM_UL, "PRC Referenced Sample Offsets"},     /* Sup 30 0.6 */
915     {DCM_MAKETAG(0x0040, 0xa138), DCM_DS, "PRC Referenced Time Offsets"},       /* Sup 30 0.6 */
916     {DCM_MAKETAG(0x0040, 0xa13a), DCM_DT, "PRC Referenced Datetime"},   /* Sup 30 0.6 */
917     {DCM_MAKETAG(0x0040, 0xa168), DCM_SQ, "PRC Concept Code Sequence"}, /* Sup 15 */
918     {DCM_MAKETAG(0x0040, 0xa16a), DCM_ST, "PRC Bibliographics Citation"},       /* Sup 15 */
919     {DCM_MAKETAG(0x0040, 0xa180), DCM_US, "PRC Annotation Group Number"},       /* Sup 30 0.6 */
920     {DCM_MAKETAG(0x0040, 0xa195), DCM_SQ, "PRC Concept-name Code Sequence Modifier"},   /* Sup 15 */
921     {DCM_MAKETAG(0x0040, 0xa30a), DCM_DS, "PRC Numeric Value"}, /* Sup 15 */
922     {DCM_MAKETAG(0x0040, 0xa353), DCM_ST, "PRC Address"},       /* Sup 15 */
923     {DCM_MAKETAG(0x0040, 0xa354), DCM_LO, "PRC Telephone Number"},      /* Sup 15 */
924     {DCM_MAKETAG(0x0040, 0xa992), DCM_ST, "PRC Uniform Resource Locator"},      /* Sup 15 */
925     {DCM_MAKETAG(0x0040, 0xb020), DCM_SQ, "PRC Annotation Sequence"}    /* Sup 30 0.6 */
926 };
927 
928 /* Define the entries for the DEVICE group, 0050
929 */
930 static DCMDICT DEV_dictionary[] = {
931     {DCM_DEVCALIBRATIONOBJECT, DCM_CS, "DEV Calibration Object"},
932     {DCM_DEVDEVICESEQUENCE, DCM_SQ, "DEV Device Sequence"},
933     {DCM_DEVDEVICELENGTH, DCM_DS, "DEV Device Length"},
934     {DCM_DEVDEVICEDIAMETER, DCM_DS, "DEV Device Diameter"},
935     {DCM_DEVDEVICEDIAMETERUNITS, DCM_CS, "DEV Device Diameter Units"},
936     {DCM_DEVDEVICEVOLUME, DCM_DS, "DEV Device Volume"},
937     {DCM_DEVINTERMARKERDISTANCE, DCM_DS, "DEV Inter-Marker Distance"},
938     {DCM_DEVDEVICEDESCRIPTION, DCM_LO, "DEV Device Description"},
939 };
940 
941 /* Define the entries for the RESULTS group, 4008
942 */
943 static DCMDICT RES_dictionary[] = {
944     {DCM_RESGROUPLENGTH, DCM_UL, "RES Group Length"},
945     {DCM_RESID, DCM_SH, "RES Results ID"},
946     {DCM_RESIDISSUER, DCM_LO, "RES Results ID Issuer"},
947     {DCM_RESREFERENCEDINTERPSEQ, DCM_SQ, "RES Referenced Interpretation Sequence"},
948     {DCM_RESINTERPRECORDEDDATE, DCM_DA, "RES Interpretation Recorded Date"},
949     {DCM_RESINTERPRECORDEDTIME, DCM_TM, "RES Interpretation Recorded Time"},
950     {DCM_RESINTERPRECORDER, DCM_PN, "RES Interpretation Recorder"},
951     {DCM_RESREFERENCETORECORDEDSOUND, DCM_LO, "RES Reference to Recorded Sound"},
952     {DCM_RESINTERPTRANSCRIPTIONDATE, DCM_DA, "RES Interpretation Transcription Date"},
953     {DCM_RESINTERPTRANSCRIPTIONTIME, DCM_TM, "RES Interpretation Transcription Time"},
954     {DCM_RESINTERPTRANSCRIBER, DCM_PN, "RES Interpretation Transcriber"},
955     {DCM_RESINTERPTEXT, DCM_ST, "RES Interpretation Text"},
956     {DCM_RESINTERPAUTHOR, DCM_PN, "RES Interpretation Author"},
957     {DCM_RESINTERPAPPROVERSEQUENCE, DCM_SQ, "RES Interpretation Approver Sequence"},
958     {DCM_RESINTERPAPPROVALDATE, DCM_DA, "RES Interpretation Approval Date"},
959     {DCM_RESINTERPAPPROVALTIME, DCM_TM, "RES Interpretation Approval Time"},
960     {DCM_RESPHYSICIANAPPROVINGINTERP, DCM_PN, "RES Physician Approving Interpretation"},
961     {DCM_RESDIAGNOSIS, DCM_LT, "RES Diagnosis"},
962     {DCM_RESDIAGNOSISCODESEQ, DCM_SQ, "RES Diagnosis Code Sequence"},
963     {DCM_RESDISTRIBUTIIONLISTSEQUENCE, DCM_SQ, "RES Results Distribution List Sequence"},
964     {DCM_RESDISTRIBUTIONNAME, DCM_PN, "RES Distribution Name"},
965     {DCM_RESDISTRIBUTIONADDRESS, DCM_LO, "RES Distribution Address"},
966     {DCM_RESINTERPID, DCM_SH, "RES Interpretation ID"},
967     {DCM_RESINTERPIDISSUER, DCM_LO, "RES Interpretation ID Issuer"},
968     {DCM_RESINTERPTYPEID, DCM_CS, "RES Interpretation Type ID"},
969     {DCM_RESINTERPSTATUSID, DCM_CS, "RES Interpretation Status ID"},
970     {DCM_RESIMPRESSIONS, DCM_ST, "RES Impressions"},
971     {DCM_RESCOMMENTS, DCM_ST, "RES Comments"}
972 };
973 
974 /* Define entries for the CURVE group */
975 static DCMDICT CRV_dictionary[] = {
976     {DCM_CURVEGROUPLENGTH, DCM_UL, "CRV Group Length"},
977     {DCM_CURVEDIMENSIONS, DCM_US, "CRV Curve Dimensions"},
978     {DCM_CURVENUMBEROFPOINTS, DCM_US, "CRV Number of points"},
979     {DCM_CURVETYPEOFDATA, DCM_CS, "CRV Type of Data"},
980     {DCM_CURVEDESCRIPTION, DCM_LO, "CRV Curve Description"},
981     {DCM_CURVEAXISUNITS, DCM_SH, "CRV Axis Units"},
982     {DCM_CURVEAXISLABELS, DCM_SH, "CRV Axis Labels"},
983     {DCM_CURVEDATAVALUEREPRESENTATION, DCM_US, "CRV Data Value Representation"},
984     {DCM_CURVEMINCOORDINATEVALUE, DCM_US, "CRV Minimum Coordinate Value"},
985     {DCM_CURVEMAXCOORDINATEVALUE, DCM_US, "CRV Maximum Coordinate Value"},
986     {DCM_CURVERANGE, DCM_SH, "CRV Curve Range"},
987     {DCM_CURVEDATADESCRIPTOR, DCM_US, "CRV Data Descriptor"},
988     {DCM_CURVECOORDINATESTARTVALUE, DCM_US, "CRV Coordinate Start Value"},
989     {DCM_CURVECOORDINATESTEPVALUE, DCM_US, "CRV Coordinate Step Value"},
990     {DCM_CURVEAUDIOTYPE, DCM_US, "CRV Audio Type"},
991     {DCM_CURVEAUDIOSAMPLEFORMAT, DCM_US, "CRV Audio Sample Format"},
992     {DCM_CURVENUMBEROFCHANNELS, DCM_US, "CRV Number of Channels"},
993     {DCM_CURVENUMBEROFSAMPLES, DCM_UL, "CRV Number of Samples"},
994     {DCM_CURVESAMPLERATE, DCM_UL, "CRV Sample Rate"},
995     {DCM_CURVETOTALTIME, DCM_UL, "CRV Total Time"},
996     {DCM_CURVEAUDIOSAMPLEDATA, DCM_OW, "CRV Audio Sample Data"},
997     {DCM_CURVEAUDIOCOMMENTS, DCM_LT, "CRV Audio Comments"},
998     {DCM_CURVELABEL, DCM_LO, "CRV Curve Label"},
999     {DCM_CURVEREFOVERLAYSEQUENCE, DCM_SQ, "CRV Referenced Overlay Sequence"},
1000     {DCM_CURVEREFOVERLAYGROUP, DCM_US, "CRV Referenced Overlay Group"},
1001     {DCM_CURVEDATA, DCM_OW, "CRV Curve Data"}
1002 };
1003 
1004 /* Define the entries for the NMI (nuclear medicine image) group, 0054 */
1005 static DCMDICT NMI_dictionary[] = {
1006     {DCM_NMIGROUPLENGTH, DCM_UL, "NMI Group Length"},
1007     {DCM_NMIENERGYWINDOWVECTOR, DCM_US, "NMI Energy Window Vector"},
1008     {DCM_NMINUMBEROFENERGYWINDOWS, DCM_US, "NMI Number of Energy Windows"},
1009     {DCM_NMIENERGYWINDOWINFOSEQ, DCM_SQ, "NMI Energy Window Information Sequence"},
1010     {DCM_NMIENERGYWINDOWRANGESEQ, DCM_SQ, "NMI Energy Window Range Sequence"},
1011     {DCM_NMIENERGYWINDOWLOWERLIMIT, DCM_DS, "NMI Energy Window Lower Limit"},
1012     {DCM_NMIENERGYWINDOWUPPERLIMIT, DCM_DS, "NMI Energy Window Upper Limit"},
1013     {DCM_NMIRADIOPHARMINFOSEQ, DCM_SQ, "NMI Radiopharmaceutical Information Sequence"},
1014     {DCM_NMIRESIDUALSYRINGECOUNTS, DCM_IS, "NMI Residual Syringe Counts"},
1015     {DCM_NMIENERGYWINDOWNAME, DCM_SH, "NMI Energy Window Name"},
1016     {DCM_NMIDETECTORVECTOR, DCM_US, "NMI Detector Vector"},
1017     {DCM_NMINUMBEROFDETECTORS, DCM_US, "NMI Number of Detectors"},
1018     {DCM_NMIDETECTORINFOSEQUENCE, DCM_SQ, "NMI Detector Information Sequence"},
1019     {DCM_NMIPHASEVECTOR, DCM_US, "NMI Phase Vector"},
1020     {DCM_NMINUMBEROFPHASES, DCM_US, "NMI Number of Phases"},
1021     {DCM_NMIPHASEINFOSEQUENCE, DCM_SQ, "NMI Phase Information Sequence"},
1022     {DCM_NMINUMBEROFFRAMESINPHASE, DCM_US, "NMI Number of Frames in Phase"},
1023     {DCM_NMIPHASEDELAY, DCM_IS, "NMI Phase Delay"},
1024     {DCM_NMIPAUSEBETWEENFRAMES, DCM_IS, "NMI Pause between Frames"},
1025     {DCM_NMIROTATIONVECTOR, DCM_US, "NMI Rotation Vector"},
1026     {DCM_NMINUMBEROFROTATIONS, DCM_US, "NMI Number of rotations"},
1027     {DCM_NMIROTATIONINFOSEQUENCE, DCM_SQ, "NMI Rotation Information Sequence"},
1028     {DCM_NMINUMBEROFFRAMESINROTATION, DCM_US, "NMI Number of frames in rotation"},
1029     {DCM_NMIRRINTERVALVECTOR, DCM_US, "NMI R-R Interval Vector"},
1030     {DCM_NMINUMBEROFRRINTERVALS, DCM_US, "NMI Number of R-R Intervals"},
1031     {DCM_NMIGATEDINFOSEQUENCE, DCM_SQ, "NMI Gated Information Sequence"},
1032     {DCM_NMIDATAINFORMATIONSEQUENCE, DCM_SQ, "NMI Data Information Sequence"},
1033     {DCM_NMITIMESLOTVECTOR, DCM_US, "NMI Time Slot Vector"},
1034     {DCM_NMINUMBEROFTIMESLOTS, DCM_US, "NMI Number of Time Slots"},
1035     {DCM_NMITIMESLOTINFOSEQUENCE, DCM_SQ, "NMI Time Slot Information Sequence"},
1036     {DCM_NMITIMESLOTTIME, DCM_DS, "NMI Time Slot Time"},
1037     {DCM_NMISLICEVECTOR, DCM_US, "NMI Slice Vector"},
1038     {DCM_NMINUMBEROFSLICES, DCM_US, "NMI Number of Slices"},
1039     {DCM_NMIANGULARVIEWVECTOR, DCM_US, "NMI Angular View Vector"},
1040     {DCM_NMITIMESLICEVECTOR, DCM_US, "NMI Time Slice Vector"},
1041     {DCM_NMINUMBEROFTIMESLICES, DCM_US, "NMI Number of Time Slices"},
1042     {DCM_NMISTARTANGLE, DCM_DS, "NMI Start Angle"},
1043     {DCM_NMITYPEOFDETECTORMOTION, DCM_CS, "NMI Type of Detector Motion"},
1044     {DCM_NMITRIGGERVECTOR, DCM_IS, "NMI Trigger Vector"},
1045     {DCM_NMINUMBEROFTRIGGERSINPHASE, DCM_US, "NMI Number of Triggers in Phase"},
1046     {DCM_NMIVIEWCODESEQUENCE, DCM_SQ, "NMI View Code Sequence"},
1047     {DCM_NMIVIEWANGULATIONMODIFIERCODESEQ, DCM_SQ, "NMI View Angulation Modifer Code Sequence"},
1048     {DCM_NMIRADIONUCLIDECODESEQUENCE, DCM_SQ, "NMI Radionuclide Code Sequence"},
1049     {DCM_NMIRADIOPHARMROUTECODESEQUENCE, DCM_SQ, "NMI Radiopharmaceutical Route Code Sequence"},
1050     {DCM_NMIRADIOPHARMCODESEQUENCE, DCM_SQ, "NMI Radiopahrmaceutical Code Sequence"},
1051     {DCM_NMICALIBRATIONDATASEQUENCE, DCM_SQ, "NMI Calibration Data Sequence"},
1052     {DCM_NMIENERGYWINDOWNUMBER, DCM_US, "NMI Energy Window Number"},
1053     {DCM_NMIIMAGEID, DCM_SH, "NMI Image ID"},
1054     {DCM_NMIPATIENTORIENTATIONCODESEQ, DCM_SQ, "NMI Patient Orientation Code Sequence"},
1055     {DCM_NMIPATIENTORIENTATIONMODIFIERCODESEQ, DCM_SQ, "NMI Patient Orientation Modifier Code Sequence"},
1056     {DCM_NMIPATIENTGANTRYRELATIONSHIPCODESEQ, DCM_SQ, "NMI Patient Gantry Relationship Code Sequence"},
1057     {DCM_NMISERIESTYPE, DCM_CS, "NMI Series Type"},
1058     {DCM_NMIUNITS, DCM_CS, "NMI Units"},
1059     {DCM_NMICOUNTSSOURCE, DCM_CS, "NMI Counts Source"}, /* 1002 */
1060     {DCM_NMIREPROJECTIONMETHOD, DCM_CS, "NMI Reprojection Method"},     /* 1004 */
1061     {DCM_NMIRANDOMSCORRECTIONMETHOD, DCM_CS,
1062     "NMI Randoms Correction Method"},   /* 1100 */
1063     {DCM_NMIATTENUATIONCORRECTIONMETHOD, DCM_LO,
1064     "NMI Attenuation Correction Method"},       /* 1101 */
1065     {DCM_NMIDECAYCORRECTION, DCM_CS, "NMI Decay Correction"},   /* 1102 */
1066     {DCM_NMIRECONSTRUCTIONMETHOD, DCM_LO, "NMI Reconstruction Method"}, /* 1103 */
1067     {DCM_NMIDETECTORLINESRESPONSEUSED, DCM_LO,
1068     "NMI Detector Lines of Response Used"},     /* 1104 */
1069     {DCM_NMISCATTERCORRECTIONMETHOD, DCM_LO, "NMI Scatter Correction Method"},  /* 1105 */
1070     {DCM_NMIAXIALACCEPTANCE, DCM_DS, "NMI Axial Acceptance"},   /* 1200 */
1071     {DCM_NMIAXIALMASH, DCM_IS, "NMI Axial Mash"},       /* 1201 */
1072     {DCM_NMITRANSVERSEMASH, DCM_IS, "NMI Transverse Mash"},     /* 1202 */
1073     {DCM_NMIDETECTORELEMENTSIZE, DCM_DS, "NMI Detector Element Size"},  /* 1203 */
1074     {DCM_NMICOINCIDENCEWINDOWWIDTH, DCM_DS, "NMI Coincidence Window Width"},    /* 1210 */
1075     {DCM_NMISECONDARYCOUNTSTYPE, DCM_CS, "NMI Secondary Counts Type"},  /* 1220 */
1076     {DCM_NMIFRAMEREFERENCETIME, DCM_DS, "NMI Frame Reference Time"},    /* 1300 */
1077     {DCM_NMIPRIMARYCOUNTSACCUMULATED, DCM_IS,
1078     "NMI Primary (Prompts) Counts Accumulated"},        /* 1310 */
1079     {DCM_NMISECONDARYCOUNTSACCUMULATED, DCM_IS,
1080     "NMI Secondary Counts Accumulated"},        /* 1311 */
1081     {DCM_NMISLICESENSITIVITYFACTOR, DCM_DS, "NMI Slice Sensitivity Factor"},    /* 1320 */
1082     {DCM_NMIDECAYFACTOR, DCM_DS, "NMI Decay Factor"},   /* 1321 */
1083     {DCM_NMIDOSECALIBRATIONFACTOR, DCM_DS, "NMI Dose Calibration Factor"},      /* 1322 */
1084     {DCM_NMISCATTERFRACTIONFACTOR, DCM_DS, "NMI Scatter Fraction Factor"},      /* 1323 */
1085     {DCM_NMIDEADTIMEFACTOR, DCM_DS, "NMI Dead Time Factor"},    /* 1324 */
1086     {DCM_NMIIMAGEINDEX, DCM_US, "NMI Image Index"},     /* 1330 */
1087     {DCM_NMICOUNTSINCLUDED, DCM_CS, "NMI Counts Included"},     /* 1400 */
1088     {DCM_NMIDEADTIMECORRECTIONFLAG, DCM_CS,
1089     "NMI Dead Time Correction Flag"},   /* 1401 */
1090 };
1091 
1092 /* Define the entries for the OLY (Overlay) group */
1093 static DCMDICT OLY_dictionary[] = {
1094     {DCM_OLYGROUPLENGTH, DCM_UL, "OLY Group Length"},
1095     {DCM_OLYROWS, DCM_US, "OLY Rows"},
1096     {DCM_OLYCOLUMNS, DCM_US, "OLY Columns"},
1097     {DCM_OLYPLANES, DCM_US, "OLY Planes"},
1098     {DCM_OLYNUMBEROFFRAMESINOVERLAY, DCM_IS, "OLY Number of frames in Overlay"},
1099     {DCM_OLYOVERLAYDESCRIPTION, DCM_LO, "OLY Overlay Description"},
1100     {DCM_OLYTYPE, DCM_CS, "OLY Type"},
1101     {DCM_OLYSUBTYPE, DCM_LO, "OLY Subtype"},
1102     {DCM_OLYORIGIN, DCM_SS, "OLY Origin"},
1103     {DCM_OLYIMAGEFRAMEORIGIN, DCM_US, "OLY Image Frame Origin"},
1104     {DCM_OLYOVERLAYPLANEORIGIN, DCM_US, "OLY Overlay Plane Origin"},
1105     {DCM_OLYCOMPRESSIONCODE, DCM_LO, "OLY Compression Code (RET)"},
1106     {DCM_OLYBITSALLOCATED, DCM_US, "OLY Overlay Bits Allocated"},
1107     {DCM_OLYBITPOSITION, DCM_US, "OLY Overlay Bit Position"},
1108     {DCM_OLYOVERLAYFORMAT, DCM_LO, "OLY Overlay Format (RET)"},
1109     {DCM_OLYOVERLAYLOCATION, DCM_US, "OLY Overlay Location (RET)"},
1110     {DCM_OLYDESCRIPTORGRAY, DCM_US, "OLY Overlay Descriptor - Gray"},
1111     {DCM_OLYDESCRIPTORRED, DCM_US, "OLY Overlay Descriptor - Red"},
1112     {DCM_OLYDESCRIPTORGREEN, DCM_US, "OLY Overlay Descriptor - Green"},
1113     {DCM_OLYDESCRIPTORBLUE, DCM_US, "OLY Overlay Descriptor - Blue"},
1114     {DCM_OLYGRAY, DCM_US, "OLY Overlays - Gray"},
1115     {DCM_OLYRED, DCM_US, "OLY Overlays - Red"},
1116     {DCM_OLYGREEN, DCM_US, "OLY Overlays - Green"},
1117     {DCM_OLYBLUE, DCM_US, "OLY Overlays - Blue"},
1118     {DCM_OLYROIAREA, DCM_IS, "OLY ROI Area"},
1119     {DCM_OLYROIMEAN, DCM_DS, "OLY ROI Mean"},
1120     {DCM_OLYROISTANDARDDEVIATION, DCM_DS, "OLY ROI Standard Deviation"},
1121     {DCM_OLYOVERLAYLABEL, DCM_LO, "OLY Overlay Label"},
1122     {DCM_OLYDATA, DCM_OW, "OLY Data"},
1123     {DCM_OLYCOMMENTS, DCM_LO, "OLY Comments (RET)"}
1124 };
1125 
1126 /* Define the entries for the PIXEL group (7FE0)
1127 */
1128 static DCMDICT PXL_dictionary[] = {
1129     {DCM_PXLGROUPLENGTH, DCM_UL, "PXL Group Length"},
1130     {DCM_PXLPIXELDATA, DCM_OT, "PXL Pixel Data"}
1131 };
1132 
1133 /* Define the elements for the MEDIA group (0088) */
1134 static DCMDICT MED_dictionary[] = {
1135     {DCM_MEDIAGROUPLENGTH, DCM_UL, "MED Media Group Length "},
1136     {DCM_MEDIASTORAGEFILESETID, DCM_SH, "MED Storage Media File-set ID"},
1137     {DCM_MEDIASTORAGEFILESETUID, DCM_UI, "MED Storage Media File-setUID"},
1138     {DCM_MEDIAICONIMAGE, DCM_SQ, "MED Icon Image Sequence"},
1139     {DCM_MEDIATOPICTITLE, DCM_LO, "MED Topic Title"},
1140     {DCM_MEDIATOPICSUBJECT, DCM_ST, "MED Topic Subject"},
1141     {DCM_MEDIATOPICAUTHOR, DCM_LO, "MED Topic Author"},
1142     {DCM_MEDIATOPICKEYWORD, DCM_LO, "MED Topic Keywords"}
1143 };
1144 
1145 /* Define the entries in the BASICFILMSESSION group (2000)
1146 */
1147 static DCMDICT BFS_dictionary[] = {
1148     {DCM_BFSGROUPLENGTH, DCM_UL, "BFS Group Length"},
1149     {DCM_BFSCOPIES, DCM_IS, "BFS Number of copies printed for each film"},
1150     {DCM_BFSPRINTPRIORITY, DCM_CS, "BFS Specifies priority of print job"},
1151     {DCM_BFSMEDIUMTYPE, DCM_CS, "BFS Medium on which page will be printed"},
1152     {DCM_BFSFILMDESTINATION, DCM_CS, "BFS Film destination"},
1153     {DCM_BFSFILMSESSIONLABEL, DCM_LO, "BFS Human readable label to identify film"},
1154     {DCM_BFSMEMORYALLOCATION, DCM_IS, "BFS Amount of mem allocated for film session"},
1155     {DCM_BFSREFERENCEDFILMBOXSEQ, DCM_SQ, "BFS seq of UIDs of diff FILMBOX instances"}
1156 };
1157 
1158 /* Define the entries in the BASICFILMBOX group (2010)
1159 */
1160 static DCMDICT BFB_dictionary[] = {
1161     {DCM_BFBGROUPLENGTH, DCM_UL, "BFB Group Length"},
1162     {DCM_BFBIMAGEDISPLAYFORMAT, DCM_ST, "BFB Type of image display format"},
1163     {DCM_BFBANNOTATIONDISPLAYFORMAT, DCM_CS, "BFB Id of annotation display format"},
1164     {DCM_BFBFILMORIENTATION, DCM_CS, "BFB Film orientation"},
1165     {DCM_BFBFILMSIZEID, DCM_CS, "BFB Film size identification"},
1166     {DCM_BFBMAGNIFICATIONTYPE, DCM_CS, "BFB Interpol. type by which printer mag image"},
1167     {DCM_BFBSMOOTHINGTYPE, DCM_CS, "BFB Specifies type of interpolation function"},
1168     {DCM_BFBBORDERDENSITY, DCM_CS, "BFB density of film areas around/between images"},
1169     {DCM_BFBEMPTYIMAGEDENSITY, DCM_CS, "BFB density of image box area having no image"},
1170     {DCM_BFBMINDENSITY, DCM_US, "BFB Minimum density of images on the film"},
1171     {DCM_BFBMAXDENSITY, DCM_US, "BFB Maximum density of images on the film"},
1172     {DCM_BFBTRIM, DCM_CS, "BFB specifies whether to trim or not"},
1173     {DCM_BFBCONFIGURATIONINFO, DCM_ST, "BFB ID of configuration table"},
1174     {DCM_BFBREFBASICFILMSESSIONSEQ, DCM_SQ, "BFB seq. of film session instance"},
1175     {DCM_BFBREFBASICIMAGEBOXSEQ, DCM_SQ, "BFB seq. of basic image box SOP instance"},
1176     {DCM_BFBREFBASICANNOTBOXSEQ, DCM_SQ, "BFB seq. of basic annotation box SOP instance"},
1177 };
1178 
1179 /* Defines the entries in the BASICIMAGEBOX (2020)
1180 */
1181 static DCMDICT BIB_dictionary[] = {
1182     {DCM_BIBGROUPLENGTH, DCM_UL, "BIB Group Length"},
1183     {DCM_BIBIMAGEPOSITION, DCM_US, "BIB Specifies position of the image in the film"},
1184     {DCM_BIBPOLARITY, DCM_CS, "BIB Specifies image polarity"},
1185     {DCM_BIBREQUESTEDIMAGESIZE, DCM_DS, "BIB Requested image size"},
1186     {DCM_BIBPREFORMATGREYSCALEIMAGESEQ, DCM_SQ, "BIB Preformatted Greyscale image"},
1187     {DCM_BIBPREFORMATCOLORIMAGESEQ, DCM_SQ, "BIB Preformatted Color image"},
1188     {DCM_BIBREFIMAGEOVERLAYBOXSEQ, DCM_SQ, "BIB Referenced Image Overlay Box seq"},
1189     {DCM_BIBREFVOILUTSEQ, DCM_SQ, "BIB Referenced VOI LUT seq."}
1190 };
1191 
1192 /* Defines the entries in the BASICANNOTATIONBOX group (2030)
1193 */
1194 static DCMDICT BAB_dictionary[] = {
1195     {DCM_BABGROUPLENGTH, DCM_UL, "BAB Group Length"},
1196     {DCM_BABANNOTATIONPOSITION, DCM_US, "BAB posn of the annot. box in parent film box"},
1197     {DCM_BABTEXTSTRING, DCM_LO, "BAB text string"}
1198 };
1199 
1200 /* Defines entries for BASICIMAGEOVERLAYBOX group (2040)
1201 */
1202 static DCMDICT IOB_dictionary[] = {
1203     {DCM_IOBGROUPLENGTH, DCM_UL, "IOB Group Length"},
1204     {DCM_IOBREFOVERLAYPLANESEQ, DCM_SQ, "IOB Ref Overlay Plane Sequence"},
1205     {DCM_IOBREFOVERLAYPLANEGROUPS, DCM_US, "IOB Ref Overlay Plane Groups"},
1206     {DCM_IOBOVERLAYMAGNIFICATIONTYPE, DCM_CS, "IOB Overlay Magnification Type"},
1207     {DCM_IOBOVERLAYSMOOTHINGTYPE, DCM_CS, "IOB Overlay Smoothing Type"},
1208     {DCM_IOBOVERLAYFOREGROUNDDENSITY, DCM_CS, "IOB Overlay Foreground Density"},
1209     {DCM_IOBOVERLAYMODE, DCM_CS, "IOB Overlay Mode"},
1210     {DCM_IOBTHRESHOLDDENSITY, DCM_CS, "IOB Threshold Density"},
1211     {DCM_IOBREFIMAGEBOXSEQUENCE, DCM_SQ, "IOB Ref Image Box Sequence (RET)"}
1212 };
1213 
1214 /* Defines the entries in the PRINTJOB group (2100)
1215 */
1216 static DCMDICT PJ_dictionary[] = {
1217     {DCM_PJGROUPLENGTH, DCM_UL, "PJ Group Length"},
1218     {DCM_PJEXECUTIONSTATUS, DCM_CS, "PJ execution status of print job"},
1219     {DCM_PJEXECUTIONSTATUSINFO, DCM_CS, "PJ additional information"},
1220     {DCM_PJCREATIONDATE, DCM_DA, "PJ date of print job creation"},
1221     {DCM_PJCREATIONTIME, DCM_TM, "PJ time of print job creation"},
1222     {DCM_PJORIGINATOR, DCM_AE, "PJ Appln entity title that issued the print opn"},
1223     {DCM_PJREFPRINTJOBSEQ, DCM_SQ, "PJ Referenced print job seq."}
1224 };
1225 
1226 /* Defines the entries in the PRINTER group (2110)
1227 */
1228 static DCMDICT PRN_dictionary[] = {
1229     {DCM_PRINTERGROUPLENGTH, DCM_UL, "PRINTER Group Length"},
1230     {DCM_PRINTERSTATUS, DCM_CS, "PRINTER printer device status"},
1231     {DCM_PRINTERSTATUSINFO, DCM_CS, "PRINTER additional information"},
1232     {DCM_PRINTERNAME, DCM_LO, "PRINTER printer name"},
1233     {DCM_PRINTERQUEUEID, DCM_SH, "Printer Queue ID"}
1234 };
1235 
1236 /* Define the entries in the 0x3002 group, used for RT planning
1237 */
1238 static DCMDICT G3002_dictionary[] = {
1239     {DCM_MAKETAG(0x3002, 0x0000), DCM_UL, "RT Group Length"},
1240     {DCM_MAKETAG(0x3002, 0x0002), DCM_SH, "RT Image Label"},
1241     {DCM_MAKETAG(0x3002, 0x0003), DCM_LO, "RT Image Name"},
1242     {DCM_MAKETAG(0x3002, 0x0004), DCM_ST, "RT Image Description"},
1243     {DCM_MAKETAG(0x3002, 0x000a), DCM_CS, "RT Reported Values Origin"},
1244     {DCM_MAKETAG(0x3002, 0x000c), DCM_CS, "RT Image Plane"},
1245     {DCM_MAKETAG(0x3002, 0x000e), DCM_DS, "RT X-Ray Image Receptor Angle"},
1246     {DCM_MAKETAG(0x3002, 0x0010), DCM_DS, "RT Image Orientation"},
1247     {DCM_MAKETAG(0x3002, 0x0011), DCM_DS, "RT Image Plane Pixel Spacing"},
1248     {DCM_MAKETAG(0x3002, 0x0012), DCM_DS, "RT Image Position"},
1249     {DCM_MAKETAG(0x3002, 0x0020), DCM_SH, "RT Radiation Machine Name"},
1250     {DCM_MAKETAG(0x3002, 0x0022), DCM_DS, "RT Radiation Machine SAD"},
1251     {DCM_MAKETAG(0x3002, 0x0024), DCM_DS, "RT Radiation Machine SSD"},
1252     {DCM_MAKETAG(0x3002, 0x0026), DCM_DS, "RT Image SID"},
1253     {DCM_MAKETAG(0x3002, 0x0028), DCM_DS, "RT Source to Reference Object Distance"},
1254     {DCM_MAKETAG(0x3002, 0x0029), DCM_IS, "RT Fraction Number"},
1255     {DCM_MAKETAG(0x3002, 0x0030), DCM_SQ, "RT Exposure Sequence"},
1256     {DCM_MAKETAG(0x3002, 0x0032), DCM_DS, "RT Meterset Exposure"}
1257 };
1258 
1259 /* Define the entries in the 0x3004 group, Dose Volume Histogram (DVH),
1260 ** used in RT planning.
1261 */
1262 static DCMDICT DVH_dictionary[] = {
1263     {DCM_MAKETAG(0x3004, 0x0000), DCM_UL, "DVH Group Length"},
1264     {DCM_MAKETAG(0x3004, 0x0001), DCM_CS, "DVH Type"},
1265     {DCM_MAKETAG(0x3004, 0x0002), DCM_CS, "DVH Dose Units"},
1266     {DCM_MAKETAG(0x3004, 0x0004), DCM_CS, "DVH Dose Type"},
1267     {DCM_MAKETAG(0x3004, 0x0006), DCM_LO, "DVH Dose Comment"},
1268     {DCM_MAKETAG(0x3004, 0x0008), DCM_DS, "DVH Normalization Point"},
1269     {DCM_MAKETAG(0x3004, 0x000a), DCM_CS, "DVH Dose Summation Type"},
1270     {DCM_MAKETAG(0x3004, 0x000c), DCM_DS, "DVH Grid Frame Offset Vector"},
1271     {DCM_MAKETAG(0x3004, 0x000e), DCM_DS, "DVH Dose Grid Scaling"},
1272     {DCM_MAKETAG(0x3004, 0x0010), DCM_SQ, "DVH RT Dose ROI Sequence"},
1273     {DCM_MAKETAG(0x3004, 0x0012), DCM_DS, "DVH Dose Value"},
1274     {DCM_MAKETAG(0x3004, 0x0040), DCM_DS, "DVH Normalization Point"},
1275     {DCM_MAKETAG(0x3004, 0x0042), DCM_DS, "DVH Normalization Dose Value"},
1276     {DCM_MAKETAG(0x3004, 0x0050), DCM_SQ, "DVH Sequence"},
1277     {DCM_MAKETAG(0x3004, 0x0052), DCM_DS, "DVH Dose Scaling"},
1278     {DCM_MAKETAG(0x3004, 0x0054), DCM_CS, "DVH Volume Units"},
1279     {DCM_MAKETAG(0x3004, 0x0056), DCM_IS, "DVH Number of Bins"},
1280     {DCM_MAKETAG(0x3004, 0x0058), DCM_DS, "DVH Data"},
1281     {DCM_MAKETAG(0x3004, 0x0060), DCM_SQ, "DVH Referenced ROI Sequence"},
1282     {DCM_MAKETAG(0x3004, 0x0062), DCM_CS, "DVH ROI Contribution Type"},
1283     {DCM_MAKETAG(0x3004, 0x0070), DCM_DS, "DVH Minimum Dose"},
1284     {DCM_MAKETAG(0x3004, 0x0072), DCM_DS, "DVH Maximum Dose"},
1285     {DCM_MAKETAG(0x3004, 0x0074), DCM_DS, "DVH Mean Dose"}
1286 };
1287 
1288 /* Define the entries in the 0x3006 group, Structure Set,
1289 ** used in RT planning.
1290 */
1291 static DCMDICT SSET_dictionary[] = {
1292     {DCM_MAKETAG(0x3006, 0x0000), DCM_UL, "SSET Group Length"},
1293     {DCM_MAKETAG(0x3006, 0x0002), DCM_SH, "SSET Structure Set Label"},
1294     {DCM_MAKETAG(0x3006, 0x0004), DCM_LO, "SSET Structure Set Name"},
1295     {DCM_MAKETAG(0x3006, 0x0006), DCM_ST, "SSET Structure Set Description"},
1296     {DCM_MAKETAG(0x3006, 0x0008), DCM_DA, "SSET Structure Set Date"},
1297     {DCM_MAKETAG(0x3006, 0x0009), DCM_TM, "SSET Structure Set Time"},
1298     {DCM_MAKETAG(0x3006, 0x0010), DCM_SQ, "SSET Referenced Frame of Reference Sequence"},
1299     {DCM_MAKETAG(0x3006, 0x0012), DCM_SQ, "SSET RT Referenced Study Sequence"},
1300     {DCM_MAKETAG(0x3006, 0x0014), DCM_SQ, "SSET RT Referenced Series Sequence"},
1301     {DCM_MAKETAG(0x3006, 0x0016), DCM_SQ, "SSET Contour Image Sequence"},
1302     {DCM_MAKETAG(0x3006, 0x0020), DCM_SQ, "SSET Structure Set ROI Sequence"},
1303     {DCM_MAKETAG(0x3006, 0x0022), DCM_IS, "SSET ROI Number"},
1304     {DCM_MAKETAG(0x3006, 0x0024), DCM_UI, "SSET Referenced Frame of Reference UID"},
1305     {DCM_MAKETAG(0x3006, 0x0026), DCM_LO, "SSET ROI Name"},
1306     {DCM_MAKETAG(0x3006, 0x0028), DCM_ST, "SSET ROI Description"},
1307     {DCM_MAKETAG(0x3006, 0x002a), DCM_IS, "SSET ROI Display Color"},
1308     {DCM_MAKETAG(0x3006, 0x002c), DCM_DS, "SSET ROI Volume"},
1309     {DCM_MAKETAG(0x3006, 0x0030), DCM_SQ, "SSET RT Related ROI Sequence"},
1310     {DCM_MAKETAG(0x3006, 0x0033), DCM_CS, "SSET RT ROI Relationship"},
1311     {DCM_MAKETAG(0x3006, 0x0036), DCM_CS, "SSET ROI Generation Algorithm"},
1312     {DCM_MAKETAG(0x3006, 0x0038), DCM_LO, "SSET ROI Generation Description"},
1313     {DCM_MAKETAG(0x3006, 0x0039), DCM_SQ, "SSET ROI Contour Sequence"},
1314     {DCM_MAKETAG(0x3006, 0x0040), DCM_SQ, "SSET Contour Sequence"},
1315     {DCM_MAKETAG(0x3006, 0x0042), DCM_CS, "SSET Contour Geometric Type"},
1316     {DCM_MAKETAG(0x3006, 0x0044), DCM_DS, "SSET Contour Slab Thickness"},
1317     {DCM_MAKETAG(0x3006, 0x0045), DCM_DS, "SSET Contour Offset Vector"},
1318     {DCM_MAKETAG(0x3006, 0x0046), DCM_IS, "SSET Number of Contour Points"},
1319     {DCM_MAKETAG(0x3006, 0x0050), DCM_DS, "SSET Contour Data"},
1320     {DCM_MAKETAG(0x3006, 0x0080), DCM_SQ, "SSET RT ROI Observations Sequence"},
1321     {DCM_MAKETAG(0x3006, 0x0082), DCM_IS, "SSET Observation Number"},
1322     {DCM_MAKETAG(0x3006, 0x0084), DCM_IS, "SSET Referenced ROI Number"},
1323     {DCM_MAKETAG(0x3006, 0x0085), DCM_SH, "SSET ROI Observation Label"},
1324     {DCM_MAKETAG(0x3006, 0x0086), DCM_SQ, "SSET RT ROI Identification Code Sequence"},
1325     {DCM_MAKETAG(0x3006, 0x0088), DCM_ST, "SSET ROI Observation Description"},
1326     {DCM_MAKETAG(0x3006, 0x00a0), DCM_SQ, "SSET Relation RT ROI Observations Sequence"},
1327     {DCM_MAKETAG(0x3006, 0x00a4), DCM_CS, "SSET RT ROI Interpreted Type"},
1328     {DCM_MAKETAG(0x3006, 0x00a6), DCM_PN, "SSET ROI Interpreter"},
1329     {DCM_MAKETAG(0x3006, 0x00b0), DCM_SQ, "SSET ROI Physical Properties Sequence"},
1330     {DCM_MAKETAG(0x3006, 0x00b2), DCM_CS, "SSET ROI Physical Property"},
1331     {DCM_MAKETAG(0x3006, 0x00b4), DCM_DS, "SSET ROI Physical Property Value"},
1332     {DCM_MAKETAG(0x3006, 0x00c0), DCM_SQ, "SSET Frame of Referenced Relationship Sequence"},
1333     {DCM_MAKETAG(0x3006, 0x00c2), DCM_UI, "SSET Related Frame of Reference UID"},
1334     {DCM_MAKETAG(0x3006, 0x00c4), DCM_CS, "SSET Frame of Reference Transformation Type"},
1335     {DCM_MAKETAG(0x3006, 0x00c6), DCM_DS, "SSET Frame of Reference Transformation Matrix"},
1336     {DCM_MAKETAG(0x3006, 0x00c8), DCM_LO, "SSET Frame of Reference Transformation Comment"}
1337 };
1338 
1339 /* Define the entries in the 0x300A group, used in RT planning.
1340 */
1341 static DCMDICT G300A_dictionary[] = {
1342     {DCM_MAKETAG(0x300a, 0x0000), DCM_UL, "     Group Length"},
1343     {DCM_MAKETAG(0x300a, 0x0002), DCM_SH, "     RT Plan Label"},
1344     {DCM_MAKETAG(0x300a, 0x0003), DCM_LO, "     RT Plan Name"},
1345     {DCM_MAKETAG(0x300a, 0x0004), DCM_ST, "     RT Plan Description"},
1346     {DCM_MAKETAG(0x300a, 0x0006), DCM_DA, "     RT Plan Date"},
1347     {DCM_MAKETAG(0x300a, 0x0007), DCM_TM, "     RT Plan Time"},
1348     {DCM_MAKETAG(0x300a, 0x0009), DCM_LO, "     RT Treatment Protocols"},
1349     {DCM_MAKETAG(0x300a, 0x000a), DCM_CS, "     Treatment Intent"},
1350     {DCM_MAKETAG(0x300a, 0x000b), DCM_LO, "     Treatment Sites"},
1351     {DCM_MAKETAG(0x300a, 0x000c), DCM_CS, "     RT Plan Geometry"},
1352     {DCM_MAKETAG(0x300a, 0x000e), DCM_ST, "     Prescription Description"},
1353     {DCM_MAKETAG(0x300a, 0x0010), DCM_SQ, "     Dose Reference Sequence"},
1354     {DCM_MAKETAG(0x300a, 0x0012), DCM_IS, "     Dose Reference Number"},
1355     {DCM_MAKETAG(0x300a, 0x0014), DCM_CS, "     Dose Reference Structure Type"},
1356     {DCM_MAKETAG(0x300a, 0x0016), DCM_LO, "     Dose Reference Description"},
1357     {DCM_MAKETAG(0x300a, 0x0018), DCM_DS, "     Dose Reference Point Coordinates"},
1358     {DCM_MAKETAG(0x300a, 0x001a), DCM_DS, "     Nominal Prior Dose"},
1359     {DCM_MAKETAG(0x300a, 0x0020), DCM_CS, "     Dose Reference Type"},
1360     {DCM_MAKETAG(0x300a, 0x0021), DCM_DS, "     Constraint Weight"},
1361     {DCM_MAKETAG(0x300a, 0x0022), DCM_DS, "     Delivery Warning Dose"},
1362     {DCM_MAKETAG(0x300a, 0x0023), DCM_DS, "     Delivery Maximum Dose"},
1363     {DCM_MAKETAG(0x300a, 0x0025), DCM_DS, "     Target Minimum Dose"},
1364     {DCM_MAKETAG(0x300a, 0x0026), DCM_DS, "     Target Prescription Dose"},
1365     {DCM_MAKETAG(0x300a, 0x0027), DCM_DS, "     Target Maximum Dose"},
1366     {DCM_MAKETAG(0x300a, 0x0028), DCM_DS, "     Target Underdose Volume Fraction"},
1367     {DCM_MAKETAG(0x300a, 0x002a), DCM_DS, "     Organ at Risk Full-volume Dose"},
1368     {DCM_MAKETAG(0x300a, 0x002b), DCM_DS, "     Organ at Risk Limit Dose"},
1369     {DCM_MAKETAG(0x300a, 0x002c), DCM_DS, "     Organ at Risk Maximum Dose"},
1370     {DCM_MAKETAG(0x300a, 0x002d), DCM_DS, "     Organ at Risk Overdose Volume Fraction"},
1371     {DCM_MAKETAG(0x300a, 0x0040), DCM_SQ, "     Tolerance Table Sequence"},
1372     {DCM_MAKETAG(0x300a, 0x0042), DCM_IS, "     Tolerance Table Number"},
1373     {DCM_MAKETAG(0x300a, 0x0043), DCM_SH, "     Tolerance Table Label"},
1374     {DCM_MAKETAG(0x300a, 0x0044), DCM_DS, "     Gantry Angle Tolerance"},
1375     {DCM_MAKETAG(0x300a, 0x0046), DCM_DS, "     Beam Limiting Device Angle Tolerance"},
1376     {DCM_MAKETAG(0x300a, 0x0048), DCM_SQ, "     Beam Limiting Device Tolerance Sequence"},
1377     {DCM_MAKETAG(0x300a, 0x004a), DCM_DS, "     Beam Limiting Device Position Tolerance"},
1378     {DCM_MAKETAG(0x300a, 0x004c), DCM_DS, "     Patient Support Angle Tolerance"},
1379     {DCM_MAKETAG(0x300a, 0x004e), DCM_DS, "     Table Top Eccentric Angle Tolerance"},
1380     {DCM_MAKETAG(0x300a, 0x0051), DCM_DS, "     Table Top Vertical Position Tolerance"},
1381     {DCM_MAKETAG(0x300a, 0x0052), DCM_DS, "     Table Top Longitudinal Position Tolerance"},
1382     {DCM_MAKETAG(0x300a, 0x0053), DCM_DS, "     Table Top Lateral Position Tolerance"},
1383     {DCM_MAKETAG(0x300a, 0x0055), DCM_CS, "     RT Plan Relationship"},
1384     {DCM_MAKETAG(0x300a, 0x0070), DCM_SQ, "     Fraction Group Sequence"},
1385     {DCM_MAKETAG(0x300a, 0x0071), DCM_IS, "     Fraction Group Number"},
1386     {DCM_MAKETAG(0x300a, 0x0078), DCM_IS, "     Number of Fractions Planned"},
1387     {DCM_MAKETAG(0x300a, 0x0079), DCM_IS, "     Number of Fractions Per Day"},
1388     {DCM_MAKETAG(0x300a, 0x007a), DCM_IS, "     Repeat Fraction Cycle Length"},
1389     {DCM_MAKETAG(0x300a, 0x007b), DCM_LT, "     Fraction Pattern"},
1390     {DCM_MAKETAG(0x300a, 0x0080), DCM_IS, "     Number of Beams"},
1391     {DCM_MAKETAG(0x300a, 0x0082), DCM_DS, "     Beam Dose Specification Point"},
1392     {DCM_MAKETAG(0x300a, 0x0084), DCM_DS, "     Beam Dose"},
1393     {DCM_MAKETAG(0x300a, 0x0086), DCM_DS, "     Beam Meterset"},
1394     {DCM_MAKETAG(0x300a, 0x00a0), DCM_IS, "     Number of Brachy Application Setups"},
1395     {DCM_MAKETAG(0x300a, 0x00a2), DCM_DS, "     Brachy App Setup Dose Specification Point"},
1396     {DCM_MAKETAG(0x300a, 0x00a4), DCM_DS, "     Brachy Application Setup Dose"},
1397     {DCM_MAKETAG(0x300a, 0x00b0), DCM_SQ, "     Beam Sequence"},
1398     {DCM_MAKETAG(0x300a, 0x00b2), DCM_SH, "     Treatment Machine Name"},
1399     {DCM_MAKETAG(0x300a, 0x00b3), DCM_CS, "     Primary Dosimeter Unit"},
1400     {DCM_MAKETAG(0x300a, 0x00b4), DCM_DS, "     Source-Axis Distance"},
1401     {DCM_MAKETAG(0x300a, 0x00b6), DCM_SQ, "     Beam Limiting Device Sequence"},
1402     {DCM_MAKETAG(0x300a, 0x00b8), DCM_CS, "     RT Beam Limiting Device Type"},
1403     {DCM_MAKETAG(0x300a, 0x00ba), DCM_DS, "     Source to Beam Limiting Device Distance"},
1404     {DCM_MAKETAG(0x300a, 0x00bc), DCM_IS, "     Number of Leaf/Jaw Pairs"},
1405     {DCM_MAKETAG(0x300a, 0x00be), DCM_DS, "     Leaf Position Boundaries"},
1406     {DCM_MAKETAG(0x300a, 0x00c0), DCM_IS, "     Beam Number"},
1407     {DCM_MAKETAG(0x300a, 0x00c2), DCM_LO, "     Beam Name"},
1408     {DCM_MAKETAG(0x300a, 0x00c3), DCM_ST, "     Beam Description"},
1409     {DCM_MAKETAG(0x300a, 0x00c4), DCM_CS, "     Beam Type"},
1410     {DCM_MAKETAG(0x300a, 0x00c6), DCM_CS, "     Radiation Type"},
1411     {DCM_MAKETAG(0x300a, 0x00c8), DCM_IS, "     Reference Image Number"},
1412     {DCM_MAKETAG(0x300a, 0x00ca), DCM_SQ, "     Planned Verification Image Sequence"},
1413     {DCM_MAKETAG(0x300a, 0x00cc), DCM_LO, "     Imaging Device-Specific Acq Parameters"},
1414     {DCM_MAKETAG(0x300a, 0x00ce), DCM_CS, "     Treatment Delivery Type"},
1415     {DCM_MAKETAG(0x300a, 0x00d0), DCM_IS, "     Number of Wedges"},
1416     {DCM_MAKETAG(0x300a, 0x00d1), DCM_SQ, "     Wedge Sequence"},
1417     {DCM_MAKETAG(0x300a, 0x00d2), DCM_IS, "     Wedge Number"},
1418     {DCM_MAKETAG(0x300a, 0x00d3), DCM_CS, "     Wedge Type"},
1419     {DCM_MAKETAG(0x300a, 0x00d4), DCM_SH, "     Wedge ID"},
1420     {DCM_MAKETAG(0x300a, 0x00d5), DCM_IS, "     Wedge Angle"},
1421     {DCM_MAKETAG(0x300a, 0x00d6), DCM_DS, "     Wedge Factor"},
1422     {DCM_MAKETAG(0x300a, 0x00d8), DCM_DS, "     Wedge Orientation"},
1423     {DCM_MAKETAG(0x300a, 0x00da), DCM_DS, "     Source to Wedge Tray Distance"},
1424     {DCM_MAKETAG(0x300a, 0x00e0), DCM_IS, "     Number of Compensators"},
1425     {DCM_MAKETAG(0x300a, 0x00e1), DCM_SH, "     Material ID"},
1426     {DCM_MAKETAG(0x300a, 0x00e2), DCM_DS, "     Total Compensator Tray Factor"},
1427     {DCM_MAKETAG(0x300a, 0x00e3), DCM_SQ, "     Compensator Sequence"},
1428     {DCM_MAKETAG(0x300a, 0x00e4), DCM_IS, "     Compensator Number"},
1429     {DCM_MAKETAG(0x300a, 0x00e5), DCM_SH, "     Compensator ID"},
1430     {DCM_MAKETAG(0x300a, 0x00e6), DCM_DS, "     Source to Compensator Tray Distance"},
1431     {DCM_MAKETAG(0x300a, 0x00e7), DCM_IS, "     Compensator Rows"},
1432     {DCM_MAKETAG(0x300a, 0x00e8), DCM_IS, "     Compensator Columns"},
1433     {DCM_MAKETAG(0x300a, 0x00e9), DCM_DS, "     Compensator Pixel Spacing"},
1434     {DCM_MAKETAG(0x300a, 0x00ea), DCM_DS, "     Compensator Position"},
1435     {DCM_MAKETAG(0x300a, 0x00eb), DCM_DS, "     Compensator Transmission Data"},
1436     {DCM_MAKETAG(0x300a, 0x00ec), DCM_DS, "     Compensator Thickness Data"},
1437     {DCM_MAKETAG(0x300a, 0x00ed), DCM_IS, "     Number of Boli"},
1438     {DCM_MAKETAG(0x300a, 0x00f0), DCM_IS, "     Number of Blocks"},
1439     {DCM_MAKETAG(0x300a, 0x00f2), DCM_DS, "     Total Block Tray Factor"},
1440     {DCM_MAKETAG(0x300a, 0x00f4), DCM_SQ, "     Block Sequence"},
1441     {DCM_MAKETAG(0x300a, 0x00f5), DCM_SH, "     Block Tray ID"},
1442     {DCM_MAKETAG(0x300a, 0x00f6), DCM_DS, "     Source to Block Tray Distance"},
1443     {DCM_MAKETAG(0x300a, 0x00f8), DCM_CS, "     Block Type"},
1444     {DCM_MAKETAG(0x300a, 0x00fa), DCM_CS, "     Block Divergence"},
1445     {DCM_MAKETAG(0x300a, 0x00fc), DCM_IS, "     Block Number"},
1446     {DCM_MAKETAG(0x300a, 0x00fe), DCM_LO, "     Block Name"},
1447     {DCM_MAKETAG(0x300a, 0x0100), DCM_DS, "     Block Thickness"},
1448     {DCM_MAKETAG(0x300a, 0x0102), DCM_DS, "     Block Transmission"},
1449     {DCM_MAKETAG(0x300a, 0x0104), DCM_IS, "     Block Number of Points"},
1450     {DCM_MAKETAG(0x300a, 0x0106), DCM_DS, "     Block Data"},
1451     {DCM_MAKETAG(0x300a, 0x0107), DCM_SQ, "     Applicator Sequence"},
1452     {DCM_MAKETAG(0x300a, 0x0108), DCM_SH, "     Applicator ID"},
1453     {DCM_MAKETAG(0x300a, 0x0109), DCM_CS, "     Applicator Type"},
1454     {DCM_MAKETAG(0x300a, 0x010a), DCM_LO, "     Applicator Description"},
1455     {DCM_MAKETAG(0x300a, 0x010c), DCM_DS, "     Cumulative Dose Reference COefficient"},
1456     {DCM_MAKETAG(0x300a, 0x010e), DCM_DS, "     Final Cumulative Meterset Weight"},
1457     {DCM_MAKETAG(0x300a, 0x0110), DCM_IS, "     Number of Control Points"},
1458     {DCM_MAKETAG(0x300a, 0x0111), DCM_SQ, "     Control Point Sequence"},
1459     {DCM_MAKETAG(0x300a, 0x0112), DCM_IS, "     Control Point Index"},
1460     {DCM_MAKETAG(0x300a, 0x0114), DCM_DS, "     Nominal Beam Energy"},
1461     {DCM_MAKETAG(0x300a, 0x0115), DCM_DS, "     Dose Rate Set"},
1462     {DCM_MAKETAG(0x300a, 0x0116), DCM_SQ, "     Wedge Position Sequence"},
1463     {DCM_MAKETAG(0x300a, 0x0118), DCM_CS, "     Wedge Position"},
1464     {DCM_MAKETAG(0x300a, 0x011a), DCM_SQ, "     Beam Limiting Device Position Sequence"},
1465     {DCM_MAKETAG(0x300a, 0x011c), DCM_DS, "     Leaf/Jaw Positions"},
1466     {DCM_MAKETAG(0x300a, 0x011e), DCM_DS, "     Gantry Angle"},
1467     {DCM_MAKETAG(0x300a, 0x011f), DCM_CS, "     Gantry Rotation Direction"},
1468     {DCM_MAKETAG(0x300a, 0x0120), DCM_DS, "     Beam Limiting Device Angle"},
1469     {DCM_MAKETAG(0x300a, 0x0121), DCM_CS, "     Beam Limiting Device Rotation Direction"},
1470     {DCM_MAKETAG(0x300a, 0x0122), DCM_DS, "     Patient Support Angle"},
1471     {DCM_MAKETAG(0x300a, 0x0123), DCM_CS, "     Patient Support Rotation Direction"},
1472     {DCM_MAKETAG(0x300a, 0x0124), DCM_DS, "     Table Top Eccentric Axis Distance"},
1473     {DCM_MAKETAG(0x300a, 0x0125), DCM_DS, "     Table Top Eccentric Angle"},
1474     {DCM_MAKETAG(0x300a, 0x0126), DCM_CS, "     Table Top Eccentric Rotation Direction"},
1475     {DCM_MAKETAG(0x300a, 0x0128), DCM_DS, "     Table Top Vertical Position"},
1476     {DCM_MAKETAG(0x300a, 0x0129), DCM_DS, "     Table Top Longitudinal Position"},
1477     {DCM_MAKETAG(0x300a, 0x012a), DCM_DS, "     Table Top Lateral Position"},
1478     {DCM_MAKETAG(0x300a, 0x012c), DCM_DS, "     Isocenter Position"},
1479     {DCM_MAKETAG(0x300a, 0x012e), DCM_DS, "     Surface Entry Point"},
1480     {DCM_MAKETAG(0x300a, 0x0130), DCM_DS, "     Source to Surface Distance"},
1481     {DCM_MAKETAG(0x300a, 0x0134), DCM_DS, "     Cumulative Meterset Weight"},
1482     {DCM_MAKETAG(0x300a, 0x0180), DCM_SQ, "     Patient Setup Sequence"},
1483     {DCM_MAKETAG(0x300a, 0x0182), DCM_IS, "     Patient Setup Number"},
1484     {DCM_MAKETAG(0x300a, 0x0184), DCM_LO, "     Patient Additional Position"},
1485     {DCM_MAKETAG(0x300a, 0x0190), DCM_SQ, "     Fixation Device Sequence"},
1486     {DCM_MAKETAG(0x300a, 0x0192), DCM_CS, "     Fixation Device Type"},
1487     {DCM_MAKETAG(0x300a, 0x0194), DCM_SH, "     Fixation Device Label"},
1488     {DCM_MAKETAG(0x300a, 0x0196), DCM_ST, "     Fixation Device Description"},
1489     {DCM_MAKETAG(0x300a, 0x0198), DCM_SH, "     Fixation Device Position"},
1490     {DCM_MAKETAG(0x300a, 0x01a0), DCM_SQ, "     Shielding Device Sequence"},
1491     {DCM_MAKETAG(0x300a, 0x01a2), DCM_CS, "     Shielding Device Type"},
1492     {DCM_MAKETAG(0x300a, 0x01a4), DCM_SH, "     Shielding Device Label"},
1493     {DCM_MAKETAG(0x300a, 0x01a6), DCM_ST, "     Shielding Device Description"},
1494     {DCM_MAKETAG(0x300a, 0x01a8), DCM_SH, "     Shielding Device Position"},
1495     {DCM_MAKETAG(0x300a, 0x01b0), DCM_CS, "     Setup Technique"},
1496     {DCM_MAKETAG(0x300a, 0x01b2), DCM_ST, "     Setup Technique Description"},
1497     {DCM_MAKETAG(0x300a, 0x01b4), DCM_SQ, "     Setup Device Sequence"},
1498     {DCM_MAKETAG(0x300a, 0x01b6), DCM_CS, "     Setup Device Type"},
1499     {DCM_MAKETAG(0x300a, 0x01b8), DCM_SH, "     Setup Device Label"},
1500     {DCM_MAKETAG(0x300a, 0x01ba), DCM_ST, "     Setup Device Description"},
1501     {DCM_MAKETAG(0x300a, 0x01bc), DCM_DS, "     Setup Device Parameter"},
1502     {DCM_MAKETAG(0x300a, 0x01d0), DCM_ST, "     Setup Reference Description"},
1503     {DCM_MAKETAG(0x300a, 0x01d2), DCM_DS, "     Table Top Vertical Setup Displacement"},
1504     {DCM_MAKETAG(0x300a, 0x01d4), DCM_DS, "     Table Top Longitudinal Setup Displacement"},
1505     {DCM_MAKETAG(0x300a, 0x01d6), DCM_DS, "     Table Top Lateral Setup Displacement"},
1506     {DCM_MAKETAG(0x300a, 0x0200), DCM_CS, "     Brachy Treatment Technique"},
1507     {DCM_MAKETAG(0x300a, 0x0202), DCM_CS, "     Brachy Treatment Type"},
1508     {DCM_MAKETAG(0x300a, 0x0206), DCM_SQ, "     Treatment Machine Sequence"},
1509     {DCM_MAKETAG(0x300a, 0x0210), DCM_SQ, "     Source Sequence"},
1510     {DCM_MAKETAG(0x300a, 0x0212), DCM_IS, "     Source Number"},
1511     {DCM_MAKETAG(0x300a, 0x0214), DCM_CS, "     Source Type"},
1512     {DCM_MAKETAG(0x300a, 0x0216), DCM_LO, "     Source Manufacturer"},
1513     {DCM_MAKETAG(0x300a, 0x0218), DCM_DS, "     Active Source Diameter"},
1514     {DCM_MAKETAG(0x300a, 0x021a), DCM_DS, "     Active Source Length"},
1515     {DCM_MAKETAG(0x300a, 0x0222), DCM_DS, "     Source Encapsulation Nominal Thickness"},
1516     {DCM_MAKETAG(0x300a, 0x0224), DCM_DS, "     Source Encapsulation Nominal Transmission"},
1517     {DCM_MAKETAG(0x300a, 0x0226), DCM_LO, "     Source Isotope Name"},
1518     {DCM_MAKETAG(0x300a, 0x0228), DCM_DS, "     Source Isotope Half Life"},
1519     {DCM_MAKETAG(0x300a, 0x022a), DCM_DS, "     Reference Air Kerma Rate"},
1520     {DCM_MAKETAG(0x300a, 0x022c), DCM_DA, "     Air Kerma Rate Reference Date"},
1521     {DCM_MAKETAG(0x300a, 0x022e), DCM_TM, "     Air Kerma Rate Reference Time"},
1522     {DCM_MAKETAG(0x300a, 0x0230), DCM_SQ, "     Application Setup Sequence"},
1523     {DCM_MAKETAG(0x300a, 0x0232), DCM_CS, "     Application Setup Type"},
1524     {DCM_MAKETAG(0x300a, 0x0234), DCM_IS, "     Application Setup Number"},
1525     {DCM_MAKETAG(0x300a, 0x0236), DCM_LO, "     Application Setup Name"},
1526     {DCM_MAKETAG(0x300a, 0x0238), DCM_LO, "     Application Setup Manufacturer"},
1527     {DCM_MAKETAG(0x300a, 0x0240), DCM_IS, "     Template Number"},
1528     {DCM_MAKETAG(0x300a, 0x0242), DCM_SH, "     Template Type"},
1529     {DCM_MAKETAG(0x300a, 0x0244), DCM_LO, "     Template Name"},
1530     {DCM_MAKETAG(0x300a, 0x0250), DCM_DS, "     Total Reference Air Kerma"},
1531     {DCM_MAKETAG(0x300a, 0x0260), DCM_SQ, "     Brachy Acessory Device Sequence"},
1532     {DCM_MAKETAG(0x300a, 0x0262), DCM_IS, "     Brachy Accessory Device Number"},
1533     {DCM_MAKETAG(0x300a, 0x0263), DCM_SH, "     Brachy Accessory Device ID"},
1534     {DCM_MAKETAG(0x300a, 0x0264), DCM_CS, "     Brachy Accessory Device Type"},
1535     {DCM_MAKETAG(0x300a, 0x0266), DCM_LO, "     Brachy Accessory Device Name"},
1536     {DCM_MAKETAG(0x300a, 0x026a), DCM_DS, "     Brachy Accessory Device Nominal Thickness"},
1537     {DCM_MAKETAG(0x300a, 0x026c), DCM_DS, "     Brachy Acc'ry Device Nominal Transmission"},
1538     {DCM_MAKETAG(0x300a, 0x0280), DCM_SQ, "     Channel Sequence"},
1539     {DCM_MAKETAG(0x300a, 0x0282), DCM_IS, "     Channel Number"},
1540     {DCM_MAKETAG(0x300a, 0x0284), DCM_DS, "     Channel Length"},
1541     {DCM_MAKETAG(0x300a, 0x0286), DCM_DS, "     Channel Total Time"},
1542     {DCM_MAKETAG(0x300a, 0x0288), DCM_CS, "     Source Movement Type"},
1543     {DCM_MAKETAG(0x300a, 0x028a), DCM_IS, "     Number of Pulses"},
1544     {DCM_MAKETAG(0x300a, 0x028c), DCM_DS, "     Pulse Repetition Interval"},
1545     {DCM_MAKETAG(0x300a, 0x0290), DCM_IS, "     Source Applicator Number"},
1546     {DCM_MAKETAG(0x300a, 0x0291), DCM_SH, "     Source Applicator ID"},
1547     {DCM_MAKETAG(0x300a, 0x0292), DCM_CS, "     Source Applicator Type"},
1548     {DCM_MAKETAG(0x300a, 0x0294), DCM_LO, "     Source Applicator Name"},
1549     {DCM_MAKETAG(0x300a, 0x0296), DCM_DS, "     Source Applicator Length"},
1550     {DCM_MAKETAG(0x300a, 0x0298), DCM_LO, "     Source Applicator Manufacturer"},
1551     {DCM_MAKETAG(0x300a, 0x029c), DCM_DS, "     Source Applicator Wall Nominal Thickness"},
1552     {DCM_MAKETAG(0x300a, 0x029e), DCM_DS, "     Src Applicator Wall Nominal Transmission"},
1553     {DCM_MAKETAG(0x300a, 0x02a0), DCM_DS, "     Source Applicator Step Size"},
1554     {DCM_MAKETAG(0x300a, 0x02a2), DCM_IS, "     Transfer Tube Number"},
1555     {DCM_MAKETAG(0x300a, 0x02a4), DCM_DS, "     Transfer Tube Length"},
1556     {DCM_MAKETAG(0x300a, 0x02b0), DCM_SQ, "     Channel Shield Sequence"},
1557     {DCM_MAKETAG(0x300a, 0x02b2), DCM_IS, "     Channel Shield Number"},
1558     {DCM_MAKETAG(0x300a, 0x02b3), DCM_SH, "     Channel Shield ID"},
1559     {DCM_MAKETAG(0x300a, 0x02b4), DCM_LO, "     Channel Shield Name"},
1560     {DCM_MAKETAG(0x300a, 0x02b8), DCM_DS, "     Channel Shield Nominal Thickness"},
1561     {DCM_MAKETAG(0x300a, 0x02ba), DCM_DS, "     Channel Shield Nominal Transmission"},
1562     {DCM_MAKETAG(0x300a, 0x02c8), DCM_DS, "     Final Cumulative Time Weight"},
1563     {DCM_MAKETAG(0x300a, 0x02d0), DCM_SQ, "     Brachy Control Point Sequence"},
1564     {DCM_MAKETAG(0x300a, 0x02d2), DCM_DS, "   Control Point Relative Position"},
1565     {DCM_MAKETAG(0x300a, 0x02d4), DCM_DS, "     Control Point 3D Position"},
1566     {DCM_MAKETAG(0x300a, 0x02d6), DCM_DS, "     Cumulative Time Weight"}
1567 };
1568 
1569 /* Define the entries in the 0x300C group, used in RT planning.
1570 */
1571 static DCMDICT G300C_dictionary[] = {
1572     {DCM_MAKETAG(0x300c, 0x0000), DCM_UL, "     Group Length"},
1573     {DCM_MAKETAG(0x300c, 0x0002), DCM_SQ, "     Referenced RT Plan Sequence"},
1574     {DCM_MAKETAG(0x300c, 0x0004), DCM_SQ, "     Referenced Beam Sequence"},
1575     {DCM_MAKETAG(0x300c, 0x0006), DCM_IS, "     Referenced Beam Number"},
1576     {DCM_MAKETAG(0x300c, 0x0007), DCM_IS, "     Referenced Reference Image Number"},
1577     {DCM_MAKETAG(0x300c, 0x0008), DCM_DS, "     Start Cumulative Meterset Weight"},
1578     {DCM_MAKETAG(0x300c, 0x0009), DCM_DS, "     End Cumulative Meterset Weight"},
1579     {DCM_MAKETAG(0x300c, 0x000a), DCM_SQ, "     Referenced Brachy Application Setup Seq"},
1580     {DCM_MAKETAG(0x300c, 0x000c), DCM_IS, "     Referenced Brachy Application Setup Number"},
1581     {DCM_MAKETAG(0x300c, 0x000e), DCM_IS, "     Referenced Source Number"},
1582     {DCM_MAKETAG(0x300c, 0x0020), DCM_SQ, "     Referenced Fraction Group Sequence"},
1583     {DCM_MAKETAG(0x300c, 0x0022), DCM_IS, "     Referenced Fraction Group Number"},
1584     {DCM_MAKETAG(0x300c, 0x0040), DCM_SQ, "     Referenced Verification Image Sequence"},
1585     {DCM_MAKETAG(0x300c, 0x0042), DCM_SQ, "     Referenced Reference Image Sequence"},
1586     {DCM_MAKETAG(0x300c, 0x0050), DCM_SQ, "     Referenced Dose Reference Sequence"},
1587     {DCM_MAKETAG(0x300c, 0x0051), DCM_IS, "     Referenced Dose Reference Numer"},
1588     {DCM_MAKETAG(0x300c, 0x0055), DCM_SQ, "     Brachy Referenced Dose Reference Sequence"},
1589     {DCM_MAKETAG(0x300c, 0x0060), DCM_SQ, "     Referenced Structure Set Sequence"},
1590     {DCM_MAKETAG(0x300c, 0x006a), DCM_IS, "     Referenced Patient Setup Number"},
1591     {DCM_MAKETAG(0x300c, 0x0080), DCM_SQ, "     Referenced Dose Sequence"},
1592     {DCM_MAKETAG(0x300c, 0x00a0), DCM_IS, "     Referenced Tolerance Table Number"},
1593     {DCM_MAKETAG(0x300c, 0x00b0), DCM_SQ, "     Referenced Bolus Sequence"},
1594     {DCM_MAKETAG(0x300c, 0x00c0), DCM_IS, "     Referenced Wedge Number"},
1595     {DCM_MAKETAG(0x300c, 0x00d0), DCM_IS, "     Referenced Compensator Number"},
1596     {DCM_MAKETAG(0x300c, 0x00e0), DCM_IS, "     Referenced Block Number"},
1597     {DCM_MAKETAG(0x300c, 0x00f0), DCM_IS, "     Referenced Control Point Index"}
1598 };
1599 
1600 
1601 /* Define the entries in the 0x300E group, used in RT planning.
1602 */
1603 static DCMDICT G300E_dictionary[] = {
1604     {DCM_MAKETAG(0x300e, 0x0000), DCM_UL, "     Group Length"},
1605     {DCM_MAKETAG(0x300e, 0x0002), DCM_CS, "     Approval Status"},
1606     {DCM_MAKETAG(0x300e, 0x0004), DCM_DA, "     Review Date"},
1607     {DCM_MAKETAG(0x300e, 0x0005), DCM_TM, "     Review Time"},
1608     {DCM_MAKETAG(0x300e, 0x0008), DCM_PN, "     Reviewer Name"}
1609 };
1610 
1611 /* Defines the entries in the Text group (4000)
1612 */
1613 #if 0
1614 static DCMDICT TXT_dictionary[] = {
1615 };
1616 #endif
1617 
1618 /* Define the entries in the PAD group, 0xfffc
1619 */
1620 
1621 static DCMDICT PAD_dictionary[] = {
1622     {DCM_PADITEM, DCM_OB, "Pad item"}
1623 };
1624 
1625 /* Define the entries in the DELIMITER group, 0xfffe
1626 */
1627 
1628 static DCMDICT DLM_dictionary[] = {
1629     {DCM_DLMITEM, DCM_DLM, "DELIMITER Item"},
1630     {DCM_DLMITEMDELIMITATIONITEM, DCM_DLM, "DELIMITER Item Delimitation Item"},
1631     {DCM_DLMSEQUENCEDELIMITATIONITEM, DCM_DLM, "DELIMITER Sequence Delimitation Item"}
1632 };
1633 
1634 /* Define the outer layer dictionary which contains group numbers and
1635 ** pointers to each of the individual group lists.
1636 */
1637 
1638 static GROUPPTR group_dictionary[] = {
1639     {DCM_GROUPCOMMAND, sizeof(CMD_dictionary) / sizeof(DCMDICT), CMD_dictionary},
1640     {DCM_GROUPFILEMETA, sizeof(META_dictionary) / sizeof(DCMDICT), META_dictionary},
1641     {DCM_GROUPBASICDIRINFO, sizeof(BASICDIR_dictionary) / sizeof(DCMDICT), BASICDIR_dictionary},
1642     {DCM_GROUPIDENTIFYING,
1643     sizeof(ID_dictionary) / sizeof(DCMDICT), ID_dictionary},
1644     {DCM_GROUPPATIENTINFO,
1645     sizeof(PAT_dictionary) / sizeof(DCMDICT), PAT_dictionary},
1646     {DCM_GROUPACQUISITION,
1647     sizeof(ACQ_dictionary) / sizeof(DCMDICT), ACQ_dictionary},
1648     {DCM_GROUPRELATIONSHIP,
1649     sizeof(REL_dictionary) / sizeof(DCMDICT), REL_dictionary},
1650     {DCM_GROUPIMAGE,
1651     sizeof(IMG_dictionary) / sizeof(DCMDICT), IMG_dictionary},
1652     {DCM_GROUPSTUDY,
1653     sizeof(SDY_dictionary) / sizeof(DCMDICT), SDY_dictionary},
1654     {DCM_GROUPVISIT,
1655     sizeof(VIS_dictionary) / sizeof(DCMDICT), VIS_dictionary},
1656     {DCM_GROUPWAVEFORM,
1657     sizeof(WAV_dictionary) / sizeof(DCMDICT), WAV_dictionary},
1658     {DCM_GRPPROCEDURE,
1659     sizeof(PRC_dictionary) / sizeof(DCMDICT), PRC_dictionary},
1660     {DCM_GROUPDEVICE,
1661     sizeof(DEV_dictionary) / sizeof(DCMDICT), DEV_dictionary},
1662     {DCM_GROUPNMIMAGE,
1663     sizeof(NMI_dictionary) / sizeof(DCMDICT), NMI_dictionary},
1664     {DCM_GROUPMEDIA,
1665     sizeof(MED_dictionary) / sizeof(DCMDICT), MED_dictionary},
1666     {DCM_GROUPBASICFILMSESSION,
1667     sizeof(BFS_dictionary) / sizeof(DCMDICT), BFS_dictionary},
1668     {DCM_GROUPBASICFILMBOX,
1669     sizeof(BFB_dictionary) / sizeof(DCMDICT), BFB_dictionary},
1670     {DCM_GROUPBASICIMAGEBOX,
1671     sizeof(BIB_dictionary) / sizeof(DCMDICT), BIB_dictionary},
1672     {DCM_GROUPBASICANNOTATIONBOX,
1673     sizeof(BAB_dictionary) / sizeof(DCMDICT), BAB_dictionary},
1674     {DCM_GROUPBASICIMAGEOVERLAYBOX,
1675     sizeof(IOB_dictionary) / sizeof(DCMDICT), IOB_dictionary},
1676     {DCM_GROUPPRINTJOB,
1677     sizeof(PJ_dictionary) / sizeof(DCMDICT), PJ_dictionary},
1678     {DCM_GROUPPRINTER,
1679     sizeof(PRN_dictionary) / sizeof(DCMDICT), PRN_dictionary},
1680     {0x3002,
1681     sizeof(G3002_dictionary) / sizeof(DCMDICT), G3002_dictionary},
1682     {0x3004,
1683     sizeof(DVH_dictionary) / sizeof(DCMDICT), DVH_dictionary},
1684     {0x3006,
1685     sizeof(SSET_dictionary) / sizeof(DCMDICT), SSET_dictionary},
1686     {0x300a,
1687     sizeof(G300A_dictionary) / sizeof(DCMDICT), G300A_dictionary},
1688     {0x300c,
1689     sizeof(G300C_dictionary) / sizeof(DCMDICT), G300C_dictionary},
1690     {0x300e,
1691     sizeof(G300E_dictionary) / sizeof(DCMDICT), G300E_dictionary},
1692 
1693 /*  Add this entry in when we define retired attributes
1694 **  in text group.
1695 */
1696 #if 0
1697     {DCM_GROUPTEXT,
1698     sizeof(TXT_dictionary) / sizeof(DCMDICT), TXT_dictionary},
1699 #endif
1700     {DCM_GROUPRESULTS,
1701     sizeof(RES_dictionary) / sizeof(DCMDICT), RES_dictionary},
1702     {DCM_GROUPCURVE,
1703     sizeof(CRV_dictionary) / sizeof(DCMDICT), CRV_dictionary},
1704     {DCM_GROUPOVERLAY,
1705     sizeof(OLY_dictionary) / sizeof(DCMDICT), OLY_dictionary},
1706     {DCM_GROUPPIXEL,
1707     sizeof(PXL_dictionary) / sizeof(DCMDICT), PXL_dictionary},
1708     {DCM_GROUPPAD,
1709     sizeof(PAD_dictionary) / sizeof(DCMDICT), PAD_dictionary},
1710     {DCM_GROUPDELIMITER,
1711     sizeof(DLM_dictionary) / sizeof(DCMDICT), DLM_dictionary}
1712 };
1713 
1714 
1715 /* DCM_LookupElement
1716 **
1717 ** Purpose:
1718 **      Lookup an element in the DICOM dictionary and return information
1719 **      about the element, including representation, type and english
1720 **      description.
1721 **
1722 ** Parameter Dictionary:
1723 **      element         Pointer to an DCM element (group, element) to
1724 **                      be found in the dictionary.
1725 **
1726 ** Return Values:
1727 **      DCM_NORMAL
1728 **      DCM_UNRECOGNIZEDGROUP
1729 **      DCM_UNRECOGNIZEDELEMENT
1730 **
1731 ** Algorithm:
1732 **      Set representation, type, englishDescription fields of caller's
1733 **      element to NULL values
1734 **      Search group_dictionary to find caller's group.
1735 **      If group not found,
1736 **          return DCM_UNRECOGNIZEDGROUP
1737 **      Search particular group list to find caller's element.
1738 **      If element not found,
1739 **          return DCM_UNRECOGNIZEDELEMENT
1740 **      Else
1741 **          Copy representation, type, englishDescription from dictionary
1742 **          to caller's element
1743 **          return DCM_NORMAL
1744 **      EndIf
1745 */
1746 
1747 CONDITION
1748 DCM_LookupElement(DCM_ELEMENT * element)
1749 {
1750     int
1751         found;
1752     unsigned long
1753         index,
1754         entries;
1755     GROUPPTR
1756         * p;
1757     DCMDICT
1758         * dictionaryPtr;
1759 
1760     element->representation = DCM_UNKNOWN;
1761     (void) strcpy(element->description, "");
1762 
1763     for (index = 0, p = NULL;
1764          index < sizeof(group_dictionary) / sizeof(group_dictionary[0]) && p == NULL;
1765          index++)
1766         if (DCM_TAG_GROUP(element->tag) == group_dictionary[index].group)
1767             p = &group_dictionary[index];
1768 
1769     if (p == NULL) {
1770         if (DCM_TAG_ELEMENT(element->tag) == 0x0000) {
1771             element->representation = DCM_UL;
1772             (void) strcpy(element->description, "Unknown group length");
1773             return DCM_NORMAL;
1774         }
1775         return COND_PushCondition(DCM_UNRECOGNIZEDGROUP,
1776                                   DCM_Message(DCM_UNRECOGNIZEDGROUP),
1777                                   DCM_TAG_GROUP(element->tag),
1778                                   "DCM_LookupElement");
1779     }
1780     entries = p->entries;
1781     dictionaryPtr = p->dict;
1782 
1783     for (found = 0; !found && entries > 0; entries--)
1784         if (element->tag == dictionaryPtr->tag)
1785             found++;
1786         else
1787             dictionaryPtr++;
1788 
1789     if (!found)
1790         return COND_PushCondition(DCM_UNRECOGNIZEDELEMENT,
1791                                   DCM_Message(DCM_UNRECOGNIZEDELEMENT),
1792                                   DCM_TAG_GROUP(element->tag),
1793                                   DCM_TAG_ELEMENT(element->tag),
1794                                   "DCM_LookupElement");
1795 
1796 
1797     element->representation = dictionaryPtr->representation;
1798     (void) strcpy(element->description, dictionaryPtr->englishDescription);
1799     return DCM_NORMAL;
1800 }
1801 
1802 typedef struct {
1803     unsigned short group;
1804     char *description;
1805 }   GROUP_DESCRIPTION;
1806 
1807 static GROUP_DESCRIPTION groupTable[] = {
1808     {0x0000, "Command"},
1809     {0x0002, "File Meta"},
1810     {0x0004, "Basic Directory Information"},
1811     {0x0008, "Identifying"},
1812     {0x0010, "Patient Information"},
1813     {0x0018, "Acquisition"},
1814     {0x0020, "Relationship"},
1815     {0x0028, "Image"},
1816     {0x0032, "Study"},
1817     {0x0038, "Visit"},
1818     {0x003a, "Waveform"},
1819     {0x0040, "Procedure Step"},
1820     {0x0050, "Device"},
1821     {0x0054, "NM Image"},
1822     {0x0088, "Media"},
1823     {0x2000, "Basic Film Session"},
1824     {0x2010, "Basic Film Box"},
1825     {0x2020, "Basic Image Box"},
1826     {0x2030, "Basic Annotation Box"},
1827     {0x2040, "Basic Image Overlay Box"},
1828     {0x2100, "Print Job"},
1829     {0x2110, "Printer"},
1830     {0x3002, "RT"},
1831     {0x3004, "Dose Volume Histogram"},
1832     {0x3006, "Structure Set"},
1833     {0x300a, "300a"},
1834     {0x300c, "300c"},
1835     {0x300e, "300e"},
1836 #if 0
1837     {0x4000, "Text"},
1838 #endif
1839     {0x4008, "Results"},
1840     {0x5000, "Curve"},
1841     {0x6000, "Overlay"},
1842     {0x7fe0, "Pixel"}
1843 };
1844 
1845 
1846 /* DCM_GroupDictionary
1847 **
1848 ** Purpose:
1849 **      DCM_GroupDictionary is used to lookup descriptions of groups in
1850 **      the internal DCM group dictionary.  Caller specifies one group
1851 **      with a group number or all groups by passing 0xffff.  For each
1852 **      group that matches (the one group or wildcard), this function
1853 **      invokes the caller's callback function.
1854 **      When the callback function is invoked, the arguments are the
1855 **      group number, an ASCII description of the group and user context
1856 **      information that was passed by the caller originally.
1857 **
1858 ** Parameter Dictionary:
1859 **      group           The number of the group to be found in the dictionary.
1860 **      ctx             User context information to be passed to callback
1861 **                      function.
1862 **      callback        The user's callback function, invoked once for each
1863 **                      group that is found during the dictionary lookup.
1864 **
1865 ** Return Values:
1866 **      DCM_NORMAL
1867 ** Notes:
1868 **
1869 ** Algorithm:
1870 **      Description of the algorithm (optional) and any other notes.
1871 */
1872 
1873 CONDITION
1874 DCM_GroupDictionary(unsigned short group, void *ctx,
1875           void (*callback) (unsigned short g, char *description, void *ctx))
1876 {
1877     int i;
1878 
1879     for (i = 0; i < (int) DIM_OF(groupTable); i++) {
1880         if ((group == 0xffff) || (group == groupTable[i].group)) {
1881             callback(groupTable[i].group, groupTable[i].description, ctx);
1882         }
1883     }
1884     return DCM_NORMAL;
1885 }
1886 
1887 /* DCM_ElementDictionary
1888 **
1889 ** Purpose:
1890 **      DCM_ElementDictionary is used to lookup descriptions of elements in
1891 **      the internal DCM element dictionary.  The caller can specify one
1892 **      element to be found or a number of elements as follows:
1893 **              (Group,  Element)       Description
1894 **              GGGG,    EEEE           Lookup one particular element (GGGGEEEE)
1895 **              GGGG,    0xffff         Lookup all elements in group GGGG
1896 **              0xffff,  EEEE           Lookup all elements in all groups with
1897 **                                      element number EEEE
1898 **              0xffff,  0xffff         Lookup all elements in all groups
1899 **      For each element that matches (the one element or wildcard), this
1900 **      function invokes the caller's callback function.
1901 **      When the callback function is invoked, the arguments are the
1902 **      element tag, an ASCII description of the element, the element value
1903 **      representation and user context information that was passed by
1904 **      the caller originally.
1905 **
1906 ** Parameter Dictionary:
1907 **      tag             The tag of the element to be found in the dictionary.
1908 **      ctx             User context information to be passed to callback
1909 **                      function.
1910 **      callback        The user's callback function, invoked once for each
1911 **                      element that is found during the dictionary lookup.
1912 **
1913 ** Return Values:
1914 **      DCM_NORMAL
1915 ** Notes:
1916 **
1917 ** Algorithm:
1918 **      Description of the algorithm (optional) and any other notes.
1919 */
1920 
1921 CONDITION
1922 DCM_ElementDictionary(DCM_TAG tag, void *ctx,
1923   void (*callback) (DCM_TAG t, char *description, DCM_VALUEREPRESENTATION r,
1924                     void *ctx))
1925 {
1926     int i;
1927     unsigned long j;
1928     GROUPPTR *p;
1929     DCMDICT *dictionaryPtr;
1930 
1931     for (i = 0; i < (int) DIM_OF(group_dictionary); i++) {
1932         if ((DCM_TAG_GROUP(tag) == group_dictionary[i].group) ||
1933             (DCM_TAG_GROUP(tag) == 0xffff)) {
1934             p = &group_dictionary[i];
1935             dictionaryPtr = p->dict;
1936             for (j = 0; j < p->entries; j++, dictionaryPtr++) {
1937                 if ((DCM_TAG_ELEMENT(tag) == 0xffff) ||
1938                     (DCM_TAG_ELEMENT(tag) == DCM_TAG_ELEMENT(dictionaryPtr->tag))) {
1939                     callback(dictionaryPtr->tag,
1940                              dictionaryPtr->englishDescription,
1941                              dictionaryPtr->representation,
1942                              ctx);
1943                 }
1944             }
1945         }
1946     }
1947     return DCM_NORMAL;
1948 }
1949 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.