[vtkusers] Fast N-ring neighbors computation on polydata

Miguel Sotaquira msotaquira at gmail.com
Wed Dec 12 10:05:18 EST 2012


Hi everyone,

I have a 3D triangular mesh (vtkPolyData) and what I want to do is to
compute the N-ring neighbors of each vertex in the mesh. By N-ring of
neighbors I mean the set of neighbors within a distance of N (integer)
edges from the vertex being evaluated.

I've already came up with an implementation (Python) that comprises two
steps:
1. First get the set of 1-ring neighbors of each vertex,
using GetPointCells and GetCellPoints methods of vtkPolyData. This
implementation is really fast.
2. To compute the N-ring neighbors I simply iterate on each vertex and its
set of 1-ring neighbors and repeat the procedure until I obtain the
complete set of N-ring neighbors.

Step 2 uses nested loops and depending on the value of N and the size of
the mesh it can take quite A LOT.

So my question is: is there any implementation, or vtk class, that allows
the FAST computation of such N-ring neighborhood?

Thanks for any suggestion,
Miguel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20121212/31d7b276/attachment.htm>


More information about the vtkusers mailing list