This page is a reference documentation. It only explains the function signature, and not how to use it. Please refer to the user guide for the big picture.

7.8.6. nilearn.regions.signals_to_img_maps

nilearn.regions.signals_to_img_maps(region_signals, maps_img, mask_img=None)

Create image from region signals defined as maps.

region_signals, mask_img must have the same shapes and affines.


region_signals: numpy.ndarray

signals to process, as a 2D array. A signal is a column. There must be as many signals as maps. In pseudo-code: region_signals.shape[1] == maps_img.shape[-1]

maps_img: Niimg-like object

mask_img: Niimg-like object, optional

See Boolean array giving voxels to process. integer arrays also accepted, zero meaning False.


img: nibabel.Nifti1Image

Reconstructed image. affine and shape are those of maps_img.