Thank you David. I'll look at vtkTimeSourceExample.<br><br>About the threshold animation, if you animate both threshold sliders, you're most likely not going to see anything:<br>for example if the array contains the values 1,2,3,4,5,6,7,8,...,150 and you animate both sliders of threshold using the "sequence" mode of 100 frames. The threshold value at each frame will be 150/100, 2*150/100, ..., 150. <br>
So the threshold value at each frame won't match any value on the cells or points a not much will be displayed. <br>A range of threshold should be animated at each frame, instead of discrete values.<br>I was able to get something like that by using an "exponentional" interpolation on threshold range 0 and a "rample" on threshold range 1. The second slider was slightly ahead for the first and a small range of values was displayed at each frame.<br>
<br><div class="gmail_quote">On Tue, Jul 31, 2012 at 10:57 AM, David E DeMarle <span dir="ltr"><<a href="mailto:dave.demarle@kitware.com" target="_blank">dave.demarle@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Mon, Jul 30, 2012 at 4:43 PM, Nehme Bilal <<a href="mailto:nehmebilal@gmail.com">nehmebilal@gmail.com</a>> wrote:<br>
> Hello,<br>
><br>
> I am trying to make a C++ reader for a point set file containing time steps.<br>
> The output of the reader is a vtkPolyData.<br>
><br>
> The file format is similar to:<br>
> x1,y1,z1,prop1,prop2,...,time<br>
><br>
> I would like to import the field "time" as time steps, in order to animate<br>
> using "snap to time steps" mode.<br>
><br>
> The code looks like:<br>
><br>
> vtkPolyData *output =<br>
> vtkPolyData::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT()));<br>
><br>
> Loop:<br>
> time = readTime();<br>
> coords = readCoords();<br>
><br>
> vtkIdType id = outPoints->InsertNextPoint(coords[0], coords[1],<br>
> coords[2]);<br>
> outCells->InsertNextCell(1);<br>
> outCells->InsertCellPoint(id);<br>
><br>
> output->SetPoints(outPoints);<br>
> output->SetVerts(outCells);<br>
><br>
> Assuming time is an integer, how do I insert the time steps into the output<br>
> ?<br>
<br>
</div>You might want to make your reader tell VTK about the time in the<br>
standard way instead of encoding it as a separate point associated<br>
array. Then the time aware filters and animation controls will know<br>
what to do with it. To do so, make your reader announce the time steps<br>
it can produce in the RequestInformation method and respond with data<br>
for any particular requested time RequestData. See the<br>
vtkTimeSourceExample in the VTK source code for hints.<br>
<div class="im"><br>
> I tried to import the time as an "int property" instead of time steps and<br>
> animate using threshold, but I can't display one time step at a time because<br>
> only one slider is animated.<br>
<br>
</div>I can't reproduce that. Use the + button twice on the animation view<br>
to two tracks. For one pick the threshold filter and it's threshold<br>
range (0) property. For the second choose it's threshold range (1)<br>
property. Using the pv binary on my system I can animate a dynamic<br>
threshold front with the wavelet source without any problem that way.<br>
<br>
><br>
> Thank you,<br>
><br>
> Nehme<br>
><br>
> _______________________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Please keep messages on-topic and check the ParaView Wiki at:<br>
> <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
><br>
</blockquote></div><br>