[vtkusers] Selecting a subset of points out of a vtkPolyData using a sphere

Obada Mahdi omahdi at gmx.de
Thu Jan 4 21:09:46 EST 2007


Hi Peter!

On 1/4/07, Boettcher, Dr. Peter
<Boettcher at kleintierklinik.uni-leipzig.de> wrote:
> I would like to select/mark the points of a polydata object which are lying
> inside a sphere. Using vtkClipper or vtkExtractGeometry gives me those
> points, however I loose the ids of the original polydata object. Is there a
> way to get those point keeping the original references so that I can do some
> calculations on the points' scalars and write them back onto the original
> polydata object?

If your ROIs are plain spheres, a simple and effective way of finding
enclosed point IDs is to use the FindPointsWithinRadius() method
provided by vtkPointLocator:
http://www.vtk.org/doc/nightly/html/classvtkPointLocator.html#dc7b425228843f4e9b7a8e80c9a08f16


Regards

Obada



More information about the vtkusers mailing list