[vtkusers] How to really delete cells?
Corinne Tith
cocoricore at gmail.com
Tue Jul 28 04:24:49 EDT 2009
Hi all,
I get a polydata volume with a vtkContourFilter and a
vtkWindowSincPolyDataFilter.
Some cells are not connected to the largest volume. They seem to be 'on' the
mesh but have no vertice in common.
I tried the filters vtkCleanPolyData and vtkPolyDataConnectivityFilter, but
most of my unconnected cells are not removed.
Finally, I tried to delete them 'manually', but nothing happens.
How can I really remove my unconnected cells?
Any help is appreciated, thanks!
// generate my volume
my_vtkWindowSincPolyDataFilter->SetInputConnection(my_vtkContourFilter->GetOutputPort());
// no effect on my cells
my_vtkCleanPolyData->SetInputConnection(my_vtkWindowSincPolyDataFilter->GetOutputPort());
my_vtkCleanPolyData->PointMergingOn();
my_vtkPolyDataConnectivityFilter->SetInputConnection(my_vtkContourFilter->GetOutputPort());
my_vtkPolyDataConnectivityFilter->SetExtractionModeToLargestRegion();
// manual remove
my_vtkPolyDataConnectivityFilter->Update();
my_polyData = my_vtkPolyDataConnectivityFilter->GetOutput();
for(int i = 0; i < n; i++){
my_polyData->DeleteCell(cellsToRemove[i]);
}
my_polyData->RemoveDeletedCells();
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090728/fa56fb57/attachment.htm>
More information about the vtkusers
mailing list