X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=sidebyside;f=gdcmPython%2Fdemo%2FtestAll.py;fp=gdcmPython%2Fdemo%2FtestAll.py;h=e46fda0677af64fee587a02f840561b6cb6146b6;hb=29f93a14132dd0c6d9d9480ea038a2a4e8ed7e93;hp=0000000000000000000000000000000000000000;hpb=53a2dad942e500f2e65af646528b907fa3eaa8ec;p=gdcm.git diff --git a/gdcmPython/demo/testAll.py b/gdcmPython/demo/testAll.py new file mode 100644 index 00000000..e46fda06 --- /dev/null +++ b/gdcmPython/demo/testAll.py @@ -0,0 +1,36 @@ +from gdcmPython import * + +# Test each file of the Data directory + +AllFiles = [ + "CR-MONO1-10-chest.dcm", + "CT-MONO2-16-brain.dcm", + "CT-MONO2-16-ort.dcm", + "CT-MONO2-16-ankle.dcm", + "CT-MONO2-8-abdo.dcm", + "CT-MONO2-12-lomb-an2.acr2", + "CT-MONO2-16-chest.dcm", + "MR-MONO2-12-angio-an1.acr1", + "MR-MONO2-12-an2.acr2", + "MR-MONO2-16-head.dcm", + "MR-MONO2-12-shoulder.dcm", + "OT-PAL-8-face.dcm", + "OT-MONO2-8-a7.dcm", + "US-RGB-8-esopecho.dcm", + "US-RGB-8-epicard.dcm", + "MR-MONO2-8-16x-heart.dcm", + "NM-MONO2-16-13x-heart.dcm", + "US-MONO2-8-8x-execho.dcm", + "US-PAL-8-10x-echo.dcm", + "XA-MONO2-8-12x-catheter.dcm", + ] + +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])