]> Creatis software - gdcm.git/blobdiff - gdcmPython/demo/PrintFile.py.in
Should work both with vtk4 and vtk 5.
[gdcm.git] / gdcmPython / demo / PrintFile.py.in
index 2b3582faf95c4194914de878aa63dc6bbb56dad6..7506aef0150dee2f552a7859aca1a5a165f3aef5 100644 (file)
@@ -12,6 +12,12 @@ def PrintUse():
    print ""
    print ""
 
+try:
+   print gdcm.DataEntry
+   print gdcm.DataEntryPtr
+except:
+   pass
+
 ### Get filename from command line or default it
 try:
    fileName = sys.argv[1]
@@ -26,7 +32,7 @@ except IndexError:
    printLevel = 1
 
 ### Build the file element list
-file = gdcm.File()
+file = gdcm.File.New()
 file.SetFileName(fileName)
 file.Load()
 if not file.IsReadable():
@@ -49,7 +55,7 @@ val=None
 print "##############################################################"
 val=file.GetFirstEntry()
 while(val):
-   if(isinstance(val,gdcm.DataEntryPtr)):
+   if(isinstance(val,gdcm.DataEntry)):
       print "Data %s [%s] [%s] : %s" % (val.GetKey().str(),val.GetVR().str(),
                                         val.GetName(),val.GetString())
    val=file.GetNextEntry()