X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmHeaderEntry.cxx;h=b445b624d4a6f70fcf3cedf2215c9bfb43a43833;hb=c5618e6b8276e1b21bbea354fe8bcba3c78eb4bd;hp=eda099ce8d65f185eac674ac5ef04a574ad6c93a;hpb=b9ab8805bd66e5fc6dc74788435df455899eb661;p=gdcm.git diff --git a/src/gdcmHeaderEntry.cxx b/src/gdcmHeaderEntry.cxx index eda099ce..b445b624 100644 --- a/src/gdcmHeaderEntry.cxx +++ b/src/gdcmHeaderEntry.cxx @@ -6,12 +6,6 @@ #include "gdcmGlobal.h" #include "gdcmUtil.h" -#ifdef GDCM_NO_ANSI_STRING_STREAM -# include -# define ostringstream ostrstream -# else -# include -#endif #include // for std::ios::left, ... @@ -104,7 +98,7 @@ void gdcmHeaderEntry::Print(std::ostream & os) { s << " [gdcm::too long for print (" << GetLength() << ") ]"; } - // Display the UID value (instead of displaying the rough code) + // Display the UID value (instead of displaying only the rough code) if (g == 0x0002) { // Any more to be displayed ? if ( (e == 0x0010) || (e == 0x0002) ) s << " ==>\t[" << ts->GetValue(v) << "]"; @@ -123,11 +117,12 @@ void gdcmHeaderEntry::Print(std::ostream & os) { if ( (vr == "UL") || (vr == "US") || (vr == "SL") || (vr == "SS") ) { if (v == "4294967295") // to avoid troubles in convertion sprintf (st," x(ffffffff)"); - else - { - //sprintf(st," x(%x)",(unsigned long)atof(v.c_str())); - sprintf(st," x(%x)", atoi(v.c_str()));//FIXME - } + else { + if ( GetLength() !=0 ) + sprintf(st," x(%x)", atoi(v.c_str()));//FIXME + else + sprintf(st," "); + } s << st; } s << std::endl;