fmriprep icon indicating copy to clipboard operation
fmriprep copied to clipboard

Incorrect alignment of resampled results when SBRefs have mismatched xforms

Open oesteban opened this issue 6 years ago • 2 comments

Related to #1511 .

Example:

sub-3010_task-rest_run-1_bold.nii.gz               float32 [100, 100,  64, 989]  2.20x2.20x2.20x0.68   sform
sub-3010_task-rest_run-1_sbref.nii.gz               int16  [100, 100,  64,   4]  2.20x2.20x2.20x6.00   sform

and the following s-forms / codes

sub-3010_task-rest_run-1_bold.nii.gz
[[ -2.20000005   0.           0.         108.88800049]
 [  0.          -2.19230008  -0.18399933 121.40699768]
 [  0.          -0.1839013    2.19229198 -66.99874878]
 [  0.           0.           0.           1.        ]] / 1
sub-3010_task-rest_run-1_sbref.nii.gz
[[ -2.20000005   0.          -0.         108.88800049]
 [ -0.           2.19230056  -0.18389861 -95.63275146]
 [  0.           0.18389806   2.19230723 -85.20471191]
 [  0.           0.           0.           1.        ]]  / 1

lead to misalignments in the outputs.

oesteban avatar Jul 03 '19 00:07 oesteban

I'm pushing this away from 1.4.1 because this will require a deep refactor. I've identified two issues:

  1. FSL MCFLIRT does not interpret correctly the headers of the reference image - when the SBRef has mismatched x-forms (and especially in this case where there is an axis flip) the alignment will just not work (maybe #1354 would help?)

  2. The resampling workflows generate references from the BOLD dataset instead of the SBRef.

oesteban avatar Jul 05 '19 22:07 oesteban

A potential shortcut to fix this is poldracklab/niworkflows#253

oesteban avatar Jul 05 '19 23:07 oesteban