cortex.utils.add_roi

cortex.utils.add_roi(data, name='new_roi', open_inkscape=True, add_path=True, overlay_file=None, **kwargs)[source]

Add new flatmap image to the ROI file for a subject.

(The subject is specified in creation of the data object)

Creates a flatmap image from the data input, and adds that image as a sub-layer to the data layer in the rois.svg file stored for the subject in the pycortex database. Most often, this is data to be used for defining a region (or several regions) of interest, such as a localizer contrast (e.g. a t map of Faces > Houses).

Use the **kwargs inputs to specify

Parameters:
dataDataView

The data used to generate the flatmap image.

namestr, optional
Name that will be assigned to the data sub-layer in the rois.svg file

(e.g. ‘Faces > Houses, t map, p<.005’ or ‘Retinotopy - Rotating Wedge’)

open_inkscapebool, optional

If True, Inkscape will automatically open the ROI file.

add_pathbool, optional

If True, also adds a sub-layer to the rois new SVG layer will automatically be created in the ROI group with the same name as the overlay.

overlay_filestr, optional

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

kwargsdict

Passed to cortex.quickflat.make_png