mne.random_parcellation¶
-
mne.
random_parcellation
(subject, n_parcel, hemi, subjects_dir=None, surface='white', random_state=None)[source]¶ Generate random cortex parcellation by growing labels.
This function generates a number of labels which don’t intersect and cover the whole surface. Regions are growing around randomly chosen seeds.
- Parameters
- subject
str
Name of the subject as in SUBJECTS_DIR.
- n_parcel
int
Total number of cortical parcels.
- hemi
str
Hemisphere id (ie ‘lh’, ‘rh’, ‘both’). In the case of ‘both’, both hemispheres are processed with (n_parcel // 2) parcels per hemisphere.
- subjects_dir
str
|None
The path to the FreeSurfer subjects reconstructions. It corresponds to FreeSurfer environment variable
SUBJECTS_DIR
.- surface
str
The surface used to grow the labels, defaults to the white surface.
- random_state
None
|int
| instance ofRandomState
If
random_state
is anint
, it will be used as a seed forRandomState
. IfNone
, the seed will be obtained from the operating system (seeRandomState
for details). Default isNone
.
- subject
- Returns