[vtkusers] Access point at a particular location

Seth Gilchrist seth at mech.ubc.ca
Thu Jul 11 12:19:27 EDT 2013


 Hi Rahul,
It seems that you want to provide x,y,z coordinates and get the index of
the point back. Once you have the index, you can use polydata's
"GetPointData" method to access the point data.

To do this, you can use the vtkKdTreePointLocator which as methods like
"FindClosestPoint", "FindNClosestPoints", and "FindPointsWithinRadius".
There are a few examples of how to use this class at
http://www.vtk.org/Wiki/VTK/Examples/Cxx#KD-Tree. There are other classes
like vtkPointLocator, vtkOctreePointLocator which you can look at too.

Cheers,
Seth

Seth Gilchrist, MASc, PhD Candidate
+---------------------------------------+
Orthopaedic and Injury Biomechanics Group
UBC Department of Mechanical Engineering
6th Floor-2635 Laurel Street
Vancouver, BC V5Z-1M9
+---------------------------------------+
seth at mech.ubc.ca
Fax 604-675-2576
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130711/6c5df064/attachment.htm>


More information about the vtkusers mailing list