labels_img, 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 :
Region definitions using maps.
mask_img: niimg, optional :
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.