[vtk-developers] vtkKDTree FindClosestPoint bug?

David Doria daviddoria+vtk at gmail.com
Wed Sep 16 14:06:51 EDT 2009


It seems that FindClosestPoint (both versions) ocasionally produce incorrect
points - where FindClosestNPoints works correctly every time. Here is sample
code and the data file it is intended to work with. The correct index of the
closest point is 1, but FindClosestPoint returns 121. I heard there was a
known issue caused by some floating point rounding or something along those
lines, but these points are VERY far apart (the squared distance to the
target point for the correct closest point is ~9 and for the incorrect
closest point is ~3722).

Here is the code and the data set:
http://rpi.edu/~doriad/VTK_List/ClosestPointBug/<http://rpi.edu/%7Edoriad/VTK_List/ClosestPointBug/>

I am using the latest CVS VTK. This seems to be a VERY big problem
(potentially breaking many peoples code without them even knowing about it?)
if I haven't done anything wrong. Can anyone confirm or deny? I will put it
on Mantis if I don't hear people shouting that I just did something
incorrectly! haha

Thanks,

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20090916/94600049/attachment.html>


More information about the vtk-developers mailing list