[vtkusers] New class: vtkExtractPointsWithinRadius

David Doria daviddoria+vtk at gmail.com
Wed Apr 28 17:13:59 EDT 2010


I put this together and I thought it may be useful for someone else, too.

http://www.rpi.edu/~doriad/VTK_List/ExtractPointsWithinRadius/

The filter takes a vtkPolyData, and extract all points in it within
'Radius' of 'Center'.

  vtkSmartPointer<vtkExtractPointsWithinRadius> extractPoints =
      vtkSmartPointer<vtkExtractPointsWithinRadius>::New();
  extractPoints->SetInputConnection(sphereSource->GetOutputPort());
  extractPoints->SetRadius(0.5);
  extractPoints->SetCenter(1.0, 0.0, 0.0);
  extractPoints->Update();

Thanks,

David



More information about the vtkusers mailing list