This documentation is for development version 0.18.dev0.

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 : string

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 : string

Path to SUBJECTS_DIR if not set in the environment.

surface : string

The surface used to grow the labels, defaults to the white surface.

random_state : None | int | np.random.RandomState

To specify the random generator state.

Returns:
labels : list of Label

Random cortex parcellation