[vtkusers] closest point on a surface / vtkIterativeClosestPointTransform
Steffen Oeltze
stoeltze at isg.cs.uni-magdeburg.de
Thu Feb 21 03:57:33 EST 2008
Yes, it works. Instead of creating the surface, I import a surface.
Then, I'm using vtkMaskPoints as well to randomly select surface
vertices. Next, I apply some noise to these vertices, a little bit of
translation and rotation. Finally, I use the ICP to bring the points
back to the surface.
Then, I measured the Euclidean distance between the transformed points
(before and after ICP) and the surface. For that purpose, I use:
vtkCellLocator *locator = vtkCellLocator::New();
locator->SetDataSet(data); // data represents the surface
locator->SetNumberOfCellsPerBucket(1);
locator->BuildLocator();
locator->Update();
in a loop:
locator->FindClosestPoint(inPoint, closestPointOnSurface, cell_id,
sub_id, dist2);
Cheers,
Steffen
Jason Taclas schrieb:
> have you gotten this to work? I'm having trouble on a similar project;
> I am also using vtkIterativeClosestPoint to register a point cloud to a
> surface, and I also need to make distance measurements. If it matters
> at all, my surface was created with vtkMarchingCubes. I used
> vtkMaskPoints with GenerateVerticesOn to get to vertices, is this what
> you did?
>
> On Feb 15, 2008 9:21 AM, Steffen Oeltze
> <stoeltze at isg.cs.uni-magdeburg.de
> <mailto:stoeltze at isg.cs.uni-magdeburg.de>> wrote:
>
> Thanks a lot for the hint! I'm using vtkCellLocator now to determine the
> closest point on a surface for a given position in 3D.
>
> Steffen
>
> cedric.schwartz at enst-bretagne.fr
> <mailto:cedric.schwartz at enst-bretagne.fr> schrieb:
> > Hi,
> > As far as I know you can't have the distance information with the ICP
> > transform. Maybe you should try vtkPointLocator or vtkKdTree in
> order to
> > obtain the distance measure.
> > Cedric
> >
> > _______________________________________________
> > This is the private VTK discussion list.Please keep messages
> on-topic.
> > Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> > Follow this link to subscribe/unsubscribe:
> > http://www.vtk.org/mailman/listinfo/vtkusers
> >
> >
>
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
More information about the vtkusers
mailing list