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.img_to_signals_labels(imgs, labels_img, mask_img=None, background_label=0, order='F')
Extract region signals from image.
This function is applicable to regions defined by labels.
labels, imgs and mask shapes and affines must fit. This function
performs no resampling.
imgs: 4D Niimg-like object
labels_img: Niimg-like object
mask_img: Niimg-like object
number representing background in labels_img.
ordering of output array (“C” or “F”). Defaults to “F”.
Signals extracted from each region. One output signal is the mean
of all input signals in a given region. If some regions are entirely
outside the mask, the corresponding signal is zero.
Shape is: (scan number, number of regions)
labels: list or tuple
corresponding labels for each signal. signal[:, n] was extracted from
the region with label labels[n].