Freesurfer .mgz to nifti

Greetings,

I have a script that is part of my analysis and it expects aparc+aseg.nii.gz because it passes it to AFNI for resampling. The freesurfer output from fmriprep is in .mgz format(i.e. aparc+aseg.mgz). Is there a way to have fmriprep output this file as .nii.gz or does it need to be converted using a different software?

Thank you,
Yonatan

You can use mri_convert aparc+aseg.mgz aparc+aseg.nii.gz (mri_convert is a FreeSurfer command).

Thank you very much Steven!

1 Like