mne.volume_label_adjacency#
- mne.volume_label_adjacency(src, subject, subjects_dir, *, aseg='auto', labels=None)[source]#
Compute adjacency between volume labels.
Two labels are considered adjacent if one of their voxels are adjacent in the (volumetric) source space.
- Parameters:
- src
mne.SourceSpaces The volumetric source space on which the labels are defined.
- subject
str The FreeSurfer subject name.
- subjects_dirpath-like |
None The path to the directory containing the FreeSurfer subjects reconstructions. If
None, defaults to theSUBJECTS_DIRenvironment variable.- aseg
str The anatomical segmentation file. Default
autousesaparc+asegif available andwmparcif not. This may be any anatomical segmentation file in the mri subdirectory of the FreeSurfer subject directory.Changed in version 1.8: Added support for the new default
'auto'.- labels
listofstr|None Labeled regions of interest to plot. See
mne.get_montage_volume_labels()for one way to determine regions of interest. Regions can also be chosen from the FreeSurfer LUT. IfNone, all labels that are defined in the segmentation file are used.
- src
- Returns:
- label_adjacency
scipy.sparse.coo_matrix A sparse adjacency matrix containing a 1 for labels that are adjacent and 0 otherwise.
- labels
listofstr The names of the labels which contain at least one source point.
- label_adjacency
See also
Notes
New in v1.13.