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.

6.7.4. nilearn.region.signals_to_img_maps

nilearn.region.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.

Parameters:

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 http://nilearn.github.io/building_blocks/manipulating_mr_images.html#niimg. Boolean array giving voxels to process. integer arrays also accepted, zero meaning False.

Returns:

img: nibabel.Nifti1Image :

Reconstructed image. affine and shape are those of maps_img.