Hi,
Your method seems fine - flirt matrices should multiply
together in this way. So this is a surprisingly large error.
How big are your voxels? If they are quite large then
this is possible. Also, if you are running registration with
the reference image set to a lower quality image (e.g. an
EPI) then the cost functions can be poorly estimated and
the registrations can be worse for that. Also, if there is a
lot of distortion (e.g. EPI) then this could cause problems
too. However, if this is on two good quality structural images
then it is a bit surprising.
Can you provide a bit more information about what kind of
images you've used?
All the best,
Mark
On 13 Jan 2011, at 20:17, Andrew Asman wrote:
> 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
>
|