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