[vtkusers] Number of vertices in one component

Rachel aracha2010 at gmail.com
Tue Feb 1 11:09:17 EST 2011



Hello ,

I want to get the number of vertices and their coordinates in the largest
component, i m using the following code:

 vtkSmartPointer<vtkPolyDataConnectivityFilter> connectivityFilter = 
    vtkSmartPointer<vtkPolyDataConnectivityFilter>::New();
    connectivityFilter->SetInput(mesh); 
 connectivityFilter->SetExtractionModeToLargestRegion();
connectivityFilter->Update();
 
And i try to use the following code to extract the number but it gives me
the number of all vertices in all components

  vtkPointSet *outputPointSet = connectivityFilter->GetOutput(); 
cout<< outputPointSet->GetNumberOfPoints();

Any suggestion ? Many Thanks
-- 
View this message in context: http://vtk.1045678.n5.nabble.com/Number-of-vertices-in-one-component-tp3366486p3366486.html
Sent from the VTK - Users mailing list archive at Nabble.com.



More information about the vtkusers mailing list