]> Creatis software - gdcm.git/blob - gdcmPython/demo/testAll.py
9bf4a502502a3520f3253641e890743c3c87d6aa
[gdcm.git] / gdcmPython / demo / testAll.py
1 import glob, os
2 import sys
3 from gdcmPython import *
4
5 # Test each file of the Data directory
6
7 AllFiles = [
8         "CR-MONO1-10-chest.dcm",
9         "CT-MONO2-16-brain.dcm",
10         "CT-MONO2-16-ort.dcm",
11         "CT-MONO2-16-ankle.dcm",
12         "CT-MONO2-8-abdo.dcm",
13         "CT-MONO2-12-lomb-an2.acr2",
14         "CT-MONO2-16-chest.dcm",
15         "MR-MONO2-12-angio-an1.acr1",
16         "MR-MONO2-12-an2.acr2",
17         "MR-MONO2-16-head.dcm",
18         "MR-MONO2-12-shoulder.dcm",
19         "OT-PAL-8-face.dcm",
20         "OT-MONO2-8-a7.dcm",
21         "US-RGB-8-esopecho.dcm",
22         "US-RGB-8-epicard.dcm",
23         "MR-MONO2-8-16x-heart.dcm",
24         "NM-MONO2-16-13x-heart.dcm",
25         "US-MONO2-8-8x-execho.dcm",
26         "US-PAL-8-10x-echo.dcm",
27         "XA-MONO2-8-12x-catheter.dcm",
28         ]
29
30 if __name__ == '__main__':
31    # AllFiles = glob.glob(os.path.join(GDCM_TEST_DATA_PATH,"*.dcm"))
32    for file in AllFiles:
33       fileName = os.path.join(GDCM_TEST_DATA_PATH, file)
34       print "############## file :", fileName
35       toRead = gdcmHeader(fileName)
36       ValDict = toRead.GetPubElVal()
37       for key in ValDict.keys():
38           print "   [%s] = [%s]" %(key, ValDict[key])