X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=gdcmPython%2Fdemo%2FtestAll.py;h=f210f8db9a41ad7be482aae3f73385e487c2a2a1;hb=933fb20f37f5f900c53c59b2a739e18303bd60d8;hp=e46fda0677af64fee587a02f840561b6cb6146b6;hpb=b7f909f6f6c37085bb05debd27c375c826c1ce74;p=gdcm.git diff --git a/gdcmPython/demo/testAll.py b/gdcmPython/demo/testAll.py index e46fda06..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,11 +28,11 @@ AllFiles = [ ] if __name__ == '__main__': - for file in AllFiles: - fileName = os.path.join(GDCM_DATA_PATH, file) - print "############## file :", fileName - toRead = gdcmHeader(fileName) - toRead.LoadElements() - 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])