1 /*=========================================================================
4 Module: $RCSfile: gdcmDictEntry.h,v $
6 Date: $Date: 2005/01/11 15:15:38 $
7 Version: $Revision: 1.28 $
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);
49 static TagKey TranslateToKey(uint16_t group, uint16_t element);
51 void SetVR(TagName const &vr);
52 void SetVM(TagName const &vm);
54 /// \brief tells if the V(alue) R(epresentation) is known (?!)
56 bool IsVRUnknown() { return VR == GDCM_UNKNOWN; }
58 /// \brief tells if the V(alue) M(ultiplicity) is known (?!)
60 bool IsVMUnknown() { return VM == GDCM_UNKNOWN; }
62 /// \brief Returns the Dicom Group Number of the current DictEntry
63 /// @return the Dicom Group Number
64 uint16_t GetGroup() { return Group; }
66 /// \brief Returns the Dicom Element Number of the current DictEntry
67 /// @return the Dicom Element Number
68 uint16_t GetElement() { return Element; }
70 /// \brief Returns the Dicom Value Representation of the current
72 /// @return the Dicom Value Representation
73 const TagName &GetVR() const { return VR; }
75 /// \brief sets the key of the current DictEntry
76 /// @param k New key to be set.
77 void SetKey(TagName const &k) { Key = k; }
79 /// \brief returns the VM field of the current DictEntry
80 /// @return The 'Value Multiplicity' field
81 const TagName &GetVM() const { return VM; }
83 /// \brief Returns the Dicom Name of the current DictEntry
84 /// e.g. "Patient Name" for Dicom Tag (0x0010, 0x0010)
85 /// @return the Dicom Name
86 const TagName &GetName() const { return Name; }
88 /// \brief Gets the key of the current DictEntry
90 const TagName &GetKey() const { return Key; }
94 /// where are the group and element used except from building up
95 /// a TagKey. If the answer is nowhere then there is no need
96 /// to store the group and element independently.
98 /// --> EVERYWHERE ! The alternate question would be :
99 /// What's TagKey used for ?
101 /// DicomGroup number
102 uint16_t Group; // e.g. 0x0010
104 /// DicomElement number
105 uint16_t Element; // e.g. 0x0103
107 /// \brief Value Representation i.e. some clue about the nature
108 /// of the data represented e.g. "FD" short for
109 /// "Floating Point Double" (see \ref VR)
114 * Formerly 'Group name abbreviations'
115 * Here is a small dictionary we encountered in "nature":
117 * - META Meta Information
129 * - NMI Nuclear Medicine
131 * - BFS Basic Film Session
132 * - BFB Basic Film Box
133 * - BIB Basic Image Box
148 * Other usefull abreviations used for Radiographic view associated with
149 * Patient Position (0018,5100):
150 * - AP = Anterior/Posterior
151 * - PA = Posterior/Anterior
152 * - LL = Left Lateral
153 * - RL = Right Lateral
154 * - RLD = Right Lateral Decubitus
155 * - LLD = Left Lateral Decubitus
156 * - RLO = Right Lateral Oblique
157 * - LLO = Left Lateral Oblique
160 /// \brief Value Multiplicity (e.g. "1", "1-n", "6")
163 /// e.g. "Patient's Name"
166 /// Redundant with (group, element) but we add it for efficiency purpose.
169 } // end namespace gdcm
170 //-----------------------------------------------------------------------------