<div dir="ltr"><div>From Examples/RegistrationITKv4/MultiResImageRegistration2.cxx [1]:</div><div></div><div><br></div><i>The set of parameters in the AffineTransform have different dynamic ranges. Typically the parameters associated with the matrix have values around [-1:1], although they are not restricted to this interval. Parameters associated with translations, on the other hand, tend to have much higher values, typically in the order of 10.0 to 100.0. This difference in dynamic range negatively affects the performance of gradient descent optimizers. ITK provides a mechanism to compensate for such differences in values among the parameters when they are passed to the optimizer. The mechanism consists of providing an array of scale factors to the optimizer. These factors re-normalize the gradient components before they are used to compute the step of the optimizer at the current iteration. In our particular case, a common choice for the scale parameters is to set to 1.0 all those associated with the matrix coefficients, that is, the first N x N factors. Then, we set the remaining scale factors to a small value. The following code sets up the scale coefficients.</i><div><br></div><div>From the ImageRegistration7 example [5]:</div><div><br></div><div></div><i>Keeping in mind that the scale of units in scaling, rotation and translation are quite different, we take advantage of the scaling functionality provided by the optimizers. We know that the first element of the parameters array corresponds to the scale factor, the second corresponds to the angle, third and fourth are the center of rotation and fifth and sixth are the remaining translation. We use henceforth small factors in the scales associated with translations and the rotation center.</i><div><br><div>From the ScalesType doxygen [2]:</div><div><br></div><i>Scale type. This array defines scale to be applied to parameters before being evaluated in the cost function. This allows to map to a more convenient space. In particular this is used to normalize parameter spaces in which some parameters have a different dynamic range.</i><div><br></div><div>[5] is the most specific I can find.  Looking at how it's used in [1] might also be useful, as the example you mentioned doesn't provide much explanation (perhaps I or someone else should address that soon). </div><div><br></div><div>From [3] (warning, outdated (2002!)): </div><div><br></div><i>e.g. for an 3D AffineTransform, you get 12 parameters: the first 9 are the coefficients of the matrix (representing rotation, scale and shearing) the last 3 are the components of a translation vector. You want then to provide an array of 12 values with the first 9 being =1.0 and the last three being on the range of 1.0 / the image size (in millimeters).</i><div><i><br></i></div><div>Here is another useful thread which is only half a decade old [4].</div><div><br></div><div>Perhaps an explanation for this is deserving of better accommodations, maybe on the wiki.</div><div><br></div><div>In the meantime, hope this helps!<br><div><br><div>[1] <a href="https://github.com/InsightSoftwareConsortium/ITK/blob/master/Examples/RegistrationITKv4/MultiResImageRegistration2.cxx#L291-322">https://github.com/InsightSoftwareConsortium/ITK/blob/master/Examples/RegistrationITKv4/MultiResImageRegistration2.cxx#L291-322</a></div><div><br></div><div>[2] <a href="http://www.itk.org/Doxygen/html/classitk_1_1Optimizer.html#a4c2e8eb9d9390e0e2988e78ea094492a">http://www.itk.org/Doxygen/html/classitk_1_1Optimizer.html#a4c2e8eb9d9390e0e2988e78ea094492a</a></div><div><br></div><div>[3] <a href="http://public.kitware.com/pipermail/insight-users/2002-October/001400.html">http://public.kitware.com/pipermail/insight-users/2002-October/001400.html</a></div><div><br></div><div>[4] <a href="http://itk-insight-users.2283740.n2.nabble.com/Confused-abour-Optimizer-Scales-td4010857.html">http://itk-insight-users.2283740.n2.nabble.com/Confused-abour-Optimizer-Scales-td4010857.html</a></div><div><br></div><div>[5] <a href="https://github.com/InsightSoftwareConsortium/ITK/blob/master/Examples/RegistrationITKv4/ImageRegistration7.cxx">https://github.com/InsightSoftwareConsortium/ITK/blob/master/Examples/RegistrationITKv4/ImageRegistration7.cxx</a></div><div><br></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Dec 29, 2014 at 11:09 AM, Matias Montroull <span dir="ltr"><<a href="mailto:matimontg@gmail.com" target="_blank">matimontg@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>What are the components or what each element represents (0 to 5) in the VersorRigid3DTransformOptimizer?</div><div><br></div><div><div> typedef OptimizerType::ScalesType       OptimizerScalesType;</div><div>  OptimizerScalesType optimizerScales( transform->GetNumberOfParameters() );</div><div>  const double translationScale = 1.0 / 1000.0;</div><div><br></div><div>  optimizerScales[0] = 1.0;</div><div>  optimizerScales[1] = 1.0;</div><div>  optimizerScales[2] = 1.0;</div><div>  optimizerScales[3] = translationScale;</div><div>  optimizerScales[4] = translationScale;</div><div>  optimizerScales[5] = translationScale;</div></div><div><br></div><div>Thanks!</div></div>
<br>_____________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/products/protraining.php</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/insight-users" target="_blank">http://public.kitware.com/mailman/listinfo/insight-users</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Christopher Mullins<div>R&D Engineer</div><div>Kitware Inc.,</div><div>919.869.8871</div></div>
</div>