.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/utils/plot_get_roi_vertices.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note Click :ref:`here ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_auto_examples_utils_plot_get_roi_vertices.py: ======================= 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 :doc:`/rois.rst`). .. GENERATED FROM PYTHON SOURCE LINES 10-25 .. image-sg:: /auto_examples/utils/images/sphx_glr_plot_get_roi_vertices_001.png :alt: plot get roi vertices :srcset: /auto_examples/utils/images/sphx_glr_plot_get_roi_vertices_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out Out: .. code-block:: none Failed to get connection ** (inkscape:5534): CRITICAL **: 01:33:42.301: dbus_g_proxy_new_for_name: assertion 'connection != NULL' failed ** (inkscape:5534): CRITICAL **: 01:33:42.301: dbus_g_proxy_call: assertion 'DBUS_IS_G_PROXY (proxy)' failed ** (inkscape:5534): CRITICAL **: 01:33:42.301: dbus_g_connection_register_g_object: assertion 'connection != NULL' failed
| .. code-block:: default 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) .. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 2.277 seconds) .. _sphx_glr_download_auto_examples_utils_plot_get_roi_vertices.py: .. only :: html .. container:: sphx-glr-footer :class: sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_get_roi_vertices.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_get_roi_vertices.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_