]> Creatis software - gdcm.git/blobdiff - src/gdcmHeaderEntry.cxx
2004-04-28 Jean-Pierre Roux
[gdcm.git] / src / gdcmHeaderEntry.cxx
index eda099ce8d65f185eac674ac5ef04a574ad6c93a..b445b624d4a6f70fcf3cedf2215c9bfb43a43833 100644 (file)
@@ -6,12 +6,6 @@
 #include "gdcmGlobal.h"
 #include "gdcmUtil.h"
 
-#ifdef GDCM_NO_ANSI_STRING_STREAM
-#  include <strstream>
-#  define  ostringstream ostrstream
-# else
-#  include <sstream>
-#endif
 #include <iomanip> // 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;