Thanks for your help. I tried to put your code after
my_polyData->RemoveDeletedCells();<br>Unfortunately It doesn't work.<br>I tried to delete lot of cells, they are never really removed.<br><br>My VTK version is 5.2, does it matter? <br>
<br><br><div class="gmail_quote">2009/7/28 Dominik Szczerba <span dir="ltr"><<a href="mailto:dominik@itis.ethz.ch">dominik@itis.ethz.ch</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
my_polyData->Modified()<br>
<br>
Corinne Tith wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="h5">
Hi all,<br>
<br>
I get a polydata volume with a vtkContourFilter and a vtkWindowSincPolyDataFilter.<br>
Some cells are not connected to the largest volume. They seem to be 'on' the mesh but have no vertice in common.<br>
<br>
I tried the filters vtkCleanPolyData and vtkPolyDataConnectivityFilter, but most of my unconnected cells are not removed.<br>
Finally, I tried to delete them 'manually', but nothing happens.<br>
<br>
How can I really remove my unconnected cells?<br>
<br>
Any help is appreciated, thanks!<br>
<br>
<br>
// generate my volume<br>
my_vtkWindowSincPolyDataFilter->SetInputConnection(my_vtkContourFilter->GetOutputPort()); <br>
// no effect on my cells<br>
my_vtkCleanPolyData->SetInputConnection(my_vtkWindowSincPolyDataFilter->GetOutputPort()); <br>
my_vtkCleanPolyData->PointMergingOn();<br>
my_vtkPolyDataConnectivityFilter->SetInputConnection(my_vtkContourFilter->GetOutputPort());<br>
my_vtkPolyDataConnectivityFilter->SetExtractionModeToLargestRegion();<br>
// manual remove<br>
my_vtkPolyDataConnectivityFilter->Update();<br>
my_polyData = my_vtkPolyDataConnectivityFilter->GetOutput();<br>
for(int i = 0; i < n; i++){<br>
my_polyData->DeleteCell(cellsToRemove[i]);<br>
}<br>
my_polyData->RemoveDeletedCells();<br>
<br>
<br></div></div>
------------------------------------------------------------------------<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>
</blockquote>
<br>
</blockquote></div><br>