Note
This page is a reference documentation. It only explains the class signature, and not how to use it. Please refer to the user guide for the big picture.
nilearn.experimental.surface.SurfaceLabelsMasker#
- class nilearn.experimental.surface.SurfaceLabelsMasker(labels_img, label_names=None)#
Extract data from a SurfaceImage, averaging over atlas regions.
- Parameters:
- Attributes:
- labels_data_
numpy.ndarray
- labels_
numpy.ndarray
- label_names_
numpy.ndarray
- labels_data_
- __init__(labels_img, label_names=None)#
- labels_img#
- label_names#
- labels_data_#
- labels_#
- label_names_#
- fit(img=None, y=None)#
Prepare signal extraction from regions.
- Parameters:
- imgSurfaceImage object
Mesh and data for both hemispheres.
- yNone
This parameter is unused. It is solely included for scikit-learn compatibility.
- Returns:
- SurfaceLabelsMasker object
- transform(img)#
Extract signals from fitted surface object.
- Parameters:
- imgSurfaceImage object
Mesh and data for both hemispheres.
- Returns:
- outputnumpy.ndarray
Signal for each element. shape: (img data shape, total number of vertices)
- fit_transform(img, y=None)#
Prepare and perform signal extraction from regions.
- Parameters:
- imgSurfaceImage object
Mesh and data for both hemispheres.
- yNone
This parameter is unused. It is solely included for scikit-learn compatibility.
- Returns:
- numpy.ndarray
Signal for each element. shape: (img data shape, total number of vertices)
- inverse_transform(masked_img)#
Transform extracted signal back to surface object.
- Parameters:
- masked_imgnumpy.ndarray
Extracted signal.
- Returns:
- SurfaceImage object
Mesh and data for both hemispheres.
Examples using nilearn.experimental.surface.SurfaceLabelsMasker
#
A short demo of the surface images & maskers