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