X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=sidebyside;f=gdcmPython%2Fdemo%2FPrintHeader.py;h=3239266fa9e658ff7dc4907f1a529716273e8e20;hb=38d772b8588bc4e7106dbafcb24f6bff91b8c4c1;hp=52a1ae587732cf797ec0db11526389ed17547698;hpb=9f596ccd6001b165eca959c6a7b104eb10ff9911;p=gdcm.git diff --git a/gdcmPython/demo/PrintHeader.py b/gdcmPython/demo/PrintHeader.py index 52a1ae58..3239266f 100644 --- a/gdcmPython/demo/PrintHeader.py +++ b/gdcmPython/demo/PrintHeader.py @@ -1,5 +1,6 @@ from gdcmPython import * import sys +import os ### Get filename from command line or default it try: @@ -20,7 +21,8 @@ except IndexError: #s = raw_input("Hit any key in this window to exit") ### Build the header element list -toRead = gdcmHeader(FileName) +print FileName, type(FileName) +toRead = gdcm.Header(FileName) if not toRead.IsReadable(): print "The ", FileName, " file is not readable with gdcm. Sorry." sys.exit()