]> Creatis software - gdcm.git/blobdiff - gdcmPython/demo/PrintHeader.py
Cosmetic modifs to be more Coding style compliant
[gdcm.git] / gdcmPython / demo / PrintHeader.py
index 6edd80fe7f4d7a43ea55874be12ae09f3c6afcfb..65698538eff1ad68df5c3e75f740ddfafb411e2b 100644 (file)
@@ -1,5 +1,6 @@
 from gdcmPython import *
 import sys
+import os
 
 ### Get filename from command line or default it
 try:
@@ -7,6 +8,11 @@ try:
 except IndexError:
    FileName = os.path.join(GDCM_DATA_PATH, "test.acr")
 
+try:
+   printLevel = int(sys.argv[2])
+except IndexError:
+   printLevel = 1
+
 #if not os.path.isfile(FileName):
 #   print "Cannot open file ", FileName
 #   sys.exit()
@@ -24,6 +30,10 @@ print "##############################################################"
 print "### Display all the elements and their respective values"
 print "## found in the ", FileName, " file."
 print "##############################################################"
-ValDict = toRead.GetPubElVal()
+###toRead.SetPrintLevel(printLevel)
+###toRead.Print()
+
+ValDict = toRead.GetEntry()
 for key in ValDict.keys():
-       print "[%s] = [%s]" %(key, ValDict[key])
+       print "[%s] = [%s]" %(key, ValDict[key])
+