From: regrain Date: Wed, 14 Jan 2004 10:09:51 +0000 (+0000) Subject: * gdcmPython/demo/*.py : bug fix due to method names X-Git-Tag: Version0.3.1~3 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=256d6a32612f8bffdb7868749d7995fc74c0c03d;p=gdcm.git * gdcmPython/demo/*.py : bug fix due to method names -- BeNours --- diff --git a/ChangeLog b/ChangeLog index de94800a..db6de6c4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,7 @@ * src/gdcmHeaderEntry.[h|cxx] : gdcmElValue -> gdcmHeaderEntry * src/gdcmHeaderEntrySet.[h|cxx] : gdcmElValSet -> gdcmHeaderEntrySet * src/*.[h|cxx] : make changes due to class name changes + * gdcmPython/demo/*.py : bug fix due to method names 2004-01-13 Benoit Regrain * src/*.[h|cxx] : coding style diff --git a/gdcmPython/demo/PrintHeader.py b/gdcmPython/demo/PrintHeader.py index 6edd80fe..c5843d6f 100644 --- a/gdcmPython/demo/PrintHeader.py +++ b/gdcmPython/demo/PrintHeader.py @@ -24,6 +24,6 @@ print "##############################################################" print "### Display all the elements and their respective values" print "## found in the ", FileName, " file." print "##############################################################" -ValDict = toRead.GetPubElVal() +ValDict = toRead.GetPubEntry() for key in ValDict.keys(): print "[%s] = [%s]" %(key, ValDict[key]) diff --git a/gdcmPython/demo/ReorganiseFiles.py b/gdcmPython/demo/ReorganiseFiles.py index 1ba6178e..e1372adb 100644 --- a/gdcmPython/demo/ReorganiseFiles.py +++ b/gdcmPython/demo/ReorganiseFiles.py @@ -30,7 +30,7 @@ SourceFiles=glob.glob(os.path.join(SourceDirectory, "*.dcm")) for file in SourceFiles: header = gdcmHeader(file) - info = header.GetPubElVal() + info = header.GetPubEntry() try: ImNum = info["Image Number"] if len(ImNum) == 0 or ImNum == "gdcm::Unfound": diff --git a/gdcmPython/demo/explore.py b/gdcmPython/demo/explore.py index af124bb6..defb226b 100644 --- a/gdcmPython/demo/explore.py +++ b/gdcmPython/demo/explore.py @@ -11,7 +11,7 @@ if not os.path.isfile(FileName): sys.exit() toRead = gdcmHeader(FileName) -ValDict = toRead.GetPubElVal() +ValDict = toRead.GetPubEntry() ExploreElements = ["Patient Name", "Patient ID", "Study Date", "Study Time", "Study ID", "Study Instance UID", @@ -24,3 +24,4 @@ for elem in ExploreElements: print "[%s]" % ValDict[elem] except KeyError: print "NOT FOUND" + diff --git a/gdcmPython/demo/testAll.py b/gdcmPython/demo/testAll.py index 9bf4a502..f67c2df7 100644 --- a/gdcmPython/demo/testAll.py +++ b/gdcmPython/demo/testAll.py @@ -33,6 +33,6 @@ if __name__ == '__main__': fileName = os.path.join(GDCM_TEST_DATA_PATH, file) print "############## file :", fileName toRead = gdcmHeader(fileName) - ValDict = toRead.GetPubElVal() + ValDict = toRead.GetPubEntry() for key in ValDict.keys(): print " [%s] = [%s]" %(key, ValDict[key]) diff --git a/gdcmPython/demo/vtkGdcmDemo.py b/gdcmPython/demo/vtkGdcmDemo.py index f1e1c26f..a6d14e4d 100644 --- a/gdcmPython/demo/vtkGdcmDemo.py +++ b/gdcmPython/demo/vtkGdcmDemo.py @@ -179,7 +179,7 @@ if not check.IsReadable(): print "The ", FileName, " file is not " print " readable with gdcm. Sorry." sys.exit() -check = check.GetPubElVal() +check = check.GetPubEntry() try: HighBit = check["High Bit"] if len(HighBit) == 0 or HighBit == "gdcm::Unfound":