[vtkusers] Animation of multiple input files in VTK

Tijmen Klein T.R.Klein at student.rug.nl
Wed Jul 6 04:51:49 EDT 2011


Thank you for the reply. First of all, I'm not trying to export a animation;
it should be realtime and allowing the user to navigate the scene.

I'm currently applying the fist technique (update the reader in a loop).
Technically this works fine, but it is really slow and also blocks the mean
thread of the program (the program simply freezes when switching between 2
frames). A possible solution that I came up with is the following: create N
pipelines (up to the mapper), where N is the number of frames. This mean I
can load the data first, create the isosurfaces and then based on the
current time let the actor point to the corresponding mapper. This would
mean that all the calculations are already completed.

Is this a viable solution? It feels a bit hack-ish to do it like this.

Tijmen

On Tue, Jul 5, 2011 at 4:00 PM, Dominik Szczerba <dominik at itis.ethz.ch>wrote:

> There are a few possibilities. The simplest would be to update the
> reader in a loop and dumping screen renderings. More sophisticated
> would be to import them first into a temporal dataset and then request
> a specific time value.
>
> Dominik
>
> On Tue, Jul 5, 2011 at 2:57 PM, Tijmen Klein <T.R.Klein at student.rug.nl>
> wrote:
> > I'm trying to animate multiple input files. These files are in the legacy
> > VTK format (.vtk), and named filename[x].vtk, where [x] is an integer. A
> > contourfilter is used to generate isosurfaces, and these isosurfaces
> should
> > be animated.
> >
> > This is behaviour that is quite easy to achieve in Paraview (open the
> files,
> > apply contour filter, choose a frame or click play). How can something
> > similar be achieved in VTK? It should be possible to create a
> time-dependent
> > animation, but also manually set the current frame. I thought of creating
> > multiple InputReaders, and have the 'current' reader's outputport
> connected
> > to the input port of the contour filter. But I think this would not be
> very
> > efficient, since it's not possible to cache the results in this way. This
> > would mean that all the calculations happen again when the animations
> > restarts from frame 1. What would be a better solution?
> >
> > Cheers,
> > Tijmen
> >
> > _______________________________________________
> > Powered by www.kitware.com
> >
> > Visit other Kitware open-source projects at
> > http://www.kitware.com/opensource/opensource.html
> >
> > Please keep messages on-topic and check the VTK FAQ at:
> > http://www.vtk.org/Wiki/VTK_FAQ
> >
> > Follow this link to subscribe/unsubscribe:
> > http://www.vtk.org/mailman/listinfo/vtkusers
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110706/32b2f557/attachment.htm>


More information about the vtkusers mailing list