<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><div>Hi,<br><br> I use versor-based 3D rigid registration and gradient descent -based affine registration algos to register two 3D volumes.<br><br>The metric is mean squares and interpolator type is linear.<br><br>To perform a cross-check on the final metric received after registration, I -recompute the metric values as follows :<br><br>1. Grayscale images<br>MetricType::Pointer metricOrig = MetricType::New(); <br>TransformType::Pointer transformOrig = TransformType::New();
<br><br>metricOrig->SetInterpolator(interpolator);<br>metricOrig->SetTransform(transformOrig);<br>metricOrig->SetFixedImage(fixedImageOrig);<br>metricOrig->SetMovingImage(movingImageOrig); <br>metricOrig->SetFixedImageRegion(fixedImageOrig->GetBufferedRegion());<br>MetricType::TransformParametersType finalParam = registration->GetLastTransformParameters();<br>metricOrig->Initialize(); <br>std::cout<<"MetricOnOriginalImage = "<<metricOrig->GetValue(finalParam)<<std::endl;<br> <br><br>For the above code, I get metric values like 50 and 90 (for two different datasets )whereas the bestValue = optimizer->GetValue() returned by the optimizer (after registration) is 0.70 and 1.70 respectively.<br>How does one explain this ? Especially when the Mean Square Error is the MEAN and not the total error ?<br><br><br><br>2. If the volumes sent to the
registrator were binary, and the resultant transform is to be applied to binary moving image.<br><br> MetricType::Pointer metricBin = MetricType::New(); <br><br> metricBin->SetInterpolator(interpolator);<br> metricBin->SetTransform(transformOrig);<br> metricBin->SetFixedImage(fixedBinImage);<br> metricBin->SetFixedImageRegion(fixedImage->GetBufferedRegion());<br> metricBin->SetMovingImage(movingBinImage); <br> metricBin->Initialize();<br>std::cout<<"MetricOnBinImage = "<<metricBin->GetValue(finalParam)<<std::endl;<br><br><br><br>Then I get values of metric = 958 and 220 (for two different datasets) when the optimizer returns a value of 32 and 90 respectively. <br><br>So my questions are :<br><br>a) How does one explain a MEAN square error of 958 over a
scale of 0-255 ?<br>b) For the binary images, when I compute the mean square error using other softwares, I get a value of 5. Whereas ITK optimizer returns the final metric value at 32. Both softwares use linear interpolator. I dont think I should get such huge differences even if I were to uses nearest neighbor .<br>c) In an earlier itk posting,<br><span> <a target="_blank" href="http://public.kitware.com/pipermail/insight-users/2005-July/014045.html">http://public.kitware.com/pipermail/insight-users/2005-July/014045.html</a>, Lydia mentions that this would be due to roundoff errors, but it does not explain large differences.</span><br><br>Any clues ?<br><br>Emma<br></div></div><br>
<hr size=1>Be a better Heartthrob. <a href="http://us.rd.yahoo.com/evt=48255/*http://answers.yahoo.com/dir/_ylc=X3oDMTI5MGx2aThyBF9TAzIxMTU1MDAzNTIEX3MDMzk2NTQ1MTAzBHNlYwNCQUJwaWxsYXJfTklfMzYwBHNsawNQcm9kdWN0X3F1ZXN0aW9uX3BhZ2U-?link=list&sid=396545433">Get better relationship answers </a>from someone who knows.<br>Yahoo! Answers - Check it out.
</body></html>