Hi,
If you want to turn your coronal into an axial using the labels then
just follow the instructions it gives you. At the end of your command
output it says:
>> Try the following command instead: fslswapdim 897911.nii.gz RL PA
>> IS f897911.nii.gz
If you do this then you will get what you want.
The reason it does not want to do LR PA IS is that it would swap the
left-right
handedness of the image. In general we discourage this (partly for
histortical
reasons but partly for extra compatibility with other software). The
two images
would view identically in FSLView, so it is better to use the RL PA IS
version
as it recommends. You can force it with the x y z notation, but I
strongly recommend
just doing RL PA IS as you get what you want and retain the handedness.
Why this is different for two images from the same sequence/scanner I
do not
know unless there is a reconstruction difference for some reason, or
unless the
prescription of the FOV on the scanner console can swap directions of
something
like the phase-encode order (I know this does occur for some scanners)
and so
this can result from the order in which the FOV box was dragged/
created. Anyway,
for whatever reason it is reflected in the sform/qform part of the
headers:
>> qto_xyz:2 0.000000 0.000000 -1.500000 130.822998
for the first image and
>> qto_xyz:2 0.000000 0.000000 1.500000 -86.677101
for the second image (note the critical sign change in the third
number - the fourth
is not important). So that is why one is OK with one form but the
other is not.
All the best,
Mark
On 4 May 2010, at 17:40, Alle Meije Wink wrote:
> Hi Mark, thanks for the reply.
>
> What I want to do is turn a coronal image into an axial image. This
> is the storage order in the inputs
>
>> qform_xorient Right-to-Left
>> qform_yorient Superior-to-Inferior
>> qform_zorient Posterior-to-Anterior
>
> and what I need to have is this:
>
>> [amw71]$ fslswapdim ANATOMY-2/3D_FSPGR_COR/897911.nii.gz LR PA IS
>> test.nii.gz
>
> From "RL SI PA" to "LR PA IS". I thought that fslswapdim was the
> right tool for that, and the label notation seems easiest to use
> (knowing that the correct orientation information is in the header)
> because I only need to specify the desired orientation.
>
> But when I use that on 2 images from the same study, same scanner,
> same conversion program to nifti, I get:
>
>> [oulu@bcni3 3D_FSPGR_COR]$ fslhd 1009911.nii.gz filename
>> 1009911.nii.gz sizeof_hdr 348 data_type INT16 dim0 3 dim1 256 dim2
>> 256 dim3 146 dim4 1 dim5 1 dim6 1 dim7 1 vox_units mm time_units s
>> datatype 4 nbyper 2 bitpix 16 pixdim0 0.0000000000 pixdim1
>> 0.9375000000 pixdim2 0.9375000000 pixdim3 1.5000000000 pixdim4
>> 0.0125759998 pixdim5 1.0000000000 pixdim6 1.0000000000 pixdim7
>> 1.0000000000 vox_offset 352 cal_max 0.0000 cal_min 0.0000 scl_slope
>> 0.000000 scl_inter 0.000000 phase_dim 0 freq_dim 0 slice_dim 0
>> slice_name Unknown slice_code 0 slice_start 0 slice_end 0
>> slice_duration 0.000000 time_offset 0.000000 intent Unknown
>> intent_code 0 intent_name intent_p1 0.000000 intent_p2 0.000000
>> intent_p3 0.000000 qform_name Scanner Anat qform_code 1 qto_xyz:1
>> -0.937500 0.000000 0.000000 123.042999 qto_xyz:2 0.000000 0.000000
>> -1.500000 130.822998 qto_xyz:3 -0.000000 -0.937500 0.000000
>> 120.702003 qto_xyz:4 0.000000 0.000000 0.000000 1.000000
>> qform_xorient Right-to-Left qform_yorient Superior-to-Inferior
>> qform_zorient Anterior-to-Posterior sform_name Scanner Anat
>> sform_code 1 sto_xyz:1 -0.937500 0.000000 -0.000000 123.042999
>> sto_xyz:2 0.000000 0.000000 -1.500000 130.822998 sto_xyz:3 0.000000
>> -0.937500 0.000000 120.702003 sto_xyz:4 0.000000 0.000000 0.000000
>> 1.000000 sform_xorient Right-to-Left sform_yorient Superior-to-
>> Inferior sform_zorient Anterior-to-Posterior file_type NIFTI-1+
>> file_code 1 descrip FreeSurfer Mar 12 2007 aux_file [oulu@bcni3
>> 3D_FSPGR_COR]$ fslswapdim 1009911.nii.gz LR PA IS f1009911.nii.gz
>> [oulu@bcni3 3D_FSPGR_COR]$ fslhd 897911.nii.gz filename
>> 897911.nii.gz sizeof_hdr 348 data_type INT16 dim0 3 dim1 256 dim2
>> 256 dim3 146 dim4 1 dim5 1 dim6 1 dim7 1 vox_units mm time_units s
>> datatype 4 nbyper 2 bitpix 16 pixdim0 0.0000000000 pixdim1
>> 0.9375000000 pixdim2 0.9375000000 pixdim3 1.5000000000 pixdim4
>> 0.0123120006 pixdim5 1.0000000000 pixdim6 1.0000000000 pixdim7
>> 1.0000000000 vox_offset 352 cal_max 0.0000 cal_min 0.0000 scl_slope
>> 0.000000 scl_inter 0.000000 phase_dim 0 freq_dim 0 slice_dim 0
>> slice_name Unknown slice_code 0 slice_start 0 slice_end 0
>> slice_duration 0.000000 time_offset 0.000000 intent Unknown
>> intent_code 0 intent_name intent_p1 0.000000 intent_p2 0.000000
>> intent_p3 0.000000 qform_name Scanner Anat qform_code 1 qto_xyz:1
>> -0.937500 0.000000 -0.000000 125.385002 qto_xyz:2 0.000000 0.000000
>> 1.500000 -86.677101 qto_xyz:3 -0.000000 -0.937500 -0.000000
>> 118.360001 qto_xyz:4 0.000000 0.000000 0.000000 1.000000
>> qform_xorient Right-to-Left qform_yorient Superior-to-Inferior
>> qform_zorient Posterior-to-Anterior sform_name Scanner Anat
>> sform_code 1 sto_xyz:1 -0.937500 0.000000 -0.000000 125.385002
>> sto_xyz:2 0.000000 0.000000 1.500000 -86.677101 sto_xyz:3 0.000000
>> -0.937500 0.000000 118.360001 sto_xyz:4 0.000000 0.000000 0.000000
>> 1.000000 sform_xorient Right-to-Left sform_yorient Superior-to-
>> Inferior sform_zorient Posterior-to-Anterior file_type NIFTI-1+
>> file_code 1 descrip FreeSurfer Mar 12 2007 aux_file [oulu@bcni3
>> 3D_FSPGR_COR]$ fslswapdim 897911.nii.gz LR PA IS f897911.nii.gz
>> Cannot perform requested swap (NEUROLOGICAL/RADIOLOGICAL storage
>> inverted) Try the following command instead: fslswapdim
>> 897911.nii.gz RL PA IS f897911.nii.gz
>
> The input images and their NifTI headers (their relevant fields)
> look exactly the same. Why does it work on one but not on another?
>
> Best wishes
> Alle Meije
>
|