X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmDocEntry.cxx;h=ed0a9e8b7f7e5631b28b2a505bc8b0045ccd7c84;hb=89763e8094465640a31f98815a3448e1e7d6ff3f;hp=e2a89b1def4d7184b45fda908a4f45795b6c1198;hpb=c92079b4881cba2560589210d4baeed9dd4d9cac;p=gdcm.git diff --git a/src/gdcmDocEntry.cxx b/src/gdcmDocEntry.cxx index e2a89b1d..ed0a9e8b 100644 --- a/src/gdcmDocEntry.cxx +++ b/src/gdcmDocEntry.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDocEntry.cxx,v $ Language: C++ - Date: $Date: 2004/08/31 14:24:47 $ - Version: $Revision: 1.16 $ + Date: $Date: 2004/09/17 08:54:26 $ + Version: $Revision: 1.20 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -36,7 +36,9 @@ gdcmDocEntry::gdcmDocEntry(gdcmDictEntry* in) { ImplicitVR = false; - DictEntry = in; + DictEntry = in; + SetKey( in->GetKey( ) ); + Offset = 0 ; // To avoid further missprinting } //----------------------------------------------------------------------------- @@ -57,18 +59,17 @@ void gdcmDocEntry::Print(std::ostream & os) std::string d2, vr; std::ostringstream s; uint32_t lgth; - char greltag[10]; //group element tag g = GetGroup(); e = GetElement(); o = GetOffset(); vr = GetVR(); - sprintf(greltag,"%04x|%04x ",g,e); - s << greltag ; + + s << GetKey(); if (PrintLevel >= 2) { - s << "lg : "; + s << " lg : "; lgth = GetReadLength(); // ReadLength, as opposed to UsableLength if (lgth == 0xffffffff) { @@ -163,7 +164,7 @@ void gdcmDocEntry::Write(FILE *fp, FileType filetype) // Unknown was 'written' // deal with Little Endian fwrite ( &shortLgr,(size_t)2 ,(size_t)1 ,fp); - fwrite ( &z, (size_t)2 ,(size_t)1 ,fp); + fwrite ( &z, (size_t)2 ,(size_t)1 ,fp); } else {