X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=gdcmPython%2Fdemo%2FtestAll.py;h=89c045972012ce460ea15ad240628e3219cea69d;hb=f41fb331c46df02fd4e284960f0473d7155573a2;hp=682742626c8c47d6d6247383c177827cfcd59d29;hpb=9676e37a52824da2f69d22c721178a4b5dc12191;p=gdcm.git diff --git a/gdcmPython/demo/testAll.py b/gdcmPython/demo/testAll.py index 68274262..89c04597 100644 --- a/gdcmPython/demo/testAll.py +++ b/gdcmPython/demo/testAll.py @@ -1,7 +1,6 @@ -from load import * +from gdcmPython import * -# Where all the test images are -TestFileDir = os.path.join("..", "..", "Data") +# Test each file of the Data directory AllFiles = [ "CR-MONO1-10-chest.dcm", @@ -28,11 +27,9 @@ AllFiles = [ if __name__ == '__main__': for file in AllFiles: - fileName = os.path.join(TestFileDir, file) + fileName = os.path.join(GDCM_DATA_PATH, file) print "############## file :", fileName - toRead = gdcm.gdcmHeader(fileName) - toRead.LoadElements() + toRead = gdcmHeader(fileName) ValDict = toRead.GetPubElVal() for key in ValDict.keys(): print " [%s] = [%s]" %(key, ValDict[key]) -