Standard brain template and atlas

Dear fmriprep developers,

Thank you so much for such a wonderful tool!

I was trying to replace the old toolchains used by our lab with fmriprep these days, and found that there are something inconvenient compared with, e.g., FSL. So I need your help.

In fmriprep 1.4.0, the output of each individual contains T1w files in “subject” space, aparcaseg_dseg and aseg_dseg labels in “subject” space. There are also EPI files in MNI space, as well as aparcaseg_dseg and aseg_dseg labels in MNI space but for each run.

You know, sometimes we need the standard space T1w image as background (for rendering results), I was wondering if there is any way to obtain the template T1w image directly from fmriprep (since fmriprep used that file, it should be already downloaded), but not indirectly clone from GitHub, install datalad et. al., just for this template?

Another question is, are there any corresponding label file for the standard space T1w image (in MNI space)? Those label files in func folder are for each run, and their resolution is not very high if I need to extract ROIs based on them.

Thank you so much for your time.

Might be inconvenient but you can re-run the workflow specifying MNI space as the output, more info under --output-spaces header:

Could speed it up by specifying --anat-only as well.

Hi @daxiaomi,

fMRIPrep pulls all templates from a resource called TemplateFlow, as you probably know judging from that “datalad et al.”.

Can you share more about how you usually run fMRIPrep? The response to your question will depend on whether you are using containers or a bare-metal installation.

Thank you for your reply.

Usually I run fmriprep via fmriprep-docker, the python wrapper of docker command, so everything is inside the container except those outputs.

Hi @rwblair, It seems that the default template (MNI152NLin2009cAsym) should be already in MNI space, and there are outputs of fmriprep in MNI space, for both anat and func, if I understood correctly. My point is, this template can not be easily accessed, while I need the template, as well as the atlas label for this template.

Hi @daxiaomi, in that case, you’ll need to switch to docker. Unless your python environment is heavily degraded (or still python 2), I would go for the templateflow client:

python -m pip install templateflow
python -c "from templateflow import api; api.get('MNI152NLin2009cAsym')"

That will fetch everything there is about MNI152NLin2009cAsym and store it under $HOME/.cache/templateflow/tpl-MNI152NLin2009cAsym. That includes a couple of atlases available and the corresponding tsv files describing the labels.

1 Like

Hi @oesteban, thanks for your suggestion.

So your method is a simplified way to fetch templateflow, rather than using git and datalad, right?

Comparing to the output of fmriprep (aparcaseg_dseg, aseg_dseg), which ones are the corresponding tsv and label files in the MNI152NLin2009cAsym folder?


You can use the labels from those from MNI152NLin6Asym. The coordinates will not be correct though.