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.SurfaceMasker#
- class nilearn.experimental.surface.SurfaceMasker(mask_img=None)#
Extract data from a SurfaceImage.
- __init__(mask_img=None)#
- mask_img_#
- output_dimension_#
- mask_img#
- 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:
- SurfaceMasker 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.SurfaceMasker
#
A short demo of the surface images & maskers