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