<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.6000.16414" name=GENERATOR>
<STYLE>
<!--
 /* Font Definitions */
 @font-face
        {font-family:宋体;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"\@宋体";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        text-align:justify;
        text-justify:inter-ideograph;
        font-size:10.5pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:Verdana;
        color:windowtext;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
 /* Page Definitions */
 @page Section1
        {size:595.3pt 841.9pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;
        layout-grid:15.6pt;}
div.Section1
        {page:Section1;}
-->
</STYLE>
</HEAD>
<BODY>
<DIV><FONT face=Verdana color=#0000ff size=2>
<DIV><FONT face=Verdana color=#0000ff size=2>Dear Mr Luis Ibanez:</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Verdana color=#0000ff size=2>You really helped me a lot!&nbsp; 
And I have learned much about Optimizer and Transform under your suggestion and 
guidance.</FONT></DIV></FONT></DIV>
<DIV><FONT face=Verdana color=#0000ff size=2>Thank you very much 
indeed!</FONT></DIV>
<DIV><FONT face=Verdana color=#0000ff size=2></FONT><FONT face=Verdana 
size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Verdana size=2>&nbsp;</DIV></FONT>
<DIV align=left>
<DIV><FONT color=#c0c0c0><FONT face=Verdana size=2>jimmy</FONT></DIV>
<DIV><FONT face=Verdana size=2>2007-07-24</FONT></FONT></DIV></DIV>
<DIV><FONT face=Verdana size=2>
<HR>
</FONT></DIV>
<DIV><FONT face=Verdana><FONT size=2>&nbsp;Luis Ibanez</FONT></FONT></DIV>
<DIV><FONT face=Verdana><FONT 
size=2>&nbsp;2007-07-23&nbsp;21:20:38</FONT></FONT></DIV>
<DIV><FONT face=Verdana><FONT size=2>&nbsp;jimmy</FONT></FONT></DIV>
<DIV><FONT face=Verdana><FONT size=2>&nbsp;insight-users; Julien 
Jomier</FONT></FONT></DIV>
<DIV><FONT face=Verdana><FONT size=2>&nbsp;Re: Re: [Insight-users] Problem about 
the ITKAPP-IntensityBased2D3DRegistration : API Changes in 
CenteredEuler3DTra</FONT></FONT></DIV>
<DIV><FONT face=Verdana size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Verdana size=2><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&amp;r1=1.4&amp;r2=1.5">http://www.itk.org/cgi-bin/viewcvs.cgi/Code/Common/itkCenteredEuler3DTransform.h?root=Insight&amp;r1=1.4&amp;r2=1.5 
</A><BR><BR>The most recent API of the itkCenteredEuler3DTransform&nbsp; used 9 
parameters:<BR><BR>&nbsp;&nbsp; 3 for rotation<BR>&nbsp;&nbsp; 3 for 
translation<BR>&nbsp;&nbsp; 3 for the center of rotation<BR><BR>The program 
however, still expects only 6 parameters: <BR><BR>&nbsp; 3 for 
rotation<BR>&nbsp; 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&amp;bugid=5382">http://public.kitware.com/Bug/bug.php?op=show&amp;bugid=5382 
</A><BR><BR><BR>The simplest solution is for you to replace 
the<BR><BR>&nbsp;&nbsp; CenteredEuler3DTransform<BR><BR>with 
the<BR><BR>&nbsp;&nbsp; Euler3DTransform <BR><BR>We are now making similar 
changes in the CVS version of InsightApplications. 
<BR><BR><BR>----<BR><BR><BR>&nbsp; Regarding the meaning of the Optimizer scales 
please read the <BR>&nbsp; ITK Software Guide<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp; <A 
href="http://www.itk.org/ItkSoftwareGuide.pdf">http://www.itk.org/ItkSoftwareGuide.pdf</A> 
<BR><BR><BR>&nbsp;&nbsp; in particular the "Image Registration" 
chapter.<BR><BR>&nbsp;&nbsp; The purpose of the scaling array that is passed to 
the optimizer <BR>&nbsp;&nbsp; is to make more uniform the dynamic range of the 
Transform <BR>&nbsp;&nbsp; parameters. E.g.&nbsp; radians in rotations versus 
millimeters in <BR>&nbsp;&nbsp; Translation.<BR><BR>&nbsp;&nbsp; The size of the 
parameter scaling array *MUST* be the same <BR>&nbsp;&nbsp; of the number of 
Transform parameters, since each element <BR>&nbsp;&nbsp; of the parameter 
scaling array correspond to one of the <BR>&nbsp;&nbsp; Transform 
parameters.<BR>&nbsp;&nbsp;&nbsp; <BR><BR>&nbsp;&nbsp; This is explained in the 
ITK Software Guide, and has been <BR>&nbsp;&nbsp; discussed many times in the 
list. Please read the guide and<BR>&nbsp;&nbsp; let us know if you still have 
any questions. <BR><BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
Thanks<BR><BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
Luis<BR><BR><BR><BR><BR>==============================================<BR>
<DIV><SPAN class=gmail_quote>On 7/23/07, <B class=gmail_sendername>jimmy</B> 
&lt;<A href="mailto:jimmy_lab@163.com"> jimmy_lab@163.com</A>&gt; wrote:</SPAN>
<BLOCKQUOTE class=gmail_quote 
style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">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-&gt;SetScales(weightings);&nbsp;&nbsp;// &lt;- 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&nbsp;&nbsp;"Version:&nbsp;&nbsp; $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&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ITKAPP-IntensityBased2D3DRegistration 
  <BR><BR><BR>Hi Jimmy,<BR><BR>&nbsp;&nbsp; What version of 
  Insight&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  are you using ?<BR>&nbsp;&nbsp; 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>&nbsp;&nbsp; 
  Thanks<BR><BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Luis<BR><BR><BR>--------------<BR>jimmy 
  wrote:<BR>&gt; Hi, everyone:<BR>&gt;<BR>&gt; When I running the ITKAPP 
  [IntensityBased2D3DRegistration],<BR>&gt; an error occurs as the following: 
  <BR>&gt;<BR>&gt; itk::ExceptionObject (00F7FCD0)<BR>&gt; Location: "void 
  __thiscall itk::RegularStepGradientDescentBaseOptimizer::Advance<BR>&gt; 
  OneStep(void)"<BR>&gt; File: 
  ITKSource\Code\Numerics\itkRegularStepGradientDescentBaseOptimizer.cxx 
  <BR>&gt; Line: 200<BR>&gt; Description: itk::ERROR: 
  RegularStepGradientDescentOptimizer(015128A8): The size<BR>&gt;&nbsp;&nbsp;of 
  Scales is 6, but the NumberOfParameters for the CostFunction is 
  9.<BR>&gt;<BR>&gt; Can someone tell my why?&nbsp;&nbsp; ( The test example is 
  from BrainWeb ) <BR>&gt;<BR>&gt; 1.<BR>&gt; Is it the problem of<BR>&gt; 
  itk::Optimizer::ScalesType weightings( 6 );&nbsp;&nbsp;?<BR>&gt;<BR>&gt; What 
  does it use for?&nbsp;&nbsp;How to expand it into *9?*<BR>&gt;<BR>&gt; 
  2.<BR>&gt; And when I ignore the option of the command line 
  <BR>&gt;&nbsp;&nbsp;./IntensityBased2D3DRegistration [-t -100 -100 -100] 
  projection.mhd /data/BrainWeb/brainweb165a10f17.mha<BR>&gt;<BR>&gt; The 
  iteration of optimizer is 0, and the parameters of transform do not 
  change.<BR>&gt; furthermore the programe crashed when writing the wrong result 
  image. <BR>&gt;<BR>&gt; Don't you think it is more reasonable that we should 
  not input any tranformation information before 
  registration?<BR>&gt;<BR>&gt;<BR>&gt;<BR>&gt; --------------<BR>&gt; 
  jimmy<BR>&gt; 2007-07-18<BR>&gt; <BR>&gt;<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><BR><BR></BLOCKQUOTE></DIV><BR></FONT></DIV></BODY></HTML>