Note

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.

nilearn.regions.signals_to_img_maps

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

Create image from region signals defined as maps.

region_signals, mask_img must have the same shapes and affines.

Parameters:
region_signalsnumpy.ndarray

signals to process, as a 2D array. A signal is a column. There must be as many signals as maps:

region_signals.shape[1] == maps_img.shape[-1]
maps_imgNiimg-like object

See Input and output: neuroimaging data representation. Region definitions using maps.

mask_imgNiimg-like object, optional

See Input and output: neuroimaging data representation. Boolean array giving voxels to process. Integer arrays also accepted, zero meaning False.

Returns:
imgnibabel.nifti1.Nifti1Image

Reconstructed image. affine and shape are those of maps_img.