and your error might be the BuildCells() . you havent created a CellArray for the PolyData .<br><br><div class="gmail_quote">On Mon, Jul 26, 2010 at 7:10 AM, Markus Ott <span dir="ltr">&lt;<a href="mailto:ott-markus@t-online.de">ott-markus@t-online.de</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Thanks Eric, this sounds great.<br>
<br>
I tried it but think i made a mistake somewhere.<br>
Does anybody see my error? (Java snippet below)<br>
<br>
                points = new vtkPoints();<br>
<br>
                double origin[] = {0.0, 0.3, 0.1};<br>
                double p0[] = {1.0, 0.5, 0.8};<br>
                double p1[] = {0.3, 0.4, 0.7};<br>
                double p2[] = {0.4, 0.2, 0.2};<br>
                double p3[] = {0.4, 0.8, 0.3};<br>
<br>
                points.InsertNextPoint(origin);<br>
                points.InsertNextPoint(p0);<br>
                points.InsertNextPoint(p1);<br>
                points.InsertNextPoint(p2);<br>
                points.InsertNextPoint(p3);<br>
<br>
                polyData = new vtkPolyData();<br>
                polyData.SetPoints(points);<br>
                polyData.BuildCells();<br>
<br>
                path = new vtkTemporalPathLineFilter();<br>
                path.UsePointIndexForIdsOn();<br>
                path.SetInput(polyData);<br>
<br>
<br>
                vtkPolyDataMapper mapper = new vtkPolyDataMapper();<br>
                mapper.SetInputConnection(path.GetOutputPort());<br>
<br>
                traceActor = new vtkActor();<br>
                traceActor.SetMapper(mapper);<br>
                traceActor.VisibilityOn();<br>
<br>
                VisualizationPanel.getInstance().addActor(traceActor);<br>
<br>
Eric E. Monson schrieb:<br>
<div><div></div><div class="h5">&gt; Hey Markus,<br>
&gt;<br>
&gt; I don&#39;t know if this will quite work for your application, but in case you didn&#39;t know about it, there is the vtkTemporalPathLineFilter:<br>
&gt;<br>
&gt; <a href="http://www.vtk.org/doc/nightly/html/classvtkTemporalPathLineFilter.html" target="_blank">http://www.vtk.org/doc/nightly/html/classvtkTemporalPathLineFilter.html</a><br>
&gt;<br>
&gt; I haven&#39;t looked through the code, but it may help with your methods. I use it in ParaView all the time to trace out particle paths in time-dependent data sets.<br>
&gt;<br>
&gt; -Eric<br>
&gt;<br>
&gt; ------------------------------------------------------<br>
&gt; Eric E Monson<br>
&gt; Duke Visualization Technology Group<br>
&gt;<br>
&gt;<br>
&gt; On Jul 26, 2010, at 10:15 AM, Markus Ott wrote:<br>
&gt;<br>
&gt;&gt; Hi vtkusers.<br>
&gt;&gt;<br>
&gt;&gt; What i want to do is some kind of real time position tracing. An object<br>
&gt;&gt; moves through 3d space and I want to trace this movement with a line.<br>
&gt;&gt;<br>
&gt;&gt; I read the polyline example<br>
&gt;&gt; (<a href="http://vtk.org/Wiki/VTK/Examples/GeometricObjects/Display/PolyLine" target="_blank">http://vtk.org/Wiki/VTK/Examples/GeometricObjects/Display/PolyLine</a>)<br>
&gt;&gt;<br>
&gt;&gt; I need to dynamically add new points to the line in real time and show<br>
&gt;&gt; the changes immediately.<br>
&gt;&gt;<br>
&gt;&gt; In the example the positions are already known before creating the line.<br>
&gt;&gt; How can i update this polyline, add new points and show the changes as<br>
&gt;&gt; the line updates?<br>
&gt;&gt;<br>
&gt;&gt; Another thing: If I add more and more points the line will have too much<br>
&gt;&gt; points eventually. Can i filter out not needed points to keep the<br>
&gt;&gt; polydata simple?<br>
&gt;&gt;<br>
&gt;&gt; Regards,<br>
&gt;&gt; Markus<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;&gt;<br>
&gt;&gt; Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;&gt;<br>
&gt;&gt; Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
&gt;&gt;<br>
&gt;&gt; Follow this link to subscribe/unsubscribe:<br>
&gt;&gt; <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<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 <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 VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
</div></div></blockquote></div><br>