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>