cortex.quickflat.composite.add_data

cortex.quickflat.composite.add_data(fig: Figure, braindata: Volume | Vertex | Dataview, height: int = 1024, thick: int = 32, depth: float = 0.5, pixelwise: bool = True, sampler: str = 'nearest', recache: bool = False, nanmean: bool = True) → tuple[AxesImage, NDArray][source]

Add data to quickflat plot

Parameters:
figfigure or ax

Figure into which to plot image of curvature

braindataone of: {cortex.Volume, cortex.Vertex, cortex.Dataview}

Object containing containing data to be plotted, subject (surface identifier), and transform.

heightscalar

Height of image. None defaults to height of images already present in figure.

recacheboolean

Whether or not to recache intermediate files. Takes longer to plot this way, potentially resolves some errors. Useful if you’ve made changes to the alignment

pixelwisebool

Use pixel-wise mapping

thickint

Number of layers through the cortical sheet to sample. Only applies for pixelwise = True

samplerstr

Name of sampling function used to sample underlying volume data. Options include ‘trilinear’,’nearest’,’lanczos’; see functions in cortex.mapper.samplers.py for all options

nanmeanbool, optional (default = True)

If True, NaNs in the data will be ignored when averaging across layers.

Returns:
imgmatplotlib.image.AxesImage

matplotlib axes image object for plotted data

extentslist

Extents of image [left, right, top, bottom] in figure coordinates