X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=gdcmPython%2Fdemo%2FtestAll.py;h=f210f8db9a41ad7be482aae3f73385e487c2a2a1;hb=1df6806a67c2830467246991a950670c84d82eb5;hp=89c045972012ce460ea15ad240628e3219cea69d;hpb=153db29d779f82893684c6aac08b0a565dd84334;p=gdcm.git diff --git a/gdcmPython/demo/testAll.py b/gdcmPython/demo/testAll.py index 89c04597..f210f8db 100644 --- a/gdcmPython/demo/testAll.py +++ b/gdcmPython/demo/testAll.py @@ -1,3 +1,5 @@ +import glob, os +import sys from gdcmPython import * # Test each file of the Data directory @@ -26,10 +28,11 @@ AllFiles = [ ] if __name__ == '__main__': - for file in AllFiles: - fileName = os.path.join(GDCM_DATA_PATH, file) - print "############## file :", fileName - toRead = gdcmHeader(fileName) - ValDict = toRead.GetPubElVal() - for key in ValDict.keys(): - print " [%s] = [%s]" %(key, ValDict[key]) + # AllFiles = glob.glob(os.path.join(GDCM_TEST_DATA_PATH,"*.dcm")) + for file in AllFiles: + fileName = os.path.join(GDCM_TEST_DATA_PATH, file) + print "############## file :", fileName + toRead = gdcmHeader(fileName) + ValDict = toRead.GetEntry() + for key in ValDict.keys(): + print " [%s] = [%s]" %(key, ValDict[key])