Functional not in MNI space



I’m having issues normalizing a functional image to mni space for a subset of my participants. 4 out of 64 participants, all with the same scanning parameters, do not output files in mni space.

Their t1w images are fine. They get preprocessed and normalized and the warp field file gets created, but the final (preproc, mni sapce) functional image is where the problem occurs. The bold_space-mni_preproc file gets created but isn’t actually in mni space. What’s even odder is that the space-T1w_preproc image never actually gets created, which I believe is required for ANTs to normalize to mni space and output the final preproc image.

I found an old post indicating that old data in a working directory could be to blame, but I’ve re-run the participants using a new directory with the same outcome. I also included a verbose flag for one of the participants, but I don’t see any errors or anything to be concerned about really.

Ideally, I’d like to process everything in fmriprep, but I’m willing to preprocess up to registration/normalization, manually perform those tasks using ANTs, then perform ica-aroma. The only issue is that the preprocessed functional never gets written to the directory.

The jobs complete without throwing errors and the report doesn’t list anything either. I’m using fmriprep v1.1.4 with singularity on a cluster. The verbose logs don’t indicate that we’re exceeding the memory limit or anything, but could that be to blame? Is there a flag that I can include to halt fmriprep at the coregistration step so that I can manually perform the other steps?


Please have a look at this BIDS -> fmriprep transforms to (3.5 x 3.75 x 3.75) MNI space? post and see if it explains what is going on.

Could you share the command line you used when running fmriprep? T1w needs to be listed in --output-space commmand line flag for outputs in T1w space files to be created.


Thanks for responding, sorry for the delay.

I’m looking into your first suggestion and will get back to you.

I included T1w in the output space. I’m using a script that feeds in a few variables, but this is the important bit:

srun singularity run $image $bidsdir $outdir participant -w $workdir --participant_label $subject --task-id rest --nthreads 14 --omp-nthreads 14 --mem-mb 64000 --output-space {T1w,template,fsnative} --low-mem --use-aroma --fs-license-file $outdir/license.txt --no-submm-recon --write-graph --fs-no-reconal -vv


I’m surprised this did not throw and error. --output-space should be a space delimited list. For example --output-space T1w template fsnative


Hi Chris,
we tried exactly that, but it returned an error.

fmriprep-docker --mem-mb=32000 --output-space T1w template --fs-license-file=$outdir/license.txt -w $workdir $bidsdir $outdir participant

the error states: ‘fmriprep: error: argument --output-space: invalid choice: ‘/$bidsdir/’ (choose from ‘T1w’, ‘template’, ‘fsnative’, ‘fsaverage’, ‘fsaverage6’, ‘fsaverage5’)’


Wrong order - try

fmriprep-docker $bidsdir $outdir participant --mem-mb=32000 --output-space T1w template --fs-license-file=$outdir/license.txt -w $workdir


Seems to work, thanks!



I reprocessed the four participants that had issues and they all look more or less the same. The image in T1w space is again not being outputted.

I don’t think the issue with MNI space you reference above applies to this situation, but if you have a method of verifying, I’ll run it and see.

In the meantime, I’m still having the same issues as before: no image in T1w space and the MNI image is offset.


Could you share the HTML reports (with figures which should be in a separate subfolder)?

Could you also describe in detail (including software used) how you asses MNI image offset and provide some screenshots?

PS is @bryjack0890 and @Josephine the same person?



Here’s the report: link

My method for checking the space is opening the _space-MNI152… using fsleyes and overlaying the 2mm MNI standard. I’ve attached screenshots of those views.


No we’re not the same person :slight_smile:


As evident from the “EPI to T1 registration” part of the report the coregistration heuristic did not do well:

Could you try rerunning FMRIPREP with --force-bbr option?