cortex.webgl.show

cortex.webgl.show(data, types=('inflated', ), recache=False, cmap='RdBu_r', layout=None, autoclose=None, open_browser=None, port=None, pickerfun=None, template='mixer.html', overlays_available=None, overlays_visible=('rois', 'sulci'), labels_visible=('rois', ), overlay_file=None, title='Brain', \*\*kwargs)[source]

Creates a webGL MRI viewer that is dynamically served by a tornado server running inside the current python process.

Parameters
dataDataset object or implicit Dataset

Dataset object containing all the data you wish to plot. Can be any type of implicit dataset, such as a single Volume, Vertex, etc. object or a dictionary of Volume, Vertex. etc. objects.

autoclosebool, optional

If True, the tornado server will automatically be destroyed when the last web client has disconnected. If False, the server will stay open, allowing more connections. Default True

open_browserbool, optional

If True, uses the webbrowser library to open the viewer in the default local browser. Default True

portint or None, optional

The port that will be used by the server. If None, a random port will be selected from the range 1024-65536. Default None

pickerfunfuncion or None, optional

Should be a function that takes two arguments, a voxel index and a vertex index. Is called whenever a location on the surface is clicked in the viewer. This can be used to print information about individual voxels or vertices, plot receptive fields, or many other uses. Default None

recachebool, optional

Force recreation of CTM and SVG files for surfaces. Default False

templatestring, optional

Name of template HTML file. Default ‘mixer.html’

overlays_visibletuple, optional

The listed overlay layers will be set visible by default. Layers not listed here will be hidden by default (but can be enabled in the viewer GUI). Default (‘rois’, ‘sulci’)

labels_visibletuple, optional

Labels for the listed layers will be set visible by default. Labels for layers not listed here will be hidden by default (but can be enabled in the viewer GUI). Default (‘rois’, )

**kwargs

All additional keyword arguments are passed to the template renderer.

Other Parameters
typestuple, optional

Types of surfaces to include in addition to the original (fiducial, pial, and white matter) and flat surfaces. Default (‘inflated’, )

cmapstring, optional

Name of default colormap. Default ‘RdBu_r’ TODO: DOES THIS DO ANYTHING ANYMORE?

overlay_filestr or None, optional

Custom overlays.svg file to use instead of the default one for this subject (if not None). Default None.

titlestr, optional

The title that is displayed on the viewer website when it is loaded in a browser.

layout(int, int), optional

The layout of the viewer subwindows for showing multiple subjects. Default None, which selects the layout based on the number of subjects.