我对神经影像学过程非常陌生,并尝试使用 nltools 加载神经影像学数据。因此数据集可以在以下位置找到:https ://gin.g-node.org/ljchang/Localizer
我已将其下载到本地,这是我访问.nli.gz
文件的代码
from nltools.data import Brain_Data
#load data
base_dir = 'D:\study_notes\dartbrain\Localizer\derivatives\\fmriprep'
sub = 'S01'
data = Brain_Data(os.path.join(base_dir, f'sub-{sub}','func', f'sub-{sub}_task-localizer_space-MNI152NLin2009cAsym_desc-preproc_bold.nii.gz'))
然而, Brain_Data() 提高
raise ImageFileError(f'Cannot work out file type of "{filename}"')
nibabel.filebasedimages.ImageFileError: Cannot work out file type of "D:\study_notes\dartbrain\Localizer\derivatives\fmriprep\sub-S01\func\sub-S01_task-localizer_space-MNI152NLin2009cAsym_desc-preproc_bold.nii.gz"
我确定路径正确并且文件具有完全控制权限。太感谢了!