1 from gdcmPython import *
4 ### Get filename from command line or default it
8 FileName = os.path.join(GDCM_DATA_PATH, "DICOMDIR")
11 printLevel = int(sys.argv[2])
15 ### Build the header element list
16 toRead = gdcmDicomDir(FileName)
17 if not toRead.IsReadable():
18 print "The ", FileName, " DicomDir is not readable with gdcm. Sorry."
21 print "##############################################################"
22 print "### Display all the elements and their respective values"
23 print "## found in the ", FileName, " file."
24 print "##############################################################"
25 toRead.SetPrintLevel(-1)
28 # ValDict = toRead.GetEntry()
29 # for key in ValDict.keys():
30 # print "[%s] = [%s]" %(key, ValDict[key])