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]
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()
image=serie.GetFirstImage()
while(image):
print " Image"
- print " ---",image.GetDataEntry(0x0004,0x1500).GetValue()
+ print " ---",image.GetDataEntry(0x0004,0x1500).GetString()
image=serie.GetNextImage()
serie=study.GetNextSerie()
study=patient.GetNextStudy()