1 /*=========================================================================
4 Module: $RCSfile: gdcmDictEntry.h,v $
6 Date: $Date: 2005/02/02 15:07:41 $
7 Version: $Revision: 1.34 $
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 //-----------------------------------------------------------------------------
30 * the DictEntry in an element contained by the Dict.
32 * - the key referenced by the DICOM norm or the constructor (for private keys)
33 * i.e. the Group number
35 * - the VR (Value Representation)
36 * - the VM (Value Multplicity)
37 * - the corresponding name in english
39 class GDCM_EXPORT DictEntry : public Base
42 DictEntry(uint16_t group,
44 TagName const &vr = GDCM_UNKNOWN,
45 TagName const &vm = GDCM_UNKNOWN,
46 TagName const &name = GDCM_UNKNOWN);
49 void Print(std::ostream &os = std::cout, std::string const &indent = "");
51 // Content of DictEntry
52 void SetVR(TagName const &vr);
53 void SetVM(TagName const &vm);
55 /// \brief tells if the V(alue) R(epresentation) is known (?!)
57 bool IsVRUnknown() { return VR == GDCM_UNKNOWN; }
59 /// \brief tells if the V(alue) M(ultiplicity) is known (?!)
61 bool IsVMUnknown() { return VM == GDCM_UNKNOWN; }
63 /// \brief Returns the Dicom Group Number of the current DictEntry
64 /// @return the Dicom Group Number
65 uint16_t GetGroup() { return Group; }
67 /// \brief Returns the Dicom Element Number of the current DictEntry
68 /// @return the Dicom Element Number
69 uint16_t GetElement() { return Element; }
71 /// \brief Returns the Dicom Value Representation of the current
73 /// @return the Dicom Value Representation
74 const TagName &GetVR() const { return VR; }
76 /// \brief sets the key of the current DictEntry
77 /// @param k New key to be set.
78 void SetKey(TagName const &k) { Key = k; }
80 /// \brief returns the VM field of the current DictEntry
81 /// @return The 'Value Multiplicity' field
82 const TagName &GetVM() const { return VM; }
84 /// \brief Returns the Dicom Name of the current DictEntry
85 /// e.g. "Patient Name" for Dicom Tag (0x0010, 0x0010)
86 /// @return the Dicom Name
87 const TagName &GetName() const { return Name; }
89 /// \brief Gets the key of the current DictEntry
91 const TagName &GetKey() const { return Key; }
94 static TagKey TranslateToKey(uint16_t group, uint16_t elem);
98 /// where are the group and elem used except from building up
99 /// a TagKey. If the answer is nowhere then there is no need
100 /// to store the group and elem independently.
102 /// --> EVERYWHERE ! The alternate question would be :
103 /// What's TagKey used for ?
105 /// DicomGroup number
106 uint16_t Group; // e.g. 0x0010
108 /// DicomElement number
109 uint16_t Element; // e.g. 0x0103
111 /// \brief Value Representation i.e. some clue about the nature
112 /// of the data represented e.g.
113 /// "FD" short for "Floating Point Double"(see \ref VR)
114 /// "PN" short for "Person Name"
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 //-----------------------------------------------------------------------------