Get Vertices for an ROIΒΆ

In this example we show how to get the vertices that are inside an ROI that was defined in the SVG ROI file (see /rois.rst).

plot get roi vertices
Background RRGGBBAA: ffffff00
Area 0:0:1960.5:1024 exported to 1960 x 1024 pixels (96 dpi)

<Figure size 1960x1024 with 2 Axes>

import cortex

# get vertices for fusiform face area FFA in subject S1
roi_verts = cortex.get_roi_verts('S1', 'FFA')

# roi_verts is a dictionary (in this case with only one entry)
ffa_verts = roi_verts['FFA']

# this includes indices from both hemispheres
# let's create an empty Vertex object and fill FFA

ffa_map = cortex.Vertex.empty('S1', cmap='plasma')
ffa_map.data[ffa_verts] = 1.0

cortex.quickshow(ffa_map)

Total running time of the script: (0 minutes 4.012 seconds)

Gallery generated by Sphinx-Gallery