<div class="gmail_quote">On Mon, Jun 11, 2012 at 12:28 PM, Jana Sefcikova <span dir="ltr"><<a href="mailto:neollie@gmail.com" target="_blank">neollie@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi all, <div>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.</div><div><br></div><div>I know that kdTree returns point within radius, but they does not met my connection condition.</div>
<div>Is there any other filter, that I could use ? or data structure that would support this operation ?</div><div><br></div><div>Thank you</div></blockquote><div><br></div><div>A few options:</div><div><br></div><div>In case you need this, you can get the direct (1 edge traversal) point neighbors like this:</div>
<div><br></div><a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/VertexConnectivity">http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/VertexConnectivity</a><br clear="all"><br>You could use something like this:</div>
<div class="gmail_quote"><a href="http://www.midasjournal.org/browse/publication/724">http://www.midasjournal.org/browse/publication/724</a></div><div class="gmail_quote"><a href="http://www.midasjournal.org/browse/publication/725">http://www.midasjournal.org/browse/publication/725</a></div>
<div class="gmail_quote"><br></div><div class="gmail_quote">to traverse the mesh, stopping when you get outside of your desired radius.</div><div class="gmail_quote"><br></div><div class="gmail_quote">The most built-in option would probably be to use something like this:</div>
<div class="gmail_quote"><a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/vtkPolyDataConnectivityFilter_SpecifiedRegion">http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/vtkPolyDataConnectivityFilter_SpecifiedRegion</a></div>
<div class="gmail_quote"><br></div><div class="gmail_quote">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.<br>
<div><br></div><div>David </div></div>