Hi there
I’m using the NiftiSpheresMasker to create a spherical mask around a coordinate with a radius of 10mm. Next, I would like to turn this mask into a boolean mask, so that I get a numpy array of booleans for my sphere. I thought the best way of doing this is to first turn the mask into an image and then into a boolean or something of that sort, but haven’t been able to figure it out. Then I ran into this from nifti_spheres_masker that ought to help me, especially the first one:
nilearn.input_data.nifti_spheres_masker._apply_mask_and_get_affinity
However, when I tried to import it, I get the following error:
ImportError: cannot import name ‘_apply_mask_and_get_affinity’ from ‘nilearn.input_data.nifti_spheres_masker’ (C:\Users\maxb.WISMAIN\Anaconda3\lib\site-packages\nilearn\input_data\nifti_spheres_masker.py)
I’m wondering if someone has a solution for either of these problems (i.e. either a different way of getting a boolean mask of a sphere or an idea why I can’t import the above-mentioned function)?
Thanks in advance!
Best,
Max