How to get the fmriprep output in .mgz format?

Hi folks,

I have a question regarding the output format of the fmriprep docker image. Here is the command I used:

docker run --rm -e DOCKER_VERSION_8395080871=24.0.2 -it --memory=15g -v C:\Users\myaccount\Documents\retinotopy-dataset\freesurfer.txt:/opt/freesurfer/license.txt:ro -v C:\Users\myaccount\Documents\retinotopy-dataset:/data:ro -v C:\Users\myaccount\Documents\retinotopy-dataset\output:/out poldracklab/fmriprep:latest /data /out participant --participant-label PVTS102 --output-spaces fsaverage --low-mem

The results were generated in .gii format. However, when I ran the same command with the default “output-spaces,” the results were in .nii.gz format. I noticed that some people have their fmriprep results in .mgz format. I would like to know if fmriprep provides an option to obtain the results in the desired format, or if I need to use a conversion command in freesurfer to convert them to .mgz?

Thank you for your help.

Hi @njalilim,

You should be using nipreps/fmriprep, not poldracklab/fmriprep, to use the most recent fMRIPrep versions.

No fMRIprep outputs should be .mgz by default. If you want to convert to that, you should use FreeSurfer’s mri_convert (for volumetric inputs) or mris_convert (for surface inputs).

Best,
Steven

1 Like

Thanks for your reply, Steven. I used nipreps/fmriprep before and I got the wrong results. So I tried poldrack version.

You should switch to the nipreps version (23.1.3 at this time). The poldracklab version is very old.

Best,
Steven

1 Like