[vtkusers] Animation

PsyVis osue80 at bangor.ac.uk
Sun Nov 16 07:41:17 EST 2008


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.




More information about the vtkusers mailing list