[vtkusers] Re : closest point on a surface / vtkIterativeClosestPointTransform
Steffen Oeltze
stoeltze at isg.cs.uni-magdeburg.de
Wed Mar 12 06:24:45 EDT 2008
Hi Jason,
sorry for the delay. With "surface" I refer to the original surface
(vtkPolyData) NOT to the masked points.
Steffen
Jason Taclas schrieb:
> I have been trying to follow your suggestions, but I am somewhat hung up
> on the data set;
> When you say
> locator->SetDataSet(data); // data represents the surface
> what is the representation of the surface? Is it the surface itself, or
> the maskpoints vertices data? I had originally imagined using the
> vertices to represent the surface in the locator, and measure the
> distance to this surface representation from a different point cloud,
> but your description takes the vertices, distorts them with noise and
> displaces the noisy vertices representation in space. I have been
> having trouble using locators (my application tends to crash at the
> implimentation of the "findclosestpoint" method), and I wonder if it is
> because I am using the wrong data set, be it from the filter producing
> my surface, or the maskpoints vertices data.
>
> Jason
>
> On Thu, Feb 21, 2008 at 4:57 AM, Steffen Oeltze
> <stoeltze at isg.cs.uni-magdeburg.de
> <mailto:stoeltze at isg.cs.uni-magdeburg.de>> wrote:
>
> 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>
> > <mailto: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>
> > <mailto: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