<br>Hi Jimmy,<br><br>Thanks for letting us know about your version of Insight and InsightApplications.<br><br>This seems to be a real bug:<br><br>The API of itkCenteredEuler3DTransforms changed around March 2005, and this<br>
program was not updated correctly to match the new API.<br><br><a href="http://www.itk.org/cgi-bin/viewcvs.cgi/Code/Common/itkCenteredEuler3DTransform.h?root=Insight&r1=1.4&r2=1.5">http://www.itk.org/cgi-bin/viewcvs.cgi/Code/Common/itkCenteredEuler3DTransform.h?root=Insight&r1=1.4&r2=1.5
</a><br><br>The most recent API of the itkCenteredEuler3DTransform used 9 parameters:<br><br> 3 for rotation<br> 3 for translation<br> 3 for the center of rotation<br><br>The program however, still expects only 6 parameters:
<br><br> 3 for rotation<br> 3 for translation<br><br><br>We have just reported this as Bug#5382:<br><a href="http://public.kitware.com/Bug/bug.php?op=show&bugid=5382">http://public.kitware.com/Bug/bug.php?op=show&bugid=5382
</a><br><br><br>The simplest solution is for you to replace the<br><br> CenteredEuler3DTransform<br><br>with the<br><br> Euler3DTransform <br><br>We are now making similar changes in the CVS version of InsightApplications.
<br><br><br>----<br><br><br> Regarding the meaning of the Optimizer scales please read the <br> ITK Software Guide<br><br> <a href="http://www.itk.org/ItkSoftwareGuide.pdf">http://www.itk.org/ItkSoftwareGuide.pdf</a>
<br><br><br> in particular the "Image Registration" chapter.<br><br> The purpose of the scaling array that is passed to the optimizer <br> is to make more uniform the dynamic range of the Transform <br> parameters.
E.g. radians in rotations versus millimeters in <br> Translation.<br><br> The size of the parameter scaling array *MUST* be the same <br> of the number of Transform parameters, since each element <br> of the parameter scaling array correspond to one of the
<br> Transform parameters.<br> <br><br> This is explained in the ITK Software Guide, and has been <br> discussed many times in the list. Please read the guide and<br> let us know if you still have any questions.
<br><br><br> Thanks<br><br><br> Luis<br><br><br><br><br>==============================================<br><div><span class="gmail_quote">On 7/23/07, <b class="gmail_sendername">jimmy</b> <<a href="mailto:jimmy_lab@163.com">
jimmy_lab@163.com</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;">Thank you for your reply.<br><br>The version of Insight and InsightApplication are both
2.8.1.<br>The source file of IntensityBased2D3DRegistration is also attached.<br><br>Line 994 is where the problem located.<br>Could you tell me that what the meaning of weightings here used by Optimizer?<br>optimizer->SetScales(weightings); // <- what do the scales stand for?
<br><br>I have also downloaded the newest version of IntensityBased2D3DRegistration, it seems to be unchanged.<br>The file version is "Version: $Revision: 1.4 $ ".<br><br>Thanks in advance.<br><br><br>------------------
<br>jimmy<br>2007-07-23<br><br>-------------------------------------------------------------<br>发件人:Luis Ibanez<br>发送日期:2007-07-22 23:01:25<br>收件人:jimmy<br>抄送:insight-users<br>主题:Re: [Insight-users] Problem about the ITKAPP-IntensityBased2D3DRegistration
<br><br><br>Hi Jimmy,<br><br> What version of Insight are you using ?<br> What version of InsightApplications are you using ?<br><br>Over time the API of some of the ITK transforms has changed.<br>Notably, the Center of rotation, used to be part of the
<br>parameters of the transform. This may explain the mismatch<br>between 6 and 9 parameters.<br><br>It is likely that you are combining two imcompatible versions<br>of Insight and InsightApplications.<br><br><br> Please let us know,
<br><br><br> Thanks<br><br><br> Luis<br><br><br>--------------<br>jimmy wrote:<br>> Hi, everyone:<br>><br>> When I running the ITKAPP [IntensityBased2D3DRegistration],<br>> an error occurs as the following:
<br>><br>> itk::ExceptionObject (00F7FCD0)<br>> Location: "void __thiscall itk::RegularStepGradientDescentBaseOptimizer::Advance<br>> OneStep(void)"<br>> File: ITKSource\Code\Numerics\itkRegularStepGradientDescentBaseOptimizer.cxx
<br>> Line: 200<br>> Description: itk::ERROR: RegularStepGradientDescentOptimizer(015128A8): The size<br>> of Scales is 6, but the NumberOfParameters for the CostFunction is 9.<br>><br>> Can someone tell my why? ( The test example is from BrainWeb )
<br>><br>> 1.<br>> Is it the problem of<br>> itk::Optimizer::ScalesType weightings( 6 ); ?<br>><br>> What does it use for? How to expand it into *9?*<br>><br>> 2.<br>> And when I ignore the option of the command line
<br>> ./IntensityBased2D3DRegistration [-t -100 -100 -100] projection.mhd /data/BrainWeb/brainweb165a10f17.mha<br>><br>> The iteration of optimizer is 0, and the parameters of transform do not change.<br>> furthermore the programe crashed when writing the wrong result image.
<br>><br>> Don't you think it is more reasonable that we should not input any tranformation information before registration?<br>><br>><br>><br>> --------------<br>> jimmy<br>> 2007-07-18<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><br><br></blockquote></div><br>