[vtkusers] How to filter sparse polydata?

John Biddiscombe j.biddiscombe at rl.ac.uk
Tue Oct 24 11:05:36 EDT 2000

>Does anyone know of a way to get rid of POLYDATA points if the distance to 
>their nearest neighbor is greater than some fixed value?

I think you've answered your own question.

create a PolyData to PolyData filter that iterates over each cell : queries
a locator for the N nearest points (N being at least 1 more than the number
of points in the polydata cell), then if all the nearest points which
belong to different cells are further than D. Reject the cell.

Slight variation if you want to work on a vertex or Cell basis. but the
principle is straightforward.

Hope this helps


More information about the vtkusers mailing list