[vtkusers] Animating a series of vtk files
Gerrick Bivins
gbivins at objectreservoir.com
Wed Oct 29 13:54:10 EDT 2008
Hi Rich,
Hard to tell. You can try turning on debug for the polydata reader and see
what that prints:
wl.getPartwl().DebugOn();
>wl.getPartwl().SetFileName(wlFile); // wl is the vtk
> pipeline , Partwl is the polydatareader
> wl.getPartwl().Update();
Gerrick
On 10/29/08 10:36 AM, "PsyVis" <osue80 at bangor.ac.uk> wrote:
>
> Hello I'm attempting to animate through a series of .vtk files in java. I get
> an error saying that there is no data to read - I've checked that it is
> actually getting the files(right name and path) but still can't seem to work
> out what the problem is. Here is the code that gets run inside an animation
> thread:
>
>
> public void changeTimeSlice(int n){
>
> frameCount = n; // timeslice
>
> wlFile = new String(wlDir + File.separator + File.separator
> + dataName + "_WATER_ELEVATION_" + frameCount + ".vtk"); // filename for
> timeslice
> System.out.println("ani timeslice " + frameCount + " " +
> wlFile );
> wl.getPartwl().SetFileName(wlFile); // wl is the vtk
> pipeline , Partwl is the polydatareader
> wl.getPartwl().Update();
>
> SwingUtilities.invokeLater(new Runnable() {
>
> @Override
> public void run() {
> rp.getRenWin().Modified(); // rp is the vtk render panel
> rp.getRenWin().Render();
> }
> });
> }
>
> If anyone can point me in the right direction, that would be brilliant
>
> Cheers
>
> Rich
More information about the vtkusers
mailing list