Hi,
You cannot set different qform and sforms with fslorient I'm
afraid. It will always make them the same as each other.
This is generally what FSL will do with all outputs at the
moment as we can only get certain other packages to
interact correctly when we set both to the same. Hopefully
we will drop this restriction in the future.
Apart from that, the reason you also do not get a good result
from these commands is that the matrix you are specifying in
the second fslorient command is:
1 0 0 0
0 0 -1 0
0 0 1 0
0 0 0 1
which has determinant zero and so does not correctly
specify a real orientation. In this situation it has tried to
set something with non-zero determinant which is "close"
but has obviously not done that well.
If you want the qform and sform to both be a given
matrix then these commands should work as long
as you give it an acceptable matrix.
All the best,
Mark
On 14 Jan 2009, at 05:21, Michael Rohan wrote:
> Does fslorient work these days? I tried to use it to set the qform
> values for some data
> from a new system and it overwrote both qform and sform values in an
> undesired way. I
> have nifti header dump tools that I used to check the individual
> fields. I wanted to declare
> the data as a coronal acquisition before swapdimming it to standard
> orientation.
>
> example:
> header before:
> Orientation
> qform_code : 1
> orientation type scanner (old)
> quatern_b, quatern_c, quatern_d: 0.973138 0.230221 0.000000
> qoffset_x, qoffset_y, qoffset_z: -0.000000 -0.000000 0.000000
> : 0.893997 0.448074 0.448074
> rotmat: 0.448074 -0.893997 0.000000
> : 0.000000 -0.000000 -1.000000
> sform_code : 0 (>1 for method 3)
> srow_x: 0.000000 0.000000 0.000000 0.000000
> srow_y: 0.000000 0.000000 0.000000 0.000000
> srow_z: 0.000000 0.000000 0.000000 0.000000
>
> commands:
> fslorient -setqformcode 2 epi_02a.nii
> fslorient -setqform 1 0 0 0 0 0 -1 0 0 0 1 0 0 0 0 1 epi_02a.nii
>
> header after:
> Orientation
> qform_code : 2
> orientation type another file or truth
> quatern_b, quatern_c, quatern_d: 0.195090 0.000000 0.000000
> qoffset_x, qoffset_y, qoffset_z: 0.000000 0.000000 0.000000
> : 0.038060 0.000000 0.000000
> rotmat: 0.000000 -0.038060 0.000000
> : 0.000000 -0.000000 -0.038060
> sform_code : 2 (>1 for method 3)
> srow_x: 0.268199 0.134422 -0.000000 -0.000000
> srow_y: 0.134422 -0.268199 -0.000000 -0.000000
> srow_z: 0.000000 0.000000 0.400000 0.000000
>
>
> Mike Rohan
>
|