[vtkusers] How to find point ID?

David Doria daviddoria at gmail.com
Wed Sep 22 06:46:08 EDT 2010


On Wed, Sep 22, 2010 at 5:39 AM, rakesh patil <prakeshofficial at gmail.com> wrote:
> Hi,
> I have an unstructured grid.. and i have a point in it. i mean i have, point
> values (xyz) form,
> With the help of this point, is there any way to get the point ID of that
> point in the grid?
> Example, i have point say, p=(83.2346, 18.2615, 1235.0)
> This point exists in my grid also.. Thus, i need to find out th ID of that
> point in grid.
> Thanks
> Regards
> Rakesh Patil

I think you'd have to use a ClosestPoint function of one of the
spatial data structures (kd tree, etc).

http://www.vtk.org/Wiki/VTK/Examples/Cxx/DataStructures/KdTreePointLocator/ClosestPoint

David



More information about the vtkusers mailing list