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