From: regrain Date: Fri, 21 Oct 2005 08:16:06 +0000 (+0000) Subject: * bug fix in the Python demos, due to the recent changes X-Git-Tag: OpenJPEG.Version1.2~279 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=9f28ad122dd01f096e4e5ca18d46aa7a8a0a07fc;p=gdcm.git * bug fix in the Python demos, due to the recent changes -- BeNours --- diff --git a/gdcmPython/demo/PrintDict.py.in b/gdcmPython/demo/PrintDict.py.in index aca8f437..3140653e 100644 --- a/gdcmPython/demo/PrintDict.py.in +++ b/gdcmPython/demo/PrintDict.py.in @@ -34,7 +34,6 @@ print "dict content :" entry=pubDict.GetFirstEntry() while(entry): print "%4x|%4x [%s] - M%s : %s (%s)" %\ - (entry.GetGroup(),entry.GetElement(),entry.GetVR(),entry.GetVM(), - entry.GetName(),entry.GetKey()) + (entry.GetGroup(),entry.GetElement(),entry.GetVR().str(),entry.GetVM(), entry.GetName(),entry.GetKey().str()) entry=pubDict.GetNextEntry() diff --git a/gdcmPython/demo/PrintFile.py.in b/gdcmPython/demo/PrintFile.py.in index 9098bd8f..2b3582fa 100644 --- a/gdcmPython/demo/PrintFile.py.in +++ b/gdcmPython/demo/PrintFile.py.in @@ -49,12 +49,9 @@ val=None print "##############################################################" val=file.GetFirstEntry() while(val): - if(isinstance(val,gdcm.ValEntryPtr)): - print "Val %04d|%04d [%s] : %s" % (val.GetGroup(),val.GetElement(), - val.GetName(),val.GetValue()) - else: - print "Bin %04d|%04d [%s] : %s" % (val.GetGroup(),val.GetElement(), - val.GetName(),val.GetValue()) + if(isinstance(val,gdcm.DataEntryPtr)): + print "Data %s [%s] [%s] : %s" % (val.GetKey().str(),val.GetVR().str(), + val.GetName(),val.GetString()) val=file.GetNextEntry() val=None