[vtkusers] vtkXMLImageDataReader ProgressEvent
Mathieu Malaterre
mathieu.malaterre at kitware.com
Wed Apr 13 19:52:22 EDT 2005
>
> On 4/13/05, David Cole <david.cole at kitware.com> wrote:
> > Set a breakpoint in your Execute method and trace back up the call stack to
> > the caller of UpdateProgress: maybe your data size is just small and things
> > are working as they should.
>
> Tracing back i see that indeed update gets fired by image reader, but
> with amount 1.0. While my data is only about 20MB in size, it still
> takes 5-10s to load, and VolView displays the progress when loading
> the same data (obviously the gurus at kitware know their stuff much
> better than me :).
>
> Perhaps I should put the reader in another thread to give it some more
> breathing room and a chance to update more frequently?
>
> Thanks!
Slobo,
Don't do any multithreading thing. This very simple python script works with VTK CVS:
import vtk
reader = vtk.vtkDataSetReader()
reader.SetFileName('foo.vtk')
def MyProc(object, event):
print "foo", reader.GetProgress()
reader.AddObserver("ProgressEvent", MyProc)
reader.Update()
This should work the as well using the XML readers.
Mathieu
More information about the vtkusers
mailing list