3 #include <stdio.h> // FIXME For sprintf
4 #include "gdcmDictEntry.h"
8 gdcmDictEntry::gdcmDictEntry(guint16 InGroup, guint16 InElement,
9 std::string InVr, std::string InFourth,
16 key = TranslateToKey(group, element);
19 TagKey gdcmDictEntry::TranslateToKey(guint16 group, guint16 element) {
22 // CLEAN ME: better call the iostream<< with the hex manipulator on.
23 // This requires some reading of the stdlibC++ sources to make the
24 // proper call (or copy).
25 sprintf(trash, "%04x|%04x", group , element);
26 key = trash; // Convertion through assignement
31 * \ingroup gdcmDictEntry
32 * \brief If-and only if-the vr is unset then overwrite it.
33 * @param NewVr New vr to be set.
35 void gdcmDictEntry::SetVR(std::string NewVr) {
39 dbg.Error(true, "gdcmDictEntry::SetVR",
40 "Overwriting vr might compromise a dictionary");
44 bool gdcmDictEntry::IsVrUnknown() {
45 if ( vr == "Unknown" )