cortex.webgl.show¶
- cortex.webgl.show(data, autoclose=None, open_browser=None, port=None, pickerfun=None, recache=False, template='mixer.html', overlays_available=None, overlays_visible=('rois', 'sulci'), labels_visible=('rois',), types=('inflated',), overlay_file=None, curvature_brightness=None, curvature_contrast=None, curvature_smoothness=None, surface_specularity=None, title='Brain', layout=None, **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
- pickerfunfunction 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_availabletuple, optional
Overlays available in the viewer. If None, then all overlay layers of the svg file will be potentially available in the viewer (whether initially visible or not).
- 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’, )
- Other Parameters:
- typestuple, optional
Types of surfaces to include in addition to the original (fiducial, pial, and white matter) and flat surfaces. Default (‘inflated’, )
- overlay_filestr or None, optional
Custom overlays.svg file to use instead of the default one for this subject (if not None). Default None.
- curvature_brightnessfloat or None, optional
Brightness of curvature overlay. Default None, which uses the value specified in the config file.
- curvature_contrastfloat or None, optional
Contrast of curvature overlay. Default None, which uses the value specified in the config file.
- curvature_smoothnessfloat or None, optional
Smoothness of curvature overlay. Default None, which uses the value specified in the config file.
- surface_specularityfloat or None, optional
Specularity of surfaces visualized with the WebGL viewer. Default None, which uses the value specified in the config file under webgl_viewopts.specularity.
- titlestr, optional
The title that is displayed on the viewer website when it is loaded in a browser.
- layoutNone or list of (int, int), optional
The layout of the viewer subwindows for showing multiple subjects, passed to the template generator. Default None, corresponding to no subwindows.
- **kwargs
All additional keyword arguments are passed to the template renderer.