1 /*=========================================================================
4 Module: $RCSfile: gdcmDictEntry.h,v $
6 Date: $Date: 2005/01/20 11:39:49 $
7 Version: $Revision: 1.31 $
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.html 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
27 //-----------------------------------------------------------------------------
31 * the DictEntry in an element contained by the Dict.
33 * - the key referenced by the DICOM norm or the constructor (for private keys)
34 * i.e. the Group number
36 * - the VR (Value Representation)
37 * - the VM (Value Multplicity)
38 * - the corresponding name in english
40 class GDCM_EXPORT DictEntry : public Base
43 DictEntry(uint16_t group,
45 TagName const &vr = GDCM_UNKNOWN,
46 TagName const &vm = GDCM_UNKNOWN,
47 TagName const &name = GDCM_UNKNOWN);
50 void Print(std::ostream &os = std::cout, std::string const &indent = "");
53 static TagKey TranslateToKey(uint16_t group, uint16_t elem);
55 // Content of DictEntry
56 void SetVR(TagName const &vr);
57 void SetVM(TagName const &vm);
59 /// \brief tells if the V(alue) R(epresentation) is known (?!)
61 bool IsVRUnknown() { return VR == GDCM_UNKNOWN; }
63 /// \brief tells if the V(alue) M(ultiplicity) is known (?!)
65 bool IsVMUnknown() { return VM == GDCM_UNKNOWN; }
67 /// \brief Returns the Dicom Group Number of the current DictEntry
68 /// @return the Dicom Group Number
69 uint16_t GetGroup() { return Group; }
71 /// \brief Returns the Dicom Element Number of the current DictEntry
72 /// @return the Dicom Element Number
73 uint16_t GetElement() { return Element; }
75 /// \brief Returns the Dicom Value Representation of the current
77 /// @return the Dicom Value Representation
78 const TagName &GetVR() const { return VR; }
80 /// \brief sets the key of the current DictEntry
81 /// @param k New key to be set.
82 void SetKey(TagName const &k) { Key = k; }
84 /// \brief returns the VM field of the current DictEntry
85 /// @return The 'Value Multiplicity' field
86 const TagName &GetVM() const { return VM; }
88 /// \brief Returns the Dicom Name of the current DictEntry
89 /// e.g. "Patient Name" for Dicom Tag (0x0010, 0x0010)
90 /// @return the Dicom Name
91 const TagName &GetName() const { return Name; }
93 /// \brief Gets the key of the current DictEntry
95 const TagName &GetKey() const { return Key; }
99 /// where are the group and elem used except from building up
100 /// a TagKey. If the answer is nowhere then there is no need
101 /// to store the group and elem independently.
103 /// --> EVERYWHERE ! The alternate question would be :
104 /// What's TagKey used for ?
106 /// DicomGroup number
107 uint16_t Group; // e.g. 0x0010
109 /// DicomElement number
110 uint16_t Element; // e.g. 0x0103
112 /// \brief Value Representation i.e. some clue about the nature
113 /// of the data represented e.g. "FD" short for
114 /// "Floating Point Double" (see \ref VR)
119 * Formerly 'Group name abbreviations'
120 * Here is a small dictionary we encountered in "nature":
122 * - META Meta Information
134 * - NMI Nuclear Medicine
136 * - BFS Basic Film Session
137 * - BFB Basic Film Box
138 * - BIB Basic Image Box
153 * Other usefull abreviations used for Radiographic view associated with
154 * Patient Position (0018,5100):
155 * - AP = Anterior/Posterior
156 * - PA = Posterior/Anterior
157 * - LL = Left Lateral
158 * - RL = Right Lateral
159 * - RLD = Right Lateral Decubitus
160 * - LLD = Left Lateral Decubitus
161 * - RLO = Right Lateral Oblique
162 * - LLO = Left Lateral Oblique
165 /// \brief Value Multiplicity (e.g. "1", "1-n", "6")
168 /// e.g. "Patient's Name"
171 /// Redundant with (group, elem) but we add it for efficiency purpose.
174 } // end namespace gdcm
175 //-----------------------------------------------------------------------------