Fmriprep: Resampling funcs to standard spaces fails in 1.4.0a0

Created on 9 May 2019  路  12Comments  路  Source: nipreps/fmriprep

Hi,
You might be aware of this, but resampling of funcs to standard spaces produces strange results in in 1.4.0.a0. Here's an example (anat/sub-XX_space-MNI152Nlin2009cAsym_desc-preproc_T1w in red, overlaid on one func/*_space-MNI152NLin2009cAsym_boldref)

image

Here's just the func/*_space-MNI152NLin2009cAsym_boldref

image

I see this error in all subjects I've run through 1.4.0.a0 (to get around #1615 after implementing #1603), and for both MNI152NLin2009cAsym and MNI152NLin6Asym. Same data has been processed in previous versions of fmriprep without these issues.

I know that 1.4.0.a0 is a pre-release, so sorry if this an already known issue planned to be fixed for the "official" release.

bug critical medium high

All 12 comments

Hi again,
I did some debugging, and it looks like antsApplyTransforms in /bold_std_trans_wf/_key_*/bold_to_std_transform gets t1_to_mniComposite-inputs (--transform) from both standard spaces.

Here's a screenshot from /bold_std_trans_wf/_key_MNI152NLin6Asym/bold_to_std_transform/command.txt (note the MNI152NLin2009cAsym-registration in addition to MNI152NLin6Asym)

image

Running antsApplyTransforms with the correct registration only seems to fix the problems I'm seeing.

Note that my original call to fmriprep didn't ask for MNI152NLin6Asym under output-spaces (I used --output-spaces T1w MNI152NLin2009cAsym to reproduce fmriprep-behavior from earlier versions). However, due to ICA-AROMA being run NLin6 was automatically added.

@markushs Thanks so much for tracking this down! We're lucky to have you trying out the pre-release.

Okay, I can see this happening also on my settings. The KeySelect interface seems to work alright:

Node: single_subject_01_wf (func_preproc_task_mixedgamblestask_run_01_wf (bold_std_trans_wf (select_std (utility)
=================================================================================================================


 Hierarchy : fmriprep_wf.single_subject_01_wf.func_preproc_task_mixedgamblestask_run_01_wf.bold_std_trans_wf.select_std
 Exec ID : select_std.aI.a1


Original Inputs
---------------


* anat2std_xfm : ['/home/oesteban/tmp/fmriprep-ds005/work/fmriprep_wf/single_subject_01_wf/anat_preproc_wf/anat_norm_wf/_template_MNI152NLin2009cAsym/registration/ants_t1_to_mniComp
osite.h5', '/home/oesteban/tmp/fmriprep-ds005/work/fmriprep_wf/single_subject_01_wf/anat_preproc_wf/anat_norm_wf/_template_MNI152NLin6Asym/registration/ants_t1_to_mniComposite.h5']
* key : MNI152NLin6Asym
* keys : ['MNI152NLin2009cAsym', 'MNI152NLin6Asym']
* resolution : ['native', 2]

Execution Inputs
----------------


* anat2std_xfm : ['/home/oesteban/tmp/fmriprep-ds005/work/fmriprep_wf/single_subject_01_wf/anat_preproc_wf/anat_norm_wf/_template_MNI152NLin2009cAsym/registration/ants_t1_to_mniComp
osite.h5', '/home/oesteban/tmp/fmriprep-ds005/work/fmriprep_wf/single_subject_01_wf/anat_preproc_wf/anat_norm_wf/_template_MNI152NLin6Asym/registration/ants_t1_to_mniComposite.h5']
* key : MNI152NLin6Asym
* keys : ['MNI152NLin2009cAsym', 'MNI152NLin6Asym']
* resolution : ['native', 2]


Execution Outputs
-----------------


* anat2std_xfm : /home/oesteban/tmp/fmriprep-ds005/work/fmriprep_wf/single_subject_01_wf/anat_preproc_wf/anat_norm_wf/_template_MNI152NLin6Asym/registration/ants_t1_to_mniComposite.
h5
* key : MNI152NLin6Asym
* resolution : 2

So I guess I missed some connection to the ApplyTransforms node.

@markushs you are the goalkeeper of this release. Thank you so much.

@markushs pre-release 1.4.0a1 should post within the next couple of hours. Can I ask you to give it a try and confirm this problem has been addressed?

@oesteban Yes, everything seems to work much better now! One observation though: the funcs in both MNI-spaces come out identical even though different--transform inputs are used. While NLin2009 and NLin6 are similar, they are not identical so I was a bit puzzled by this.

Are they identical bitwise or visually?

They should have different resolutions, for instance.

So, the preprocessed funcs are both in native resolution (3.027 x 3.027 x 3 mm in both MNI spaces). The preprocessed BOLD time series are identical voxel-by-voxel to the 6th digit at least.

image

Sorry for not being of more help here, but I can at least confirm that the inputs to bold_std_trans_wf/outputnode are different across MNI output spaces. But they end up identical in derivatives/fmriprep/sub-XX/ses-XX/func (as you can see from the fslinfo output)

Thanks for the heads up, again :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jdkent picture jdkent  路  4Comments

ins0mniac2 picture ins0mniac2  路  5Comments

tragus1 picture tragus1  路  5Comments

effigies picture effigies  路  4Comments

lenacanlab picture lenacanlab  路  3Comments