[vtkusers] findclosestpoint
David Doria
daviddoria at gmail.com
Mon Nov 25 07:54:04 EST 2013
On Mon, Nov 25, 2013 at 7:09 AM, Susanne Schmalkalt
<Susanne.Schmalkalt at gmx.de> wrote:
> Dear all,
>
> I have a metaobject, which I read with vtkMetaImageReader. I then use
> vtkMarchingContourFilter to extract its surface. Then I have a point A close
> to this surface. How can I find the closest point to A on the surface? When
> I use vtkPointLocator and findClosestPoint, I get a point that lies on the
> outline of my metaobject, but not on the object itself.
> Does anyone have an idea why this might be and how to solve it?
>
> Thanks!
> Susi
Are you sure you're calling FindClosestPoint on a locator created with
the output of the vtkMarchingContourFilter?
This example does what you're looking for (it should be the same once
you have a vtkPolyData as the output of the vtkMarchingContourFilter):
http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/CellLocator
David
More information about the vtkusers
mailing list