import sys
+import os.path
from gdcmConfigDemo import *
from gdcmPython.core import *
fileName = sys.argv[1]
except IndexError:
fileName = os.path.join(GDCM_DATA_ROOT, "test.acr")
+ if( not os.path.isfile(fileName) ):
+ fileName=os.path.join(os.path.split(sys.argv[0])[0],"test.acr")
try:
printLevel = int(sys.argv[2])
printLevel = 1
### Build the file element list
-file = gdcm.File(fileName)
+file = gdcm.File()
+file.SetFileName(fileName)
+file.Load()
if not file.IsReadable():
PrintUse()
raise RuntimeError,"The '%s' file is not readable with gdcm." % fileName