1 /*=========================================================================
4 Module: $RCSfile: gdcmDictEntry.h,v $
6 Date: $Date: 2004/07/02 13:55:27 $
7 Version: $Revision: 1.15 $
9 Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
10 l'Image). All rights reserved. See Doc/License.txt or
11 http://www.creatis.insa-lyon.fr/Public/Gdcm/License.htm for details.
13 This software is distributed WITHOUT ANY WARRANTY; without even
14 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 PURPOSE. See the above copyright notices for more information.
17 =========================================================================*/
19 #ifndef GDCMDICTENTRY_H
20 #define GDCMDICTENTRY_H
22 #include "gdcmCommon.h"
24 //-----------------------------------------------------------------------------
26 * \defgroup gdcmDictEntry
28 * the gdcmDictEntry in an element contained by the gdcmDict.
30 * - the key referenced by the DICOM norm or the constructor (for private keys)
31 * - the corresponding name in english (it's equivalent to a label)
35 class GDCM_EXPORT gdcmDictEntry
38 gdcmDictEntry(uint16_t group,
40 std::string vr = "Unknown",
41 std::string fourth = "Unknown",
42 std::string name = "Unknown");
44 static gdcmTagKey TranslateToKey(uint16_t group, uint16_t element);
46 void SetVR(std::string);
48 /// \brief tells if the V(alue) R(epresentation) is known (?!)
50 bool IsVRUnknown() {return vr == "??"; }
52 /// \brief Returns the Dicom Group Number of the current gdcmDictEntry
53 /// @return the Dicom Group Number
54 uint16_t GetGroup() { return group; }
56 /// \brief Returns the Dicom Element Number of the current gdcmDictEntry
57 /// @return the Dicom Element Number
58 uint16_t GetElement() { return element; }
60 /// \brief Returns the Dicom Value Representation of the current
62 /// @return the Dicom Value Representation
63 std::string GetVR() { return vr; }
65 /// \brief sets the key of the current gdcmDictEntry
66 /// @param k New key to be set.
67 void SetKey(std::string k) { key = k; }
69 /// \brief returns the Fourth field of the current gdcmDictEntry
70 /// \warning NOT part of the Dicom Standard.
71 /// May be REMOVED an any time. NEVER use it.
72 /// @return The Fourth field
73 std::string GetFourth(void) { return fourth; }
75 /// \brief Returns the Dicom Name of the current gdcmDictEntry
76 /// e.g. "Patient Name" for Dicom Tag (0x0010, 0x0010)
77 /// @return the Dicom Name
78 std::string GetName(void) { return name; }
80 /// \brief Gets the key of the current gdcmDictEntry
82 std::string GetKey(void) { return key; }
86 /// where are the group and element used except from building up
87 /// a gdcmTagKey. If the answer is nowhere then there is no need
88 /// to store the group and element independently.
90 /// --> EVERYWHERE ! The alternate question would be :
91 /// What's gdcmTagKey used for ?
94 uint16_t group; // e.g. 0x0010
96 /// DicomElement number
97 uint16_t element; // e.g. 0x0103
99 /// \brief Value Representation i.e. some clue about the nature
100 /// of the data represented e.g. "FD" short for
101 /// "Floating Point Double" (see \ref gdcmVR)
105 * \brief AVOID using the following fourth field at all costs.
107 * They are at leat two good reasons for NOT using fourth:
108 * - the main reason is that it is NOT part of the 'official'
110 * - a second reason is that it is not defined for all the groups.
112 * Still it provides some semantics as group name abbreviation that
113 * can prove of some help when organizing things in an interface.
114 * For the time being we keep it in gdcm but it migth be removed in
115 * future releases it proves to be source of confusion.
116 * Here is a small dictionary we encountered in "nature":
118 * - META Meta Information
130 * - NMI Nuclear Medicine
132 * - BFS Basic Film Session
133 * - BFB Basic Film Box
134 * - BIB Basic Image Box
149 * Other usefull abreviations used for Radiographic view associated with
150 * Patient Position (0018,5100):
151 * - AP = Anterior/Posterior
152 * - PA = Posterior/Anterior
153 * - LL = Left Lateral
154 * - RL = Right Lateral
155 * - RLD = Right Lateral Decubitus
156 * - LLD = Left Lateral Decubitus
157 * - RLO = Right Lateral Oblique
158 * - LLO = Left Lateral Oblique
163 /// e.g. "Patient's Name"
166 /// Redundant with (group, element) but we add it on efficiency purposes.
170 //-----------------------------------------------------------------------------