2 //-----------------------------------------------------------------------------
3 #ifndef GDCMDICTENTRY_H
4 #define GDCMDICTENTRY_H
6 #include "gdcmCommon.h"
8 //-----------------------------------------------------------------------------
10 * \defgroup gdcmDictEntry
12 * the gdcmDictEntry in an element contained by the gdcmDict.
14 * - the key referenced by the DICOM norm or the constructor (for private keys)
15 * - the corresponding name in english (it's equivalent to a label)
19 class GDCM_EXPORT gdcmDictEntry
22 gdcmDictEntry(guint16 group,
24 std::string vr = "Unknown",
25 std::string fourth = "Unknown",
26 std::string name = "Unknown");
28 static TagKey TranslateToKey(guint16 group, guint16 element);
30 void SetVR(std::string);
33 * \ingroup gdcmDictEntry
34 * \brief tells if the V(alue) R(epresentation) is known (?!)
38 inline bool IsVRUnknown() {return vr == "??"; }
41 * \ingroup gdcmDictEntry
42 * \brief returns the Dicom Group Number of the current gdcmDictEntry
43 * return the Dicom Group Number
45 inline guint16 GetGroup(void) { return group; }
48 * \ingroup gdcmDictEntry
49 * \brief returns the Dicom Element Number of the current gdcmDictEntry
50 * return the Dicom Element Number
52 inline guint16 GetElement(void) { return element; }
55 * \ingroup gdcmDictEntry
56 * \brief returns the Dicom Value Representation of the current gdcmDictEntry
57 * return the Dicom Value Representation
59 inline std::string GetVR(void) { return vr; }
62 * \ingroup gdcmDictEntry
63 * \brief sets the key of the current gdcmDictEntry
64 * @param k New key to be set.
66 inline void SetKey(std::string k) { key = k; }
69 * \ingroup gdcmDictEntry
70 * \brief returns the Fourth field of the current gdcmDictEntry
71 * \warning NOT part of the Dicom Standard
72 * \ May be REMOVED an any time
74 * return the Fourth field
76 inline std::string GetFourth(void) { return fourth; }
79 * \ingroup gdcmDictEntry
80 * \brief returns the Dicom Name of the current gdcmDictEntry
81 * \ e.g. "Patient Name" for Dicom Tag (0x0010, 0x0010)
82 * return the Dicom Name
84 inline std::string GetName(void) { return name; }
87 * \ingroup gdcmDictEntry
88 * \brief Gets the key of the current gdcmDictEntry
91 inline std::string GetKey(void) { return key; }
94 // FIXME : 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 guint16 group; // e.g. 0x0010
103 /// DicomElement number
104 guint16 element; // e.g. 0x0103
106 * \ingroup gdcmDictEntry
107 * \brief Value Representation i.e. some clue about the nature
108 * of the data represented
109 * e.g. "FD" short for "Floating Point Double"
113 // CLEANME: find the official dicom name for this field !
115 * \ingroup gdcmDictEntry
116 * \brief Fourth field containing some semantics
118 * DON'T USER ANY LONGER !
121 /// e.g. "Patient's Name"
123 /// Redundant with (group, element) but we add it
124 /// on efficiency purposes.
126 * \ingroup gdcmDictEntry
127 * \brief Redundant with (group, element) but we add it
128 * on efficiency purposes.
131 // DCMTK has many fields for handling a DictEntry (see below). What are the
132 // relevant ones for gdcmlib ?
133 // struct DBI_SimpleEntry {
134 // Uint16 upperGroup;
135 // Uint16 upperElement;
137 // const char* tagName;
140 // const char* standardVersion;
141 // DcmDictRangeRestriction groupRestriction;
142 // DcmDictRangeRestriction elementRestriction;
146 //-----------------------------------------------------------------------------