lyman.visualizations.Mosaic

class lyman.visualizations.Mosaic(anat, stat=None, mask=None, n_col=9, step=2, tight=True, show_mask=True, slice_dir='axial', anat_lims=None, title=None)[source]
__init__(self, anat, stat=None, mask=None, n_col=9, step=2, tight=True, show_mask=True, slice_dir='axial', anat_lims=None, title=None)[source]

Plot a mosaic of axial slices through an MRI volume.

Parameters
anatfilename, nibabel image, or array

The anatomical image that will form the background of the mosaic. If only an array is passed, an identity matrix will be used as the affine and orientation could be incorrect.

statfilename, nibabel image, or array

A statistical map to plot as an overlay (which happens by calling one of the methods). If only an array is passed, it is assumed to have the same orientation as the anatomy.

maskfilename, nibabel image, or array

A binary image where voxels included in the statistical analysis are True. This will be used to gray-out voxels in the anatomical image that are outside the field of view. If you want to overlay the mask itself, pass it to stat.

n_colint

Number of columns in the mosaic. This will also determine the size of the figure (1 inch per column).

stepint

Show every step slice along the slice_dir in the mosaic.

tightbool

If True, try to crop panes to focus on the brain volume.

show_maskbool

If True, gray-out voxels in the anat image that are outside of the mask image.

slice_diraxial | coronal | sagital

Direction to slice the mosaic on.

anat_limspair of floats

Limits for the anatomical (background) image colormap