[Insight-users] Fw: Mean Squares Metric Computation does not match

Emma Ryan eryanvtk at yahoo.com
Thu Aug 16 09:19:36 EDT 2007


Hi,

   I posted this a few days ago and did not get response. I was wondering if anyone tried the same experiments on their data ?

Essentially, if you have any results of final metric values from synthetic tests using registration/optimizations algorithms and by using direct matrix computations of known transforms,
please let me know. 

Thank you,
Emma

----- Forwarded Message ----
From: Emma Ryan <eryanvtk at yahoo.com>
To: insight-users at itk.org
Sent: Tuesday, August 14, 2007 2:01:58 PM
Subject: Mean Squares Metric Computation does not match

Hi,

   I use versor-based 3D rigid registration and gradient descent -based affine registration algos to register two 3D volumes.

The metric is mean squares and interpolator type is linear.

To perform a cross-check on the final metric received after registration, I -recompute the metric values as follows :

1.  Grayscale images
MetricType::Pointer         metricOrig           = MetricType::New();    
TransformType::Pointer  transformOrig = TransformType::New();   
 

metricOrig->SetInterpolator(interpolator);
metricOrig->SetTransform(transformOrig);
metricOrig->SetFixedImage(fixedImageOrig);
metricOrig->SetMovingImage(movingImageOrig); 
metricOrig->SetFixedImageRegion(fixedImageOrig->GetBufferedRegion());
MetricType::TransformParametersType finalParam = registration->GetLastTransformParameters();
metricOrig->Initialize();    
std::cout<<"MetricOnOriginalImage = "<<metricOrig->GetValue(finalParam)<<std::endl;
        

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.
How does one explain this ? Especially when the Mean Square Error is the MEAN and not the total error ?



2. If the volumes sent to the
 registrator were binary, and the resultant transform is to be applied to binary moving image.

 MetricType::Pointer         metricBin           = MetricType::New();    

 metricBin->SetInterpolator(interpolator);
 metricBin->SetTransform(transformOrig);
 metricBin->SetFixedImage(fixedBinImage);
 metricBin->SetFixedImageRegion(fixedImage->GetBufferedRegion());
 metricBin->SetMovingImage(movingBinImage); 
 metricBin->Initialize();
std::cout<<"MetricOnBinImage = "<<metricBin->GetValue(finalParam)<<std::endl;



Then I get values of metric = 958 and 220 (for two different datasets) when the optimizer returns a value of 32 and 90 respectively. 

So my questions are :

a)  How does one explain a MEAN square error of 958 over a
 scale of 0-255 ?
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 .
c) In an earlier itk posting,
 http://public.kitware.com/pipermail/insight-users/2005-July/014045.html, Lydia mentions that this would be due to roundoff errors, but it does not explain large differences.

Any clues ?

Emma




      Be a better Heartthrob. Get better relationship answers from someone who knows.
Yahoo! Answers - Check it out. 






      ____________________________________________________________________________________
Shape Yahoo! in your own image.  Join our Network Research Panel today!   http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20070816/531d3b3f/attachment.htm


More information about the Insight-users mailing list