.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/nomenclatureselection.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_nomenclatureselection.py: Selection by nomenclature ------------------------- Selecting graph nodes according a nomenclature .. GENERATED FROM PYTHON SOURCE LINES 39-73 .. image-sg:: /auto_examples/images/sphx_glr_nomenclatureselection_001.png :alt: nomenclatureselection :srcset: /auto_examples/images/sphx_glr_nomenclatureselection_001.png :class: sphx-glr-single-img .. code-block:: default from __future__ import absolute_import import anatomist.direct.api as anatomist from soma import aims from soma.qt_gui.qt_backend import Qt import os import sys runloop = Qt.QApplication.instance() is None a = anatomist.Anatomist() sh = aims.carto.Paths.shfjShared() nom = a.loadObject(os.path.join(sh, 'nomenclature', 'hierarchy', 'sulcal_root_colors.hie')) graph = a.loadObject('Rbase.arg') w = a.createWindow('3D') w.addObjects(graph, add_graph_nodes=True) a.execute('SelectByNomenclature', names='PREFRONTAL_right', nomenclature=nom) # to unselect all # a.execute( 'Select' ) if 'sphinx_gallery' in sys.modules: # display in matplotlib for sphinx_gallery w.camera(view_quaternion=[0.5, -0.5, -0.5, 0.5]) w.windowConfig(view_size=[642, 384]) w.sphinx_gallery_snapshot() runloop = False if runloop: Qt.QApplication.instance().exec_() if runloop or 'sphinx_gallery' in sys.modules: del w, graph, nom .. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 3.618 seconds) .. _sphx_glr_download_auto_examples_nomenclatureselection.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: nomenclatureselection.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: nomenclatureselection.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_