My apologies ... as always haste makes waste.  I edited what I wrote to make it (slightly) more readable.<br><br><div class="gmail_quote">On Mon, Mar 23, 2009 at 9:05 AM, Wes Turner <span dir="ltr">&lt;<a href="mailto:wes.turner@kitware.com" target="_blank">wes.turner@kitware.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">David,<br><br>I just took a quick look, so you probably need to do some analysis on your own to fully resolve this issue.  Looking at the data sets, it appears that you are sampling Bunny.vtp (source) and using it to sample points from BunnyScan.vtp (target) using ICP.  Since BunnyScan only contains the front side of Bunny, any points sampled from the rear surface of Bunny will not find a true match and will end up pulling BunnyScan away from the front surface and more toward the center of Bunny.  This is consistent with the data you are showing.<br>


<br>You might be able to get what you are looking for simply by swapping the source and target in the ICP and using that as the transform to apply to BunnyScan, moving it towards Bunny.  If you need the inverse transform (moving Bunny towards BunnyScan) you will need to explicitly calculate the inverse transform by grabbing the Matrix4x4 from the ICP on completion, inverting it, and applying it as the transform to Bunny.  Directly inverting the icp will not work as it just swaps source and target which will get you right back to your current state.  <br>


<br>All of this is from memory, so your mileage may vary.  <br><br>- Wes<br><br><div class="gmail_quote"><div><div></div><div>On Sat, Mar 21, 2009 at 11:48 AM, David Doria <span dir="ltr">&lt;<a href="mailto:daviddoria@gmail.com" target="_blank">daviddoria@gmail.com</a>&gt;</span> wrote:<br>


</div></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div>Here are my input files / output file:<br><br><a href="http://www.rpi.edu/%7Edoriad/Bunny/" target="_blank">http://www.rpi.edu/~doriad/Bunny/</a><br>


<br>I am trying to register Bunny.vtp to BunnyScan.vtp and the result is in MatchedBunny.vtp<br>
<br>Here are my settings:<br>    vtkIterativeClosestPointTransform * icp = vtkIterativeClosestPointTransform::New();<br>    icp-&gt;SetMaximumNumberOfIterations(1000);<br>    icp-&gt;SetMaximumMeanDistance(1e-6);<br>    icp-&gt;GetLandmarkTransform()-&gt;SetModeToRigidBody();<br>



<br>I believe I am calling everything correctly because the resulting point cloud is much nearer than the original. However it seems to still be significantly wrong. Anyone know why this would be?<br><br clear="all">Thanks,<br>


<font color="#888888">
<br>David<br>
</font><br></div></div>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><font color="#888888"><br><br clear="all"><br>-- <br>Wesley D. Turner, Ph.D.<br>Kitware, Inc.<br>R&amp;D Engineer<br>28 Corporate Drive<br>Clifton Park, NY 12065-8662<br>Phone: 518-371-3971 x120<br>


</font></blockquote></div><br><br clear="all"><br>-- <br>Wesley D. Turner, Ph.D.<br>Kitware, Inc.<br>R&amp;D Engineer<br>28 Corporate Drive<br>Clifton Park, NY 12065-8662<br>Phone: 518-371-3971 x120<br>