[vtkusers] order of execution
Benjamin King
king.benjamin at mh-hannover.de
Wed Aug 6 03:04:58 EDT 2003
Hello Christos,
> I have a set of 2D files which I read with vtkImageReader.
> when this is done I use vtkContourFilter, vtkPolyDataNormals (to create
> a vtkPolyData representation of the volume) (function 1)
> and then I create the mapper and the actor.
>
> The renderer, renderwindow, mappe and actor are called in a different
> function than the reader (function 2)
The VTK is only updated upon request. In your case this happens when the
renderwindow's Render() method is called. All objects that are connected to
this window have their Update() method called and this process goes all the
way up the pipeline until the data sources are reached. In your case this
is the vtkImageReader.
You can manually Update() the vtkImageReader if you like to, but it ain't
necessary in most cases.
> Also, when function 2 is called nothing after this point is executed as
> the window is active an probably the system has to deal with this. If I
> want the system to continue with other calculations is there any way to
> do it? (threads?)
When all the renderers in the window have finished showing their respective
actors, your program should continue. You don't need threads if you are
happy to wait during the rendering. I think that there is some other
problem with your code.
Maybe you should post the relevant part of your program or take a look at
some of the examples to see how they do the event management.
cu,
Benjamin
--
Benjamin King
Institut für Medizinische Informatik
Medizinische Hochschule Hannover
Tel.: +49 511 532-2663
More information about the vtkusers
mailing list