<DIV>Hi,</DIV>
<DIV>I tried the Versor transform function&nbsp;and optimizer.</DIV>
<DIV>and following is the code for metric</DIV>
<DIV>&nbsp;</DIV>
<DIV><EM><FONT color=#00407f>&nbsp;unsigned int numberOfBins =32;<BR>&nbsp; MetricType::HistogramType::SizeType histogramSize;<BR>&nbsp; histogramSize[0] = numberOfBins;<BR>&nbsp; histogramSize[1] = numberOfBins;<BR>&nbsp; metric-&gt;SetHistogramSize( histogramSize );<BR>&nbsp;</FONT></EM></DIV>
<DIV><EM><FONT color=#00407f>&nbsp; const unsigned int numberOfParameters = transform-&gt;GetNumberOfParameters();</FONT></EM></DIV>
<DIV><EM><FONT color=#00407f>&nbsp; typedef MetricType::ScalesType ScalesType;<BR>&nbsp; ScalesType scales( numberOfParameters );</FONT></EM></DIV>
<DIV><EM><FONT color=#00407f>&nbsp; scales.Fill( 1.0 );<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp; metric-&gt;SetDerivativeStepLengthScales(scales);</FONT></EM></DIV>
<DIV><EM><FONT color=#00407f>&nbsp;<BR>&nbsp;</FONT></EM><BR>I do not know why the computation was so slow.</DIV>
<DIV>Every iteration will take 2 second.</DIV>
<DIV>Do you know why?</DIV>
<DIV>&nbsp;</DIV>
<DIV>Thanks!</DIV>
<DIV>Best regards,</DIV>
<DIV>Yu Qi</DIV>
<DIV><STRONG><EM></EM></STRONG>&nbsp;</DIV>
<DIV><STRONG><EM></EM></STRONG>&nbsp;</DIV>
<DIV><STRONG><EM></EM></STRONG>&nbsp;</DIV>
<DIV><B><I>Luis Ibanez &lt;luis.ibanez@kitware.com&gt;</I></B> 写道:</DIV>
<BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid"><BR>Hi Yu,<BR><BR><BR>The Optimizers to use depends a lot on the Transform<BR>that you choose. Therefore the decision about the<BR>Transform should be taken first.<BR><BR>Since this is 3D and you probably are dealing with<BR>images from the same patient, I would suggest that<BR>you use a rigid Transform such as:<BR><BR>VersorRigid3DTransform<BR>http://www.itk.org/Insight/Doxygen/html/classitk_1_1VersorRigid3DTransform.html<BR><BR>and therefore use the<BR><BR>VersorRigid3DTransformOptimizer<BR>http://www.itk.org/Insight/Doxygen/html/classitk_1_1VersorRigid3DTransformOptimizer.html<BR><BR><BR>There are multiple options for Mutual Information, but<BR>if you insist in using Normalized Mutual Information,<BR>then the class that you need is:<BR><BR>http://www.itk.org/Insight/Doxygen/html/classitk_1_1NormalizedMutualInformationHistogramImageToImageMetric.html<BR><BR><BR>You will find a versy
 similar example on the<BR>ITK Software Guide<BR><BR>http://www.itk.org/ItkSoftwareGuide.pdf<BR><BR>in section: 8.6.4, pdf-page 391. The source code is<BR>available in<BR><BR><BR>Insight/Examples/Registration/<BR>ImageRegistration8.cxx<BR><BR><BR><BR>You are *STRONGLY* encouraged to read the full Chapter<BR>on registration before you attempt to use this particular<BR>example.<BR><BR><BR><BR>Regards,<BR><BR><BR>Luis<BR><BR><BR><BR>--------------<BR>Yu Qi wrote:<BR>&gt; Hi.<BR>&gt; I am going to register 3d MRI and fMRI using Normalized MI metric.<BR>&gt; <BR>&gt; What optimizer and transform can I use?<BR>&gt; Can I use any of the transform and optimizer supplied by ITK?<BR>&gt; <BR>&gt; And which is the most popular one for normalized MI?<BR>&gt; <BR>&gt; Thank you!<BR>&gt; <BR>&gt; <BR>&gt; <BR>&gt; <BR>&gt; *Best Regards!*<BR>&gt; ** <BR>&gt; *Yu Qi*<BR>&gt; <BR>&gt; <BR>&gt;
 <BR><BR><BR></BLOCKQUOTE><p>__________________________________________________<br>赶快注册雅虎超大容量免费邮箱?<br>http://cn.mail.yahoo.com