Hi,
I’m using nilearn on a Windows computer. I’m trying to get an MNI atlas using Templateflow, this is my code:
atlas_file = get('MNI152NLin2009cAsym', resolution=2, atlas='HOSPA', desc='th25'); atlas = nb.load(atlas_file).get_data()
But I get the following error:
ImageFileError: Cannot work out file type of “C:/Users/maxab/.cache/templateflow/tpl-MNI152NLin2009cAsym/tpl-MNI152NLin2009cAsym_res-02_atlas-HOSPA_desc-th25_dseg.nii.gz”
I tried using: atlas = nb.Nifti1Image.from_filename(atlas_file)
But that also doesn’t work. I somehow haven’t found a way to fix this. Any leads?
Thanks,
Max