Generate circular labels in source space with region growing.
This function generates a number of labels in source space by growing regions starting from the vertices defined in “seeds”. For each seed, a label is generated containing all vertices within a maximum geodesic distance on the white matter surface from the seed.
str
The FreeSurfer subject name.
int
| list
Seed, or list of seeds. Each seed can be either a vertex number or a list of vertex numbers.
array
| float
Extents (radius in mm) of the labels.
array
| int
Hemispheres to use for the labels (0: left, 1: right).
None
The path to the directory containing the FreeSurfer subjects
reconstructions. If None
, defaults to the SUBJECTS_DIR
environment
variable.
int
| None
The number of jobs to run in parallel. If -1
, it is set
to the number of CPU cores. Requires the joblib
package.
None
(default) is a marker for ‘unset’ that will be interpreted
as n_jobs=1
(sequential execution) unless the call is performed under
a joblib.parallel_backend()
context manager that sets another
value for n_jobs
.
Likely only useful if tens or hundreds of labels are being expanded
simultaneously. Does not apply with overlap=False
.
Produce overlapping labels. If True (default), the resulting labels can be overlapping. If False, each label will be grown one step at a time, and occupied territory will not be invaded.
None
| list
of str
Assign names to the new labels (list needs to have the same length as seeds).
str
The surface along which to do the computations, defaults to 'white'
(the gray-white matter boundary).
array
, shape (n, 4) or (, 4) | None
How to assign colors to each label. If None then unique colors will be chosen automatically (default), otherwise colors will be broadcast from the array. The first three values will be interpreted as RGB colors and the fourth column as the alpha value (commonly 1).
Notes
“extents” and “hemis” can either be arrays with the same length as seeds, which allows using a different extent and hemisphere for label, or integers, in which case the same extent and hemisphere is used for each label.