]> Creatis software - gdcm.git/blobdiff - gdcmPython/demo/PrintDicomDir.py.in
First stage to rotate and flip upside down images
[gdcm.git] / gdcmPython / demo / PrintDicomDir.py.in
index 341df43d0cfe802c12136b3ef423d52dabd9d16f..266adb19dfdbe1047734df02a01b6ebaccb42a01 100644 (file)
@@ -12,14 +12,6 @@ def PrintUse():
    print ""
    print ""
 
-### Progress methods
-def startMethod():
-   print "Start"
-def progressMethod():
-   print "Progress",dicomdir.GetProgress()
-def endMethod():
-   print "End"
-
 ### Get filename from command line or default it
 try:
    fileName = sys.argv[1]
@@ -34,11 +26,7 @@ except IndexError:
    printLevel = 1
 
 ### Build the DicomDir element list
-dicomdir = gdcm.DicomDir()
-
-dicomdir.SetStartMethod(startMethod)
-dicomdir.SetProgressMethod(progressMethod)
-dicomdir.SetEndMethod(endMethod)
+dicomdir = gdcm.DicomDir.New()
 
 dicomdir.SetFileName(fileName)
 dicomdir.Load()
@@ -67,7 +55,7 @@ while(patient):
          image=serie.GetFirstImage()
          while(image):
             print "         Image"
-            print "         ---",image.GetValEntry(0x0004,0x1500).GetValue()
+            print "         ---",image.GetDataEntry(0x0004,0x1500).GetString()
             image=serie.GetNextImage()
          serie=study.GetNextSerie()
       study=patient.GetNextStudy()