]> Creatis software - gdcm.git/blob - gdcmPython/demo/explore.py
modif DcmWrite
[gdcm.git] / gdcmPython / demo / explore.py
1 from gdcmPython import *
2
3 toRead = gdcmHeader(FileName)
4 toRead.LoadElements()
5 ValDict = toRead.GetPubElVal()
6 ExploreElements = ["Patient Name", "Patient ID",
7                                                  "Study Date", "Study Time", "Study ID",
8                                                  "Study Instance UID",
9                                                  "Series Number",
10                                                  "Modality"]
11
12 for elem in ExploreElements:
13         print "[%s] = " % elem,
14         try:
15                 print "[%s]" % ValDict[elem]
16         except KeyError:
17                 print "NOT FOUND"