How to get specific outputs with fMRIPrep

Summary of what happened:

I am applying the fMRIPrep pipeline to data of a single subject to validate the command inputs I select so as to get the desired outputs and then apply the command to a whole dataset. In my case, I want to have at least the following outputs: The preprocessed structural T1w and T2w volumes in the MNI space, the preprocessed BOLD rs-fMRI volume in MNI space also, and when it comes to the surface space I need the inflated left and right hemisphere brain models, along with the volumetric BOLD rs-fMRI data projected on the surface (CIFTI format). Which are the command options I need to set?

I attach the command I used.

Command used (and if a helper script was used, a link to the helper script or the command generated):

fmriprep \
  /home/jovyan/Desktop/dataset/raw \
  /home/jovyan/Desktop/dataset/derivatives \
  participant \
  --nprocs 120 \
  --omp-nthreads 4 \
  --mem 240000 \
  --skip_bids_validation \
  --output-spaces MNI152NLin2009cAsym:res-2 T1w T2w \
  --bold2anat-init t2w \
  --fs-license-file /home/jovyan/Desktop/freesurfer/license.txt

Version:

fmriprep 25.1.3

Environment (Docker, Singularity / Apptainer, custom installation):

Neurodesktop

Data formatted according to a validatable standard? Please provide the output of the validator:

PASTE VALIDATOR OUTPUT HERE

Relevant log outputs (up to 20 lines):

PASTE LOG OUTPUT HERE

Screenshots / relevant information:


You need the —cifti-output flag.

Best,
Steven

Okay @Steven, thanks for the help. Do you know whether this command would output both the T1w and T2w structural volumes in MNI space?

Thank you!

If you specify an MNI output in your --output-spaces then yes.

In the outputs I do in fact get the T1w volume in the specified MNI space, but I do not seem to find the preprocessed T2w volume in MNI space.

For T2w in MNI, you might need to apply the T1w-to-MNI xfm to it after processing.