The filter handles the selection automatically. Your just need to set the maximum number of points you want to use for the landmarks. Check out <tt><a href="http://public.kitware.com/cgi-bin/viewcvs.cgi/*checkout*/Hybrid/Testing/Tcl/TestICPTransform.tcl?root=VTK&content-type=text/plain">
/Hybrid/Testing/Tcl/TestICPTransform.tcl </a></tt>for an example of using the filter.<br><br>Note that if you are trying to register a patch to a whole, then you may need to manually move your patch close to the correct position and call
<a class="el" href="http://www.vtk.org/doc/nightly/html/classvtkIterativeClosestPointTransform.html#295d56e80cf959f5cde91201371b7afd">StartByMatchingCentroidsOff</a> () on the ICP transform before starting the registration. Otherwise the registration is likely to get stuck in a local minima.
<br><br>- Wes<br><br> <br><div><span class="gmail_quote">On 5/4/07, <b class="gmail_sendername"><a href="mailto:M.Salman@surrey.ac.uk">M.Salman@surrey.ac.uk</a></b> <<a href="mailto:M.Salman@surrey.ac.uk">M.Salman@surrey.ac.uk
</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>
<p><font size="2">Thanks Turner,<br>
I understand what you are saying but I don't know how to code this, Can you please elaborate it a bit more ? I really appreciate your help.<br>
<br>
Best Regards,<span class="q"><br>
<br>
M.Salman<br>
University of Surrey,U.K.<br>
<br>
<br>
<br>
<br></span></font></p><div><span class="e" id="q_11256ddd9fa2d760_2">
<font size="2">-----Original Message-----<br>
From: Wes Turner [<a href="mailto:wes.turner@kitware.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">mailto:wes.turner@kitware.com</a>]<br>
Sent: Thu 03/05/2007 4:09 PM<br>
To: Salman M Mr (PG/R - Electronic Eng)<br>
Cc: <a href="mailto:vtkusers@vtk.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">vtkusers@vtk.org</a><br>
Subject: Re: [vtkusers] can we match a cropped version of a model againt the original using the vtkIterativeClosestPointTransform?<br>
<br>
The source and target landmarks need to have the same number of points for<br>
the point-to-point metric to work. However, the number of points in the two<br>
models you are registering need not (and generally won't) be the same. The<br>
trick is to subsample from the source and to pick the closest points on the<br>
target as the matches. For matching patches to their appropriate location,<br>
you may have to find a starting position sufficiently close to the correct<br>
position of the patch to ensure that you do not get trapped in a local<br>
minima.<br>
<br>
- Wes<br>
<br>
On 5/3/07, <a href="mailto:M.Salman@surrey.ac.uk" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">M.Salman@surrey.ac.uk</a> <<a href="mailto:M.Salman@surrey.ac.uk" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
M.Salman@surrey.ac.uk</a>> wrote:<br>
><br>
><br>
> Hi all,<br>
> The cropped version of a model doesnt necessarily consists of equal number<br>
> of points as of the original.While vtkIterativeClosestPointTransform makes<br>
> use of vtkLandmarkTransform internally to compute the best fit which<br>
> further calls for equal number of points in both landmarks.<br>
> "Call SetSourceLandmarks and SetTargetLandmarks to specify the two sets of<br>
> landmarks, ensure they have the same number of points"<br>
><br>
> Can we still use the vtkIterativeClosestPointTransform to match the<br>
> cropped version to the original model...<br>
> Any thoughts?<br>
><br>
> Regards,<br>
><br>
> M.Salman<br>
> University of Surrey,U.K.<br>
><br>
><br>
><br>
><br>
> _______________________________________________<br>
> This is the private VTK discussion list.<br>
> Please keep messages on-topic. Check the FAQ at:<br>
> <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
><br>
><br>
<br>
<br>
--<br>
Wesley D. Turner, Ph.D.<br>
Kitware, Inc.<br>
R&D Engineer<br>
28 Corporate Drive<br>
Clifton Park, NY 12065-8662<br>
Phone: 518-371-3971 x120<br>
<br>
</font></span></div>
<p></p>
</div>
</blockquote></div><br><br clear="all"><br>-- <br>Wesley D. Turner, Ph.D.<br>Kitware, Inc.<br>R&D Engineer<br>28 Corporate Drive<br>Clifton Park, NY 12065-8662<br>Phone: 518-371-3971 x120