X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=gdcmPython%2Fdemo%2FPrintHeader.py;h=52a1ae587732cf797ec0db11526389ed17547698;hb=b8f813472811220ff7936cad8720c81daedd7f3e;hp=c5843d6f24c53a85deb28cd001392f957541162a;hpb=256d6a32612f8bffdb7868749d7995fc74c0c03d;p=gdcm.git diff --git a/gdcmPython/demo/PrintHeader.py b/gdcmPython/demo/PrintHeader.py index c5843d6f..52a1ae58 100644 --- a/gdcmPython/demo/PrintHeader.py +++ b/gdcmPython/demo/PrintHeader.py @@ -7,6 +7,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 +29,10 @@ print "##############################################################" print "### Display all the elements and their respective values" print "## found in the ", FileName, " file." print "##############################################################" -ValDict = toRead.GetPubEntry() +###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]) +