This is what I do. I set up the whole scene, load in all the different readers, and connect the first reader to the vtkMarchingCubes. Then I use a timer that calls an update function every second. This update function sets the inputconnection of the vtkMarchingCubes to the current reader (contours-&gt;setInputConnection(reader[current]-&gt;getOutputPort()). This is working, but results in small (but very noticable) hickups in the interaction. I think this is because the isosurfaces have to be re-calculated every time. That&#39;s why I think that I will need an array of vtkMarchingCubes too.<br>

<br>Tijmen<br><br><div class="gmail_quote">On Wed, Jul 6, 2011 at 11:02 AM, Dominik Szczerba <span dir="ltr">&lt;<a href="mailto:dominik@itis.ethz.ch">dominik@itis.ethz.ch</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

You should update your reader only from a callback function once you<br>
have your scene/camera/etc set up...<br>
<font color="#888888"><br>
Dominik<br>
</font><div><div></div><div class="h5"><br>
On Wed, Jul 6, 2011 at 10:51 AM, Tijmen Klein &lt;<a href="mailto:T.R.Klein@student.rug.nl">T.R.Klein@student.rug.nl</a>&gt; wrote:<br>
&gt; Thank you for the reply. First of all, I&#39;m not trying to export a animation;<br>
&gt; it should be realtime and allowing the user to navigate the scene.<br>
&gt;<br>
&gt; I&#39;m currently applying the fist technique (update the reader in a loop).<br>
&gt; Technically this works fine, but it is really slow and also blocks the mean<br>
&gt; thread of the program (the program simply freezes when switching between 2<br>
&gt; frames). A possible solution that I came up with is the following: create N<br>
&gt; pipelines (up to the mapper), where N is the number of frames. This mean I<br>
&gt; can load the data first, create the isosurfaces and then based on the<br>
&gt; current time let the actor point to the corresponding mapper. This would<br>
&gt; mean that all the calculations are already completed.<br>
&gt;<br>
&gt; Is this a viable solution? It feels a bit hack-ish to do it like this.<br>
&gt;<br>
&gt; Tijmen<br>
&gt;<br>
&gt; On Tue, Jul 5, 2011 at 4:00 PM, Dominik Szczerba &lt;<a href="mailto:dominik@itis.ethz.ch">dominik@itis.ethz.ch</a>&gt;<br>
&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; There are a few possibilities. The simplest would be to update the<br>
&gt;&gt; reader in a loop and dumping screen renderings. More sophisticated<br>
&gt;&gt; would be to import them first into a temporal dataset and then request<br>
&gt;&gt; a specific time value.<br>
&gt;&gt;<br>
&gt;&gt; Dominik<br>
&gt;&gt;<br>
&gt;&gt; On Tue, Jul 5, 2011 at 2:57 PM, Tijmen Klein &lt;<a href="mailto:T.R.Klein@student.rug.nl">T.R.Klein@student.rug.nl</a>&gt;<br>
&gt;&gt; wrote:<br>
&gt;&gt; &gt; I&#39;m trying to animate multiple input files. These files are in the<br>
&gt;&gt; &gt; legacy<br>
&gt;&gt; &gt; VTK format (.vtk), and named filename[x].vtk, where [x] is an integer. A<br>
&gt;&gt; &gt; contourfilter is used to generate isosurfaces, and these isosurfaces<br>
&gt;&gt; &gt; should<br>
&gt;&gt; &gt; be animated.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; This is behaviour that is quite easy to achieve in Paraview (open the<br>
&gt;&gt; &gt; files,<br>
&gt;&gt; &gt; apply contour filter, choose a frame or click play). How can something<br>
&gt;&gt; &gt; similar be achieved in VTK? It should be possible to create a<br>
&gt;&gt; &gt; time-dependent<br>
&gt;&gt; &gt; animation, but also manually set the current frame. I thought of<br>
&gt;&gt; &gt; creating<br>
&gt;&gt; &gt; multiple InputReaders, and have the &#39;current&#39; reader&#39;s outputport<br>
&gt;&gt; &gt; connected<br>
&gt;&gt; &gt; to the input port of the contour filter. But I think this would not be<br>
&gt;&gt; &gt; very<br>
&gt;&gt; &gt; efficient, since it&#39;s not possible to cache the results in this way.<br>
&gt;&gt; &gt; This<br>
&gt;&gt; &gt; would mean that all the calculations happen again when the animations<br>
&gt;&gt; &gt; restarts from frame 1. What would be a better solution?<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Cheers,<br>
&gt;&gt; &gt; Tijmen<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; _______________________________________________<br>
&gt;&gt; &gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Visit other Kitware open-source projects at<br>
&gt;&gt; &gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Please keep messages on-topic and check the VTK FAQ at:<br>
&gt;&gt; &gt; <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Follow this link to subscribe/unsubscribe:<br>
&gt;&gt; &gt; <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;<br>
&gt;<br>
</div></div></blockquote></div><br>