Thanks Paul, yes I had done something very similar / the opposite using FLIRT:
As the offset to the centre in the small image (the functional one) was 78mm, 112mm and 70mm in the x,y,z directions and in the large image (the structural one) 90mm, 126mm and 72mm in the x,y,z direction, I got them pretty well aligned using FLIRT and then resampling into the smaller bounding box / field of view using:
echo "1 0 0 -12" > gm2fun.mat
echo "0 1 0 -14" >> gm2fun.mat
echo "0 0 1 -2" >> gm2fun.mat
echo "0 0 0 1" >> gm2fun.mat
flirt -in gmgroup -ref fngroup -out gmgroup_3mm -applyisoxfm 3 -init gm2fun.mat
So the group structural image is corrected as it does not need as big an offset in the smaller box of the group functional image.
I chose to do it like this initially because the shifts were not multiples of 1 voxel, and the structural image needed to be resampled anyway.
But it does feel a bit as if I plucked these numbers out of the air, and also: with a smaller shift in the y-direction (e.g. -12 instead of -14) the functional and structural images seem to be better aligned.
Was this the right way to set the transformation matrix?!
Many thanks
Alle Meije
On Mon, 22 Oct 2018 10:53:04 +0100, paul mccarthy <[log in to unmask]> wrote:
>Hi Alle Meije,
>
>> The 'mean functional' and 'mean structural' mask files that show aligned in
>> FSLeyes have dimensions of 60x72x60 and 53x63x52 voxels, respectively and
>> the same voxel sizes in mm.
>
>The problem is possibly due to the fact that the images have different
>fields-of-view. You could try adding some padding to the smaller image
>(the structural?), and then re-running flirt. You can add padding
>using fslroi, by entering negative values for the min parameters, and
>extra-large values for the size parameters.
>
>Cheers,
>
>Paul
########################################################################
To unsubscribe from the FSL list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=FSL&A=1
|