[vtkusers] How to get 'connected' neighbors of polydata point within radius
David Doria
daviddoria at gmail.com
Mon Jun 11 12:37:04 EDT 2012
On Mon, Jun 11, 2012 at 12:28 PM, Jana Sefcikova <neollie at gmail.com> wrote:
> Hi all,
> I would like obtain all neighbors of seed point in polydata within given
> radius. There should exist path between the seed point and point concerned
> to be neighbor within region.
>
> I know that kdTree returns point within radius, but they does not met my
> connection condition.
> Is there any other filter, that I could use ? or data structure that
> would support this operation ?
>
> Thank you
>
A few options:
In case you need this, you can get the direct (1 edge traversal) point
neighbors like this:
http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/VertexConnectivity
You could use something like this:
http://www.midasjournal.org/browse/publication/724
http://www.midasjournal.org/browse/publication/725
to traverse the mesh, stopping when you get outside of your desired radius.
The most built-in option would probably be to use something like this:
http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/vtkPolyDataConnectivityFilter_SpecifiedRegion
to get the region of the mesh connected to the point. Then you can build a
KDTree on this region, at which point a radius-search query should produce
only points that you are interested in.
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120611/f1ee4df2/attachment.htm>
More information about the vtkusers
mailing list