19 def ShowProgress(self, sender, event):
20 pe = gdcm.ProgressEvent.Cast(event)
21 print pe.GetProgress()
23 print "Yay ! I am done"
25 if __name__ ==
"__main__":
26 directory = sys.argv[1]
34 nfiles = d.Load( directory );
35 if(nfiles == 0): sys.exit(1);
38 filenames = d.GetFilenames()
46 w = ProgressWatcher(s,
'Watcher')
50 b = s.Scan( filenames );
51 if(
not b): sys.exit(1);
56 pttv = gdcm.PythonTagToValue( s.GetMapping( filenames[1] ) )
59 while(
not pttv.IsAtEnd() ):
63 tag = pttv.GetCurrentTag()
64 value = pttv.GetCurrentValue()