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

nilearn.region.img_to_signals_maps(imgs, maps_img, mask_img=None)

Extract region signals from image.

This function is applicable to regions defined by maps.

Parameters:

imgs: Niimg-like object :

maps_img: Niimg-like object :

See http://nilearn.github.io/building_blocks/manipulating_mr_images.html#niimg. regions definition as maps (array of weights). shape: imgs.shape + (region number, )

mask_img: Niimg-like object :

See http://nilearn.github.io/building_blocks/manipulating_mr_images.html#niimg. mask to apply to regions before extracting signals. Every point outside the mask is considered as background (i.e. outside of any region).

order: str :

ordering of output array (“C” or “F”). Defaults to “F”.

Returns:

region_signals: numpy.ndarray :

Signals extracted from each region. Shape is: (scans number, number of regions intersecting mask)

labels: list :

maps_img[..., labels[n]] is the region that has been used to extract signal region_signals[:, n].