Hi <span class="sg">Jerome/Luis,<br><br>Can you tell me about the algorithms used for ITK Image Registration?<br><br>I guess it is Multi-Modality Image Registration.<br><br>Thanks,<br>Balaji<br></span><br><div><span class="gmail_quote">
On 5/2/06, <b class="gmail_sendername">Jerome SCHMID</b> &lt;<a href="mailto:jeromeschmid@surgery.cuhk.edu.hk">jeromeschmid@surgery.cuhk.edu.hk</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Dear Luis,<br><br>Thanks for your detailed answers as usual!<br><br>Well as far as I understand I really have to tweak these scaling values<br>for each optimizer...My current code was a test code where by using<br>switches I use different optimizers to see which one look more adequate
<br>for my pb. For this I was hoping by using the same scaling values for<br>the rigid parameters will be okay... :-)<br><br>Thanks for the advice!<br><br><br>Best Regards,<br><br>Jerome Schmid<br><br>-----Original Message-----
<br>From: Luis Ibanez [mailto:<a href="mailto:luis.ibanez@kitware.com">luis.ibanez@kitware.com</a>]<br>Sent: Tuesday, May 02, 2006 10:41 PM<br>To: SCHMID, Jerome<br>Cc: insight-users<br>Subject: Re: [Insight-users] Doubt about scales parameters in
<br>registration<br><br><br>Hi Jerome,<br><br><br>The way the parameter scaling is used by every optimizer depends<br>on the strategy of the specific optimizer.<br><br><br>In all cases, however, the goal is to make uniform the dynamic
<br>range of the dimensions in the parametric space.<br><br><br><br>You will see that in the case of the GradientDescent optimizers,<br>the scale parameters are used for &quot;dividing&quot; the Gradient values,<br><br><br>
&nbsp;&nbsp; eg.: itkRegularStepGradientDescentBaseOptimizer.cxx: line 205<br><br><br>which results in shorter steps done along the direction of parameters<br>that have high scaling values, and longer steps will be taken along<br>the parameters that have low scaling values. In a typical case of
<br>a rigid transform, this means that you want to put high scaling values<br>in the rotation scaling-parameters and low values in the translation<br>scaling-parameters.<br><br><br><br>In the case of the OnePlusOne optimizer, the scales parameters are used
<br>for dividing the Radius of the area over which random samples will be<br>thrown for the next generation of the population.<br><br><br>In this case, small scaling-parameters will result in large radius,<br>which gives the opportunity for the samples to &quot;walk far&quot; from the
<br>current position along that particular direction.<br><br><br>&nbsp;&nbsp; e.g: itkOnePlusOneEvolutionaryOptimizer.cxx: line 123<br><br><br>Note that the scaling is used to regulate the radius, so you will<br>get similar result is you use the following pairs of parameters:
<br><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Radius 1000.0&nbsp;&nbsp;with Scaling&nbsp;&nbsp;1000.0<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Radius&nbsp;&nbsp;&nbsp;&nbsp;1.0&nbsp;&nbsp;with Scaling&nbsp;&nbsp;&nbsp;&nbsp; 1.0<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Radius 0.0001&nbsp;&nbsp;with Scaling&nbsp;&nbsp;0.0001<br><br><br>A similar situation happens with the GradientDescent optimizers,
<br>you could compensate the scaling-parameters with changes in the<br>StepLength (in the regular step) or with changes in the learning<br>rate (in the standard gradient descent).<br><br><br>In any of these conditions, it is important, as a sanity check,
<br>to add Command/Observers the optimizers and to monitor how they<br>evolve at every iteration.<br><br><br>Please let us know if you find any suspicious behavior in the<br>optimizers.<br><br><br>&nbsp;&nbsp;&nbsp;&nbsp;Thanks<br><br><br><br>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Luis<br><br><br><br>=======================<br>SCHMID, Jerome wrote:<br>&gt; Hi,<br>&gt;<br>&gt; I understand correctly the need of scaling in the registration<br>&gt; parameters of the transformation but I have a doubt concerning the
<br>good<br>&gt; passing of arguments.<br>&gt;<br>&gt; As suggested by many examples, and the wiki one has to pass a scale<br>&gt; parameter that will be *multiplied* to the internal data in order to<br>put<br>&gt; all the parameters into a same dynamic range. 
E.g:<br>&gt;<br>&gt; // Scale the translation components of the Transform in the Optimizer<br>&gt; OptimizerType::ScalesType scales( transform-&gt;GetNumberOfParameters()<br>);<br>&gt; const double translationScale = 1000.0
; // dynamic range of<br>translations<br>&gt; const double rotationScale = 1.0; // dynamic range of rotations<br>&gt; scales[0] = 1.0 / rotationScale;<br>&gt; scales[1] = 1.0 / rotationScale;<br>&gt; scales[2] = 1.0 / rotationScale;
<br>&gt; scales[3] = 1.0 / translationScale;<br>&gt; scales[4] = 1.0 / translationScale;<br>&gt; scales[5] = 1.0 / translationScale;<br>&gt;<br>&gt; this is typically example for 3D rigid reg.<br>&gt;<br>&gt; But if I have a look to for instance the OnePlusOne optimizer or the
<br>&gt; Powell one, the scales are *divided*, e.g. from powell code:<br>&gt;<br>&gt; for(unsigned int i=0; i&lt;m_SpaceDimension; i++)<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; m_LineDirection[i] = m_LineDirection[i] / this-&gt;GetScales()[i];
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&gt;<br>&gt; A great paper of the insight journal on shape to image reg (<br>&gt; &quot;Model-Image Registration of Parametric Shape Models: Fitting a Shell<br>to<br>&gt; the Cochlea&quot; ) based on the OnePlusOne optimizer, uses to set the
<br>scales<br>&gt; at 1000.0 instead of 1/1000.0...<br>&gt;<br>&gt; Is it done purposely, i.e. these optimizers require such choice, or it<br>&gt; is simply a misunderstanding on how scale must be used, i.e. divided<br>or
<br>&gt; multiplied?<br>&gt;<br>&gt; Thanks.<br>&gt;<br>&gt; Best Regards,<br>&gt;<br>&gt; Jerome Schmid<br>&gt;<br>&gt;<br>&gt; _______________________________________________<br>&gt; Insight-users mailing list<br>&gt; <a href="mailto:Insight-users@itk.org">
Insight-users@itk.org</a><br>&gt; <a href="http://www.itk.org/mailman/listinfo/insight-users">http://www.itk.org/mailman/listinfo/insight-users</a><br>&gt;<br>&gt;<br><br><br><br><br>_______________________________________________
<br>Insight-users mailing list<br><a href="mailto:Insight-users@itk.org">Insight-users@itk.org</a><br><a href="http://www.itk.org/mailman/listinfo/insight-users">http://www.itk.org/mailman/listinfo/insight-users</a><br></blockquote>
</div><br>-- <br>===============================<br>Balaji Gandhi<br>Research Associate<br>Biomolecular Science Center<br>University of Central Florida<br>Phone: 407-823-3387<br>Fax: 407-823-0956<br>Project: <a href="http://imgem.ucf.edu">
imgem.ucf.edu</a><br>===============================