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'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"><<a href="mailto:dave.demarle@kitware.com">dave.demarle@kitware.com</a>></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'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&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 <<a href="mailto:prakeshofficial@gmail.com">prakeshofficial@gmail.com</a>> wrote:<br>
> Hello,<br>
><br>
> vtkPoints *pnts = vtkPoints::New();<br>
> pnts->SetNumberOfPoints(num);<br>
><br>
> vtkDoubleArray *scalar = vtkDoubleArray::New();<br>
> scalar->SetNumberOfTuples(num);<br>
><br>
><br>
> vtkCellArray *pVertex = vtkCellArray::New();<br>
><br>
> for (vtkIdType i = 0; i < num; i++)<br>
> {<br>
> readFile >> xval >> yval >> zval;<br>
> pnts->InsertPoint(i, xval, yval, 0);<br>
> scalar->InsertTuple1(i, zval);<br>
><br>
> pVertex->InsertNextCell(1, &i);<br>
> }<br>
><br>
> vtkPolyData *pd = vtkPolyData::New();<br>
> pd->SetPoints(pnts);<br>
> pd->SetVerts(pVertex);<br>
> pd->GetPointData()->SetScalars(scalar);<br>
><br>
> vtkDelaunay2D *del = vtkDelaunay2D::New();<br>
><br>
> del->SetInput(pd);<br>
> del->SetTolerance(0.00001);<br>
> del->Update();<br>
><br>
> vtkPolyDataMapper *mapp = vtkPolyDataMapper::New();<br>
> mapp->SetInputConnection( del->GetOutputPort() );<br>
> mapp->ScalarVisibilityOn();<br>
><br>
><br>
> vtkActor *actor = vtkActor::New();<br>
> actor->SetMapper(mapp);<br>
> actor->GetProperty()->SetColor(1, 0, 0);<br>
> actor->GetProperty()->SetPointSize(3);<br>
><br>
> renderer->AddActor(actor);<br>
><br>
> After adding actor to the renderer, suppose I do some changes in the scalar<br>
> array, and say modified, I observe that delaunay object is also updated and<br>
> again triangulation takes place.<br>
><br>
><br>
> Why is this so?<br>
> ;<br>
><br>
</div></div>> _______________________________________________<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 VTK FAQ at:<br>
> <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>
><br>
><br>
</blockquote></div><br>