]> Creatis software - gdcm.git/commitdiff
* Bug fix in the print of hexadecimal representations. Remove long fields
authorregrain <regrain>
Mon, 26 Jan 2004 13:16:23 +0000 (13:16 +0000)
committerregrain <regrain>
Mon, 26 Jan 2004 13:16:23 +0000 (13:16 +0000)
       in the print and add a third level of print to print them
     -- BeNours

ChangeLog
src/gdcmHeaderEntry.cxx

index 9d502b4754572fcfd430feeb4737c3e6346231fe..cd5be974b3002c0d33674b99c5fe81b24540e98d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2004-01-26 Benoit Regrain
+     * Bug fix in the print of hexadecimal representations. Remove long fields 
+       in the print and add a third level of print to print them
+
 2004-01-23 Benoit Regrain
      * Bug fix on field having a VR = 'UI'. Assume that is a string field
      * Bug fix on test suite after remove the strip made on not string fields
index d56d92117ab2cd3513a14547fbefde32aa1c30ab..5832ad315e8763c7b46c3c014a723fa40a099927 100644 (file)
@@ -79,7 +79,10 @@ void gdcmHeaderEntry::Print(std::ostream & os) {
    } 
      
    s << "[" << GetName()<< "]";       
-   s << " [" << d2 << "]";
+   if( (GetLength()<64) || (printLevel>=3) )
+      s << " [" << d2 << "]";
+   else
+      s << " [ gdcm::too long for print (" << GetLength() << ") ]";
 
    // Display the UID value (instead of displaying the rough code)  
    if (g == 0x0002) {  // Any more to be displayed ?
@@ -96,7 +99,7 @@ void gdcmHeaderEntry::Print(std::ostream & os) {
       if (v == "4294967295") // to avoid troubles in convertion 
          sprintf (st," x(ffffffff)");
       else     
-         sprintf(st," x(%x)",atoi(v.c_str()));
+         sprintf(st," x(%x)",(unsigned long)atof(v.c_str()));
       s << st;
    }
    s << std::endl;