3 //This is needed when compiling in debug mode
5 // 'identifier' : class 'type' needs to have dll-interface to be used by
6 // clients of class 'type2'
7 #pragma warning ( disable : 4251 )
8 // 'identifier' : identifier was truncated to 'number' characters in the
10 #pragma warning ( disable : 4786 )
13 #include <stdio.h> // FIXME For sprintf
14 #include "gdcmDictEntry.h"
18 gdcmDictEntry::gdcmDictEntry(guint16 InGroup, guint16 InElement,
19 std::string InVr, std::string InFourth,
26 key = TranslateToKey(group, element);
29 TagKey gdcmDictEntry::TranslateToKey(guint16 group, guint16 element) {
32 // CLEAN ME: better call the iostream<< with the hex manipulator on.
33 // This requires some reading of the stdlibC++ sources to make the
34 // proper call (or copy).
35 sprintf(trash, "%04x|%04x", group , element);
36 key = trash; // Convertion through assignement
41 * \ingroup gdcmDictEntry
42 * \brief If-and only if-the vr is unset then overwrite it.
43 * @param NewVr New vr to be set.
45 void gdcmDictEntry::SetVR(std::string NewVr) {
49 dbg.Error(true, "gdcmDictEntry::SetVR",
50 "Overwriting vr might compromise a dictionary");
54 bool gdcmDictEntry::IsVrUnknown() {
55 if ( vr == "Unknown" )