<div dir="ltr"><div><div><div><div><div><div><div><div><div><div>Dear vtk users,<br><br></div>I would like to extract the connected components of a mesh which is given as a vtkPolyData object. I know that vtkPolyDataConnectivityFilter is supposed to do this. But how can I use this filter?<br><br></div>I have to process each component separately. I tried to get the i-th component of 'my_mesh' as follows:<br><br>vtkPolyDataConnectivityFilter* filer = vtkPolyDataConnectivityFilter::New();<br></div>filter->SetInputData(my_mesh);<br></div>filter->SetExtractionModeToSpecifiedRegions();<br></div>filter->AddSpecifiedRegion(i);<br></div>filter->Update();<br></div>vtkPolyData* component = filter->GetOutput();<br></div><div>// process component ....<br></div><div><br></div>However, I get the same result, no matter what i I use. I tried with SetExtractionModeToAllRegions() but it's the same. How should I get the i-th component?<br><br></div>Thank you,<br></div>cp<br><br></div>