cortex.quickflat.make_png

cortex.quickflat.make_png(fname, braindata, recache=False, pixelwise=True, sampler='nearest', height=1024, bgcolor=None, dpi=100, **kwargs)[source]

Create a PNG of the VertexData or VolumeData on a flatmap.

Parameters:
fnamestr

Filename for where to save the PNG file

braindataDataview (e.g. instance of cortex.Volume, cortex.Vertex, …)

the data you would like to plot on a flatmap

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

heightint

Height of the image to render. Automatically scales the width for the aspect of the subject’s flatmap

depthfloat

Value between 0 and 1 for how deep to sample the surface for the flatmap (0 = gray/white matter boundary, 1 = pial surface)

with_rois, with_labels, with_colorbar, with_borders, with_dropoutbool, optional

Display the rois, labels, colorbar, annotated flatmap borders, and cross-hatch dropout?

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

Other Parameters:
dpiint

DPI of the generated image. Only applies to the scaling of matplotlib elements, specifically the colormap

bgcolormatplotlib colorspec

Color of background of image. None gives transparent background.

linewidthint, optional

Width of ROI lines. Defaults to roi options in your local options.cfg

linecolortuple of float, optional

(R, G, B, A) specification of line color

roifilltuple of float, optional

(R, G, B, A) specification for the fill of each ROI region

shadowint, optional

Standard deviation of the gaussian shadow. Set to 0 if you want no shadow

labelsizestr, optional

Font size for the label, e.g. “16pt”

labelcolortuple of float, optional

(R, G, B, A) specification for the label color