Hi,<br><br>In the code above, the scalars contains depth information. Which is negative and positive both. So I want to convert positive values to negative. After converting that, when I say scalars modified, delaunay&#39;s object is executed. So is there any way to avoid the second time execution? Because when I load a big data of say 30-40lakhs points, first time triangulation itself takes ample amount of time. Then later when reversing the scalar, again triangulation consumes more time which I want to avoid. Is there any way to bypass it second time?<br>
<br>Thanks<br><br>Warm Regards<br><br>Rakesh Patil<br><br><div class="gmail_quote">On Wed, Sep 14, 2011 at 5:36 PM, David E DeMarle <span dir="ltr">&lt;<a href="mailto:dave.demarle@kitware.com">dave.demarle@kitware.com</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;">The pipeline isn&#39;t smart enough to differentiate between changes to<br>
the geometry/topology and attributes (fairly easy to do) and to know<br>
what matters to all of the downstream results (fairly hard to do). So<br>
it takes the safe approach and says that if anything changes,<br>
everything downstream must re-execute.<br>
<br>
David E DeMarle<br>
Kitware, Inc.<br>
R&amp;D Engineer<br>
21 Corporate Drive<br>
Clifton Park, NY 12065-8662<br>
Phone: 518-881-4909<br>
<div><div></div><div class="h5"><br>
<br>
<br>
On Wed, Sep 14, 2011 at 6:35 AM, rakesh patil &lt;<a href="mailto:prakeshofficial@gmail.com">prakeshofficial@gmail.com</a>&gt; wrote:<br>
&gt; Hello,<br>
&gt;<br>
&gt; vtkPoints *pnts = vtkPoints::New();<br>
&gt; pnts-&gt;SetNumberOfPoints(num);<br>
&gt;<br>
&gt; vtkDoubleArray *scalar = vtkDoubleArray::New();<br>
&gt; scalar-&gt;SetNumberOfTuples(num);<br>
&gt;<br>
&gt;<br>
&gt; vtkCellArray *pVertex = vtkCellArray::New();<br>
&gt;<br>
&gt; for (vtkIdType i = 0; i &lt; num; i++)<br>
&gt; {<br>
&gt;    readFile &gt;&gt; xval &gt;&gt; yval &gt;&gt; zval;<br>
&gt;    pnts-&gt;InsertPoint(i, xval, yval, 0);<br>
&gt;    scalar-&gt;InsertTuple1(i, zval);<br>
&gt;<br>
&gt;    pVertex-&gt;InsertNextCell(1, &amp;i);<br>
&gt; }<br>
&gt;<br>
&gt; vtkPolyData *pd = vtkPolyData::New();<br>
&gt; pd-&gt;SetPoints(pnts);<br>
&gt; pd-&gt;SetVerts(pVertex);<br>
&gt; pd-&gt;GetPointData()-&gt;SetScalars(scalar);<br>
&gt;<br>
&gt; vtkDelaunay2D *del = vtkDelaunay2D::New();<br>
&gt;<br>
&gt; del-&gt;SetInput(pd);<br>
&gt; del-&gt;SetTolerance(0.00001);<br>
&gt; del-&gt;Update();<br>
&gt;<br>
&gt; vtkPolyDataMapper *mapp = vtkPolyDataMapper::New();<br>
&gt; mapp-&gt;SetInputConnection( del-&gt;GetOutputPort() );<br>
&gt; mapp-&gt;ScalarVisibilityOn();<br>
&gt;<br>
&gt;<br>
&gt; vtkActor *actor = vtkActor::New();<br>
&gt; actor-&gt;SetMapper(mapp);<br>
&gt; actor-&gt;GetProperty()-&gt;SetColor(1, 0, 0);<br>
&gt; actor-&gt;GetProperty()-&gt;SetPointSize(3);<br>
&gt;<br>
&gt; renderer-&gt;AddActor(actor);<br>
&gt;<br>
&gt; After adding actor to the renderer, suppose I do some changes in the scalar<br>
&gt; array, and say modified, I observe that delaunay object is also updated and<br>
&gt; again triangulation takes place.<br>
&gt;<br>
&gt;<br>
&gt; Why is this so?<br>
&gt; ;<br>
&gt;<br>
</div></div>&gt; _______________________________________________<br>
&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;<br>
&gt; Visit other Kitware open-source projects at<br>
&gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;<br>
&gt; Please keep messages on-topic and check the VTK FAQ at:<br>
&gt; <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
&gt;<br>
&gt; Follow this link to subscribe/unsubscribe:<br>
&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>
</blockquote></div><br>