I have two affine matrices resulting from two separate calls to flirt. One is used to register a2b and the other b2a. My minimal understanding of registration indicates that the product of these two matrices should be approximately the identity matrix, i.e. if I were to apply a2b and then b2a on 'a' then the result should be very close to the original 'a'. Is there any obvious reason why this should not be the case?
The result of multiplying the two affine matrices gives the following result ....
1.0247 0.0059 -0.0048 -3.2806
-0.0022 1.0338 -0.0250 -0.4633
0.0126 0.0338 1.0336 -8.9326
0 0 0 1.0000
where the main deviation from the identity matrix is in the 4th column. Note, the two images that I am registering have exactly the same dimensions and voxel resolution.
I have written MATLAB code to convert the affine matrix to a deformation field and the resulting deformation field exactly matches the output of the 'img2imgcoord -vox ...' utility. Thus, I am confident that I am reading and applying the affine matrix appropriately. If I compose the two resulting deformation fields the mean displacement is about 4.5 mm, which seems a little high for simply applying an a2b then b2a affine transformation.
-Andrew Asman
|