3 #include "gdcmDictEntry.h"
5 #include <stdio.h> // FIXME For sprintf
9 * \ingroup gdcmDictEntry
14 * @param InFourth // DO NOT use any longer
15 * NOT part of the Dicom Standard
19 gdcmDictEntry::gdcmDictEntry(guint16 InGroup, guint16 InElement,
20 std::string InVr, std::string InFourth,
27 key = TranslateToKey(group, element);
31 * \ingroup gdcmDictEntry
32 * \brief concatenates 2 guint16 (supposed to be a Dicom group number
33 * and a Dicom element number)
34 * @param group the Dicom group number used to build the tag
35 * @param group the Dicom element number used to build the tag
36 * return the built tag
39 TagKey gdcmDictEntry::TranslateToKey(guint16 group, guint16 element) {
42 // CLEAN ME: better call the iostream<< with the hex manipulator on.
43 // This requires some reading of the stdlibC++ sources to make the
44 // proper call (or copy).
45 sprintf(trash, "%04x|%04x", group , element);
46 key = trash; // Convertion through assignement
51 * \ingroup gdcmDictEntry
52 * \brief If-and only if-the V(alue) R(epresentation)
53 * is unset then overwrite it.
54 * @param NewVr New V(alue) R(epresentation) to be set.
56 void gdcmDictEntry::SetVR(std::string NewVr) {
60 dbg.Error(true, "gdcmDictEntry::SetVR",
61 "Overwriting vr might compromise a dictionary");