Ah - now I understand.
I assumed from your first email that the image did not change
at all when loaded into fslview. If it actually looks in a different
orientation, then fslswapdim is doing its job. However, fslswapdim
will not change the labelling - it shifts the labels along with the
image. So you cannot fix incorrect labelling with fslswapdim.
What you want to do is change the sform and/or qform
associated with your image as these are incorrect. For that
you want to use fslorient. So, use fslswapdim to make it
look the "correct" way around in fslview (ignoring the labels)
and then modify the sform/qform with fslorient to fix the labels.
Note that copying the "old" sform/qform prior to using
fslswapdim and then replacing the "new" ones with the
old values (using fslorient) can achieve what I think you
want to do.
All the best,
Mark
P.S. fslsplit and fslmerge is unlikely to leave you with a
satisfactory sform/qform either.
On 23 Feb 2008, at 16:26, Jiří Keller, M.D. wrote:
>> Did you put an output filename in to create new file?
>
> yes, of course.
>
>
>> Also, note that doing x y -z will *change your left-right
>> orientation*! This is really dangerous as registration
>> will not fix this. If you think that the left-right labels
>> in your original image are fine then do *NOT* do
>> x y -z.
>
> Left-right is right, but nor S-I !
>
>> When you ran fslswapdim it should have complained
>> about this left-right orientation change. If you want to swap
>> S-I in fslview and use fslswapdim like this then you should
>> also swap L-R (i.e. -x y -z if you have standard axial slices).
>
> I was planning to do exactly this step (as is described in the manual
> for neurol2radiol. orientation conversion.
>
>
>> If you still think there's a problem in your version try:
>> fslswapdim $FSLDIR/data/standard/MNI152_T1_2mm_LR-masked.nii.gz -x
>> y -z LRTEST
>> and load LRTEST into fslview and see if the image is upside-down
>> but the labels all correct.
>
>
> So it behaves exactly the same way - left is marked left, top as top,
> the only difference is in viewing. Problem I am trying to solve is
> incorrect labelling of inferior and superior and this does not change
> ...
>
> fslsplit+fslmerge could be the solution, but it is quite messy and I
> thought the fslswapdim should work for z axis as well ..
>
|