gclda.utils.plot_brain

gclda.utils.plot_brain(data, underlay, x=0, y=0, z=0)[source]

Create a figure of a brain.

Generates a 2x2 figure of brain slices in the axial, coronal, and sagittal directions (bottom right subplot is left empty). A functional image is overlaid onto the anatomical template from a nibabel image.

Parameters:
data : numpy.ndarray of numpy.float32

3D array of voxel values to plot over structural underlay.

underlay : nibabel.Nifti1Image

Structural scan to use as underlay in figure.

x : int, optional

X-coordinate in stereotactic space to use for sagittal view in figure. Default is 0.

y : int, optional

Y-coordinate in stereotactic space to use for coronal view in figure. Default is 0.

z : int, optional

Z-coordinate in stereotactic space to use for axial view in figure. Default is 0.

Returns:
fig : matplotlib.figure.Figure

A 2x2 figure with three views of the brain (axial, coronal, and sagittal).