Hello,
I recently started using ITKv3 for 3D registration based on ImageRegistraton8.cxx
Note that ITK is interfaced to another software for image processing.
For testing purpose, I started with the 3D images (brainweb1e1a10f20.mha and brainweb1e1a10f20Rot10Tx15.mha) as described in the manual.
If I use the default metric i.e. MeanSquaresImageToImageMetric I got the expected translation and rotation values as follows
Result =
versor X = 0.000003
versor Y = -0.000067
versor Z = -0.087025
Translation X = 2.418170
Translation Y = -17.306444
Translation Z = 0.000000
Iterations = 118
Metric value = 48.648984
Matrix =
0.984853 0.173390 -0.000134
-0.173390 0.984853 0.000005
0.000133 0.000018 1.000000
Offset = [-14.932855 -0.065922 -0.013900 ]
However, if I change the metric to MattesMutualInformationImageToImageMetric without changing anything else in the code, the values are off as you can see:
Result =
versor X = -0.007452
versor Y = 0.090020
versor Z = 0.003222
Translation X = -0.069399
Translation Y = -0.071802
Translation Z = 0.000000
Iterations = 103
Metric value = -0.574851
Matrix =
0.983772 -0.007759 0.179255
0.005076 0.999868 0.015424
-0.179351 -0.014264 0.983682
Offset = [-13.724556 -1.887127 19.134393 ]
My code is basically a copy of ImageRegistration8.cxx (under ITKv3) except that I am using SetImportPointer to import the images from the buffer.
I would appreciate if anyone have any idea on what could be wrong or how to troubleshoot this strange issue.
Thanks much,
Dinesh