Hi Luke,
I've just got back and am catching up on all these emails.
It turns out that there are two issues here.
One is that you mistakenly left the sform_code as 0 (unknown)
in the RAS_1mm.nii file. This meant that (as the qform_code
was also 0) FSL used its defaults to interpret the orientation,
which is LAS. So this file was actually LAS, not RAS. I'd advise
using fslorient to check that your orientation is correct generally
rather than looking at the raw header info.
The other issue is that the swap in x is not just a multiplication
by minus one. It is actually: x_swapped = (N_x - 1 - x_orig) so
that voxel 0 becomes voxel N_x -1 and voxel N_x -1 becomes
voxel 0. Hence, in your case N_x=2 and so x_swapped = 1 - x_orig.
This is why you haven't been able to figure out the change.
If I use these calculations on these images it all seems fine once
I fixed the sform_code above.
Sorry no-one else answered before and I hope this helps.
All the best,
Mark
On 21 Apr 2009, at 23:11, Luke Bloy wrote:
> Hi all,
>
> Mark is away so i thought i'd try to entice another developer to
> look at this.
>
> I'm still having some troubles. I'm attaching a dvi describing the
> problem in some detail (the pdf or ps file was to big). and a
> tarball with
> some test images and a test script.(testAff.sh)
>
> Basically I can't understand the fslmat files internal frame for
> images that
> aren't in LAS orientation, I'm getting very strange results from
> img2imgcoords, which makes me think it may be a bug?
>
> thanks in advance.
> -luke
> <fslFlirtIssue.dvi><fslAffTest.tgz>
|