htfa.brainnet.mni_mask¶
- htfa.brainnet.mni_mask()[source]¶
Voxel centers (V, 3) of nilearn’s 2 mm MNI152 brain mask, in MNI mm.
The default mask for snapping bare node centers (
effective_nodes,plot_network): the BrainNet meshes are in MNI space. Needs nilearn (thenilearnextra); the mask ships with nilearn, so nothing is downloaded.- Raises:
- ImportError
If nilearn is missing and cannot be installed; pass
mask=orsnap=Falseinstead.
Examples
>>> from htfa.brainnet import effective_nodes, mni_mask >>> mask = mni_mask() >>> mask.shape[1] 3 >>> c, _, info = effective_nodes([[0.0, 95.0, 0.0]], None, mask) # frontal pole >>> bool(info["snapped"][0]), bool(c[0, 1] < 75) (True, True)