]> Creatis software - gdcm.git/commitdiff
modif in Header printing
authorjpr <jpr>
Wed, 14 Jan 2004 10:25:30 +0000 (10:25 +0000)
committerjpr <jpr>
Wed, 14 Jan 2004 10:25:30 +0000 (10:25 +0000)
src/gdcmHeader.cxx
src/gdcmHeaderEntrySet.cxx

index 4c39aadaec40a1a4a179814022f94b49f2fa1bc0..cdef172136871aba03209309e8eef4f5489f0661 100644 (file)
@@ -1830,6 +1830,22 @@ void gdcmHeader::FixHeaderEntryFoundLength(gdcmHeaderEntry * ElVal, guint32 Foun
          FoundLength =0;        
    } 
     
+
+    // a SeQuence Element is beginning                                          
+    // Let's forget it's length                                                 
+    // (we want to 'go inside')  
+    
+    // Pb : *normaly*  fffe|e000 is just a marker, its length *should be* zero
+    // in gdcm-MR-PHILIPS-16-Multi-Seq.dcm we find lengthes as big as 28800
+    // if we set the length to zero IsAnInteger() breaks...
+    // if we don't, we lost 28800 characters from the Header :-(
+                                                 
+   else if(ElVal->GetGroup() == 0xfffe){ 
+      //printf("========================= %08x %d\n",FoundLength,FoundLength);
+                         // sometimes, length seems to be wrong                                      
+      //FoundLength =0;  // some more clever checking to be done !                                                     
+   }     
+    
    ElVal->SetUsableLength(FoundLength);
 }
 
index b49582d222d5c2498631dadbb534d87433d638fc..acbefa4243b112e236565a416d8a61ea1ab225b0 100644 (file)
@@ -44,8 +44,6 @@ void gdcmHeaderEntrySet::Print(std::ostream & os) {
    gdcmTS * ts = gdcmGlobal::GetTS();
 
    std::ostringstream s;
-
-   s << "------------- using tagHT ---------------------" << std::endl; 
    
    // Tag HT
    s << "------------- using tagHT ---------------------" << std::endl; 
@@ -97,10 +95,8 @@ void gdcmHeaderEntrySet::Print(std::ostream & os) {
       d2 = _CreateCleanString(v);  // replace non printable characters by '.'
       s << greltag << ": lgth : ";
       lgth = (*i)->GetReadLength();
-      if ( lgth == 0xffffffff) 
-         s << std::hex << lgth << std::dec ;
-      else
-         s << lgth;
+      
+      s << std::hex << "x(" << lgth << ") "<< std::dec << lgth;         
       s << ",\t Offset : " << o;
       s << " x(" << std::hex << o << std::dec << ") ";
       s << "\t[" << (*i)->GetVR()    << "]";