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 dicomdir = gdcmDicomDir(fileName)
17 if not dicomdir.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 dicomdir.SetPrintLevel(-1)