Thanks for the help, Karthik.  I went back and tried the LandmarkBasedTransformInitializer again, and I think I've determined my problem: with the ICP method, I applied the resulting transform to my fixed segmentation, and the result matched the moving image quite nicely.  However, it seems that with the TransformInitializer, I need to apply the INVERSE transform to the fixed image.  Is there a reason these two are different?
<br><br><div class="gmail_quote">On Dec 5, 2007 10:26 AM, Karthik Krishnan &lt;<a href="mailto:karthik.krishnan@kitware.com">karthik.krishnan@kitware.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Charlotte:<div class="Ih2E3d"><br>
<br>On 12/4/07, <b class="gmail_sendername">Charlotte Curtis</b> &lt;<a href="mailto:curtisc@uoguelph.ca" target="_blank">curtisc@uoguelph.ca</a>&gt; wrote:</div><div><div class="Ih2E3d"><span class="gmail_quote"></span>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I am attempting to register two CT scans, and I&#39;m having a bit of trouble with (I think) the optimizer parameters.&nbsp; I&#39;m basically just combining the examples IterativeClosestPoint2.cxx and ImageRegistration8.cxx, and then using the result to transform a segmentation.&nbsp; If I use only the landmark transformation from IterativeClosestPoint, my result is pretty good, but I&#39;d just like to refine it a *little* bit more with the registration from ImageRegistration8.&nbsp;&nbsp;
</blockquote><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I have also tried using the LandmarkBasedTransformInitializer, but the result was not nearly as good as the IterativeClosestPoint.&nbsp; 
</blockquote></div><div><br>I&#39;d disagree with this. LandmarkBasedTransformInitializer should find the *optimal* rigid transfrom in your case. The two algorithms differ in their assumptions but aim to minimize the same metric.
<br><br>ICP: Minimizes the Least Square distance between two point sets. It relieves you of the responsibility of knowing the correspondance between the point sets.<br><br>LandmarkBasedTransformInitializer: Finds the *Optimal* rigid transform that minimizes the Least Square distance between the two point sets. It requires you to specify the correspondance between the two point sets. The number of points in the two sets are the same. (Please see: Berthold K. P. Horn (1987), &quot;Closed-form solution of absolute orientation using unit quaternions,&quot;)
<br></div><br>Since your point sets are *Landmarks* or fiducials, I assume that you know the correspondance between them. So for a rigid transform, the LandmarkBasedTransformInitializer should always be better. (unless your landmarks are erroneous).
<br><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">...<div class="Ih2E3d"><br>I have played with a variety of settings for the rotation scale, translation scale, min/max steps, number of iterations, etc, but I haven&#39;t been able to hit on the right combination.&nbsp; Am I on the right track, or does my method have a serious flaw that cannot be fixed by parameter variation?&nbsp; Unfortunately, I can&#39;t upload my images as they are quite large, but I have attached my source code.&nbsp; Any suggestion is appreciated, thank you,
</div></blockquote><div><br>:)<br><br>Visualizing your metric might give you some insight. <br><br>Use the itk::ExhaustiveOptimizer. In reality, this isn&#39;t an optimizer at all :)<br><br>What this does is, it iterates over all possible translations in 3D space. (You&#39;ll have to do the rotations on your own). Observe the IterationEvent and write your metric values out into an image, where each of the axes represents a translation. Then fire it up the resulting metric image in Paraview (
<a href="http://www.paraview.org" target="_blank">www.paraview.org</a>) and either throw contours or use the Cut to visualize minimas and driving gradients in your metric space.<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<span>Charlotte<br>
</span><br>_______________________________________________<br>Insight-users mailing list<br><a href="mailto:Insight-users@itk.org" target="_blank">Insight-users@itk.org</a><br><a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">

http://www.itk.org/mailman/listinfo/insight-users</a><br><br><br clear="all"></blockquote></div><br><br clear="all"><br>-- <br>Karthik Krishnan<br>R&amp;D Engineer,<br>Kitware Inc.<br>Ph: 518 371 3971 x119<br>Fax: 518 371 3971
</blockquote></div><br>