Note
This page is a reference documentation. It only explains the function signature, and not how to use it. Please refer to the user guide for the big picture.
brainprep.interfaces.mgz_to_nii¶
- brainprep.interfaces.mgz_to_nii(output_dir, entities)[source]¶
Convert FreeSurfer images back to original Nifti space.
Convert FreeSurfer MGZ file in Nifti format and reslice the generated image as the ‘mri/rawavg.mgz’ image. A nearest neighbor interpolation is used. This includes the following images: - aparc+aseg - aparc.a2009s+aseg - aseg - wm - rawavg - ribbon - brain
- Parameters:
- output_dirDirectory
FreeSurfer working directory containing all the subjects.
- entitiesdict
A dictionary of parsed BIDS entities including modality.
- Returns:
- images: tuple[File]
A tuple containing converted images. The images are returned in the following order: - aparc_aseg_file - aparc_a2009s_aseg_file - aseg_file - wm_file - rawavg_file - ribbon_file - brain_file