Hi Mark,
Please find the headers attached. This is from a rodent subject (hence the small voxel sizes), but I have tested this on a human subject as well and seen the same problem. This particular scan was a sagittal acquisition.
Thanks,
Toby
On 9 May 2013, at 14:25, Mark Jenkinson wrote:
> Hi,
>
> This most likely depends on whether your images are radiologically or neurologically stored.
> Can you send us the output of fslhd on the INPUT, REF and OUT images?
>
> All the best,
> Mark
>
>
> On 9 May 2013, at 12:39, "Wood, Tobias" <[log in to unmask]> wrote:
>
>> Dear list,
>>
>> I discovered the following while trying to resample some scans of the same subject, but with slightly different FoVs, to a cropped sub-volume of one of those scans. The following steps should reproduce the problem with any image, e.g. if INPUT.nii is 128x128x128, with FSL 5.0.0
>>
>> fslroi INPUT REF_0 0 64 0 64 0 64
>> fslroi INPUT REF_64 64 64 64 64 64 64
>> flirt -in INPUT -ref REF_0 -out OUT_0 -init $FSLDIR/etc/flirtsch/ident.mat -applyxfm
>> flirt -in INPUT -ref REF_64 -out OUT_64 -init $FSLDIR/etc/flirstsch/iden.mat -applyxfm
>>
>> I would expect OUT_0 and OUT_64 to be perfect copies of REF_0 and REF_64 respectively. However, on my system, OUT_64 is a perfect copy of REF_0. This leads me to believe that the offsets contained within the qform/sform are not being respected properly, even though they all appear to set correctly in the various headers.
>>
>> If I run flirt with the -v option, I get the following warning:
>> WARNING: Both reference and input images have an sform matrix set
>> The output image will use the sform from the reference image
>>
>> Is there anyway I can get OUT_64 to match REF_64? Is this a bug?
>>
>> Thanks in advance.
>>
>> Dr Tobias Wood
>> King's College London, Department of Neuroimaging
>> [log in to unmask]
filename Prep/brain_mask.nii.gz
sizeof_hdr 348
data_type INT16
dim0 3
dim1 192
dim2 192
dim3 192
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.2083333284
pixdim2 0.2083333284
pixdim3 0.2083333284
pixdim4 1.0000000000
pixdim5 0.0000000000
pixdim6 0.0000000000
pixdim7 0.0000000000
vox_offset 352
cal_max 0.0000
cal_min 0.0000
scl_slope 1.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.000000 -0.036177 0.205168 -16.396296
qto_xyz:2 0.000000 0.205168 0.036177 -25.205956
qto_xyz:3 -0.208333 -0.000000 0.000000 22.314165
qto_xyz:4 0.000000 0.000000 0.000000 1.000000
qform_xorient Superior-to-Inferior
qform_yorient Posterior-to-Anterior
qform_zorient Left-to-Right
sform_name Scanner Anat
sform_code 1
sto_xyz:1 0.000000 -0.036177 0.205168 -16.396296
sto_xyz:2 0.000000 0.205168 0.036177 -25.205956
sto_xyz:3 -0.208333 -0.000000 0.000000 22.314165
sto_xyz:4 0.000000 0.000000 0.000000 1.000000
sform_xorient Superior-to-Inferior
sform_yorient Posterior-to-Anterior
sform_zorient Left-to-Right
file_type NIFTI-1+
file_code 1
descrip FSL5.0
aux_file
filename out0.nii.gz
sizeof_hdr 348
data_type FLOAT32
dim0 3
dim1 96
dim2 96
dim3 96
dim4 1
dim5 1
dim6 1
dim7 1
vox_units mm
time_units s
datatype 16
nbyper 4
bitpix 32
pixdim0 0.0000000000
pixdim1 0.2083333284
pixdim2 0.2083333284
pixdim3 0.2083333284
pixdim4 1.0000000000
pixdim5 0.0000000000
pixdim6 0.0000000000
pixdim7 0.0000000000
vox_offset 352
cal_max 0.0000
cal_min 0.0000
scl_slope 1.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.000000 -0.036177 0.205168 -16.396296
qto_xyz:2 0.000000 0.205168 0.036177 -25.205956
qto_xyz:3 -0.208333 -0.000000 0.000000 22.314167
qto_xyz:4 0.000000 0.000000 0.000000 1.000000
qform_xorient Superior-to-Inferior
qform_yorient Posterior-to-Anterior
qform_zorient Left-to-Right
sform_name Scanner Anat
sform_code 1
sto_xyz:1 0.000000 -0.036177 0.205168 -16.396296
sto_xyz:2 0.000000 0.205168 0.036177 -25.205956
sto_xyz:3 -0.208333 -0.000000 0.000000 22.314167
sto_xyz:4 0.000000 0.000000 0.000000 1.000000
sform_xorient Superior-to-Inferior
sform_yorient Posterior-to-Anterior
sform_zorient Left-to-Right
file_type NIFTI-1+
file_code 1
descrip FSL5.0
aux_file
filename out96.nii.gz
sizeof_hdr 348
data_type FLOAT32
dim0 3
dim1 96
dim2 96
dim3 96
dim4 1
dim5 1
dim6 1
dim7 1
vox_units mm
time_units s
datatype 16
nbyper 4
bitpix 32
pixdim0 0.0000000000
pixdim1 0.2083333284
pixdim2 0.2083333284
pixdim3 0.2083333284
pixdim4 1.0000000000
pixdim5 0.0000000000
pixdim6 0.0000000000
pixdim7 0.0000000000
vox_offset 352
cal_max 0.0000
cal_min 0.0000
scl_slope 1.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.000000 -0.036177 0.205168 -0.173103
qto_xyz:2 0.000000 0.205168 0.036177 -2.036836
qto_xyz:3 -0.208333 -0.000000 0.000000 2.314170
qto_xyz:4 0.000000 0.000000 0.000000 1.000000
qform_xorient Superior-to-Inferior
qform_yorient Posterior-to-Anterior
qform_zorient Left-to-Right
sform_name Scanner Anat
sform_code 1
sto_xyz:1 0.000000 -0.036177 0.205168 -0.173103
sto_xyz:2 0.000000 0.205168 0.036177 -2.036836
sto_xyz:3 -0.208333 -0.000000 0.000000 2.314170
sto_xyz:4 0.000000 0.000000 0.000000 1.000000
sform_xorient Superior-to-Inferior
sform_yorient Posterior-to-Anterior
sform_zorient Left-to-Right
file_type NIFTI-1+
file_code 1
descrip FSL5.0
aux_file
filename ref0.nii.gz
sizeof_hdr 348
data_type INT16
dim0 3
dim1 96
dim2 96
dim3 96
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.2083333284
pixdim2 0.2083333284
pixdim3 0.2083333284
pixdim4 1.0000000000
pixdim5 0.0000000000
pixdim6 0.0000000000
pixdim7 0.0000000000
vox_offset 352
cal_max 0.0000
cal_min 0.0000
scl_slope 1.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.000000 -0.036177 0.205168 -16.396296
qto_xyz:2 0.000000 0.205168 0.036177 -25.205956
qto_xyz:3 -0.208333 -0.000000 0.000000 22.314167
qto_xyz:4 0.000000 0.000000 0.000000 1.000000
qform_xorient Superior-to-Inferior
qform_yorient Posterior-to-Anterior
qform_zorient Left-to-Right
sform_name Scanner Anat
sform_code 1
sto_xyz:1 0.000000 -0.036177 0.205168 -16.396296
sto_xyz:2 0.000000 0.205168 0.036177 -25.205956
sto_xyz:3 -0.208333 -0.000000 0.000000 22.314167
sto_xyz:4 0.000000 0.000000 0.000000 1.000000
sform_xorient Superior-to-Inferior
sform_yorient Posterior-to-Anterior
sform_zorient Left-to-Right
file_type NIFTI-1+
file_code 1
descrip FSL5.0
aux_file
filename ref96.nii.gz
sizeof_hdr 348
data_type INT16
dim0 3
dim1 96
dim2 96
dim3 96
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.2083333284
pixdim2 0.2083333284
pixdim3 0.2083333284
pixdim4 1.0000000000
pixdim5 0.0000000000
pixdim6 0.0000000000
pixdim7 0.0000000000
vox_offset 352
cal_max 0.0000
cal_min 0.0000
scl_slope 1.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.000000 -0.036177 0.205168 -0.173103
qto_xyz:2 0.000000 0.205168 0.036177 -2.036836
qto_xyz:3 -0.208333 -0.000000 0.000000 2.314170
qto_xyz:4 0.000000 0.000000 0.000000 1.000000
qform_xorient Superior-to-Inferior
qform_yorient Posterior-to-Anterior
qform_zorient Left-to-Right
sform_name Scanner Anat
sform_code 1
sto_xyz:1 0.000000 -0.036177 0.205168 -0.173103
sto_xyz:2 0.000000 0.205168 0.036177 -2.036836
sto_xyz:3 -0.208333 -0.000000 0.000000 2.314170
sto_xyz:4 0.000000 0.000000 0.000000 1.000000
sform_xorient Superior-to-Inferior
sform_yorient Posterior-to-Anterior
sform_zorient Left-to-Right
file_type NIFTI-1+
file_code 1
descrip FSL5.0
aux_file
|