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.

3.11.1. nistats.reporting.compare_niimgs

nistats.reporting.compare_niimgs(ref_imgs, src_imgs, masker, plot_hist=True, log=True, ref_label='image set 1', src_label='image set 2', output_dir=None, axes=None)

Creates plots to compare two lists of images and measure correlation.

The first plot displays linear correlation between voxel values. The second plot superimposes histograms to compare values distribution.

ref_imgs: nifti_like

Reference images.

src_imgs: nifti_like

Source images.

masker: NiftiMasker object

Mask to be used on data.

plot_hist: Boolean, optional (default True)

If True then histograms of each img in ref_imgs will be plotted along-side the histogram of the corresponding image in src_imgs

log: Boolean, optional (default True)

Passed to plt.hist

ref_label: str

name of reference images

src_label: str

name of source images

output_dir: string, optional (default None)

Directory where plotted figures will be stored.

axes: list of two matplotlib Axes objects, optional (default None)

Can receive a list of the form [ax1, ax2] to render the plots. By default new axes will be created

corrs: numpy.ndarray

Pearson correlation between the images Examples using nistats.reporting.compare_niimgs