mne.stc_to_label¶
- mne.stc_to_label(stc, src=None, smooth=True, connected=False, subjects_dir=None, verbose=None)[source]¶
Compute a label from the non-zero sources in an stc object.
- Parameters
- stc
SourceEstimate
The source estimates.
- src
SourceSpaces
|str
|None
The source space over which the source estimates are defined. If it’s a string it should the subject name (e.g. fsaverage). Can be None if stc.subject is not None.
- smoothbool
Fill in vertices on the cortical surface that are not in the source space based on the closest source space vertex (requires src to be a SourceSpace).
- connectedbool
If True a list of connected labels will be returned in each hemisphere. The labels are ordered in decreasing order depending of the maximum value in the stc.
- subjects_dir
str
|None
The path to the FreeSurfer subjects reconstructions. It corresponds to FreeSurfer environment variable
SUBJECTS_DIR
.- verbosebool,
str
,int
, orNone
If not None, override default verbose level (see
mne.verbose()
and Logging documentation for more). If used, it should be passed as a keyword-argument only.
- stc
- Returns
- labels
list
ofLabel
|list
oflist
ofLabel
The generated labels. If connected is False, it returns a list of Labels (one per hemisphere). If no Label is available in a hemisphere, None is returned. If connected is True, it returns for each hemisphere a list of connected labels ordered in decreasing order depending of the maximum value in the stc. If no Label is available in an hemisphere, an empty list is returned.
- labels