fmriprep
fmriprep copied to clipboard
Incorrect alignment of resampled results when SBRefs have mismatched xforms
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.
I'm pushing this away from 1.4.1 because this will require a deep refactor. I've identified two issues:
-
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?)
-
The resampling workflows generate references from the BOLD dataset instead of the SBRef.
A potential shortcut to fix this is poldracklab/niworkflows#253