<!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> </DIV>
<DIV><FONT face=Arial size=2>I use affine transform and Matte mutual
information metric to do some registrations. After getting the
metric minimum and the parameters, I try to use the same parameters,
same transformation and Matte mutual information metric 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> typedef
itk::MattesMutualInformationImageToImageMetric< double, double >
MetricType;</FONT></DIV>
<DIV><FONT face=Arial size=2> MetricType::Pointer metric =
MetricType::New();</FONT></DIV>
<DIV><FONT face=Arial size=2> metric->SetFixedImage (
fixedImage );</FONT></DIV>
<DIV><FONT face=Arial size=2> metric->SetFixedImageRegion (
fixedImage->GetBufferedRegion() );</FONT></DIV>
<DIV><FONT face=Arial size=2> metric->SetMovingImage (
movingImage );</FONT></DIV>
<DIV><FONT face=Arial size=2>
metric->SetNumberOfHistogramBins( 24 );</FONT></DIV>
<DIV><FONT face=Arial size=2> metric->SetUseAllPixels( true
);</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> typedef itk::AffineTransform<
double, 3> TransformType;</FONT></DIV>
<DIV><FONT face=Arial size=2> TransformType::Pointer transform
= TransformType::New();</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> metric->SetTransform(
transform);</FONT></DIV>
<DIV><FONT face=Arial size=2>
MetricType::TransformParametersType displacement =
transform->GetParameters();</FONT></DIV>
<DIV><FONT face=Arial size=2> for(int i = 0; i<12;
i++)</FONT></DIV>
<DIV><FONT face=Arial size=2>
displacement[i] = best_parameters[i]; // best_parameters is from
registration</FONT></DIV>
<DIV><FONT face=Arial size=2> </FONT></DIV>
<DIV><FONT face=Arial size=2> value = metric->GetValue(
displacement); </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>However, the value is very different from the
miminum from the registration. Why is the result different? 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> </DIV>
<DIV><FONT face=Arial size=2>Thanks,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Julia</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV></BODY></HTML>