目前在wsl2里面安装了freesurfer,想要将nii文件转换成mgz格式,因为使用python mne的api需要mgz格式,遇到问题如下
(base) cheng@LAPTOP-RGM3GCF3:~/eeg/data$ mri_convert sample.nii sample.mgz
mri_convert sample.nii sample.mgz
reading from sample.nii...
TR=1000.00, TE=0.00, TI=0.00, flip angle=0.00
i_ras = (-1, 0, 0)
j_ras = (0, 1, 0)
k_ras = (0, 0, 1)
writing to sample.mgz...
error: mghWrite(sample.mgz, -1): could not open file
ERROR: failure writing sample.mgz