[vtkusers] Animation

Denis Barbier bouzim at gmail.com
Sun Nov 16 10:19:46 EST 2008


On 2008/11/16 PsyVis wrote:
>
> Hello
> I'm really struggling to find out what I'm doing wrong here, but I'm trying
> to animate a series of (720) .vtk files. I have a method that changes the
> timeslice (changes the .vtk file) but the only thing that happens is that it
> crashes my whole app and the Java virtual machine.
>
> Here is the code for the animation method that is run inside a thread when a
> start button is pressed.

It's hard to investigate without having a self-contained example, but there is
surely some threading issue.  The changeTimeSlice method uses non-local
variables, so when Render() is called in the EDT (event dispatching thread),
VTK pipeline may be modified by the main thread.  You can run everything
in the EDT to avoid threading issues, and if it solves your problem, you will
have to be very careful when moving processing out of the EDT.

Denis



More information about the vtkusers mailing list