Select sources from a label.
strThe FreeSurfer subject name.
Label | strDefine where the seed will be chosen. If str, can be ‘lh’ or ‘rh’, which correspond to left or right hemisphere, respectively.
intLocation to grow label from. If the location is an int, it represents the vertex number in the corresponding label. If it is a str, it can be either ‘random’ or ‘center’.
floatExtents (radius in mm) of the labels, i.e. maximum geodesic distance on the white matter surface from the seed. If 0, the resulting label will contain only one vertex.
Let the region grow outside the original label where location was defined.
NoneThe path to the directory containing the FreeSurfer subjects
reconstructions. If None, defaults to the SUBJECTS_DIR environment
variable.
None | strAssign name to the new label.
None | int | instance of RandomStateA seed for the NumPy random number generator (RNG). If None (default),
the seed will be obtained from the operating system
(see RandomState for details), meaning it will most
likely produce different output every time this function or method is run.
To achieve reproducible results, pass a value here to explicitly initialize
the RNG with a defined state.
strThe surface used to simulated the label, defaults to the white surface.
LabelThe label that contains the selected sources.
Notes
This function selects a region of interest on the cortical surface based on a label (or a hemisphere). The sources are selected by growing a region around a seed which is selected randomly, is the center of the label, or is a specific vertex. The selected vertices can extend beyond the initial provided label. This can be prevented by setting grow_outside to False.
The selected sources are returned in the form of a new Label object. The values of the label contain the distance from the seed in millimeters.
New in version 0.18.
mne.label.select_sources#