<!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.5730.11" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hi All,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>I use affine transform and &nbsp;Matte mutual 
information metric to&nbsp;do some registrations.&nbsp;After getting &nbsp;the 
metric minimum and the&nbsp;parameters, I try to use the same&nbsp;parameters, 
same transformation and&nbsp;Matte mutual information metric&nbsp;&nbsp;to 
compute the minimum again in a separate main function.</FONT></DIV>
<DIV><FONT face=Arial size=2>The code as follows.</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; typedef 
itk::MattesMutualInformationImageToImageMetric&lt; double, double &gt; 
MetricType;</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; MetricType::Pointer metric = 
MetricType::New();</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; metric-&gt;SetFixedImage ( 
fixedImage );</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; metric-&gt;SetFixedImageRegion ( 
fixedImage-&gt;GetBufferedRegion() );</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; metric-&gt;SetMovingImage ( 
movingImage );</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; 
metric-&gt;SetNumberOfHistogramBins( 24 );</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; metric-&gt;SetUseAllPixels( true 
);</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; typedef itk::AffineTransform&lt; 
double, 3&gt; &nbsp;TransformType;</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; TransformType::Pointer transform 
= TransformType::New();</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; metric-&gt;SetTransform( 
transform);</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; 
MetricType::TransformParametersType displacement = 
transform-&gt;GetParameters();</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; for(int i = 0; i&lt;12; 
i++)</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
displacement[i] = best_parameters[i]; // best_parameters is from 
registration</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp;&nbsp; </FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; value = metric-&gt;GetValue( 
displacement); </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>However, the value is very different from the 
miminum from the registration.&nbsp;Why&nbsp;is the result different? &nbsp;Is 
any special operations in registration? </FONT></DIV>
<DIV><FONT face=Arial size=2>Any hints will be appreciated.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Thanks,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Julia</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV></BODY></HTML>