[vtkusers] Animation

Mike Jackson mike.jackson at bluequartz.net
Sun Nov 16 08:30:16 EST 2008


It might be a thread issue. Try running the code without spawning a  
new thread and see what happens.

Sent from my iPod
Mike jackson

On Nov 16, 2008, at 7:41, PsyVis <osue80 at bangor.ac.uk> 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.
>
> public void changeTimeSlice(int n) {
>
>        frameCount = n;
>
>        wlFile = new String(wlDir + File.separator + File.separator +
> dataName + "_WATER_ELEVATION_" + frameCount + ".vtk");
> // file to be loaded
>
>        wl.getPartwl().SetFileName(wlFile);                  // set the
> PolyData Readers filename
>        wl.getPartwl().Modified();                              //  
> tell the
> PolyDataReader that it has been modified
>        wl.getPartwl().Update();                               //  
> force a
> read on the polyDataReader
>
>        wl.getPartMapperwl().Update();                     // tell the
> PolyData Mapper to update
>
>        SwingUtilities.invokeLater(new Runnable() {
>
>            @Override
>            public void run() {
>
>                rp.getRenWin().Modified();                      //  
> tell the
> renderpanel that it has been modified
>                rp.getRenWin().Render();                        //  
> tell the
> render panel to render
>            }
>        });
>    }
>
>
> Please could somebody help me as this is the key part to my vis, and  
> I'm
> seriously running out of time.
>
> Thanks for your time
>
> Richard
>
> -- 
> View this message in context: http://www.nabble.com/Animation-tp20524928p20524928.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers



More information about the vtkusers mailing list