.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/simple_surface_rendering/plot_volumetric_expanded.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_auto_examples_simple_surface_rendering_plot_volumetric_expanded.py: ================ How to move volumetric structures around ================ Function visualize_cifti_space has optional parameters to (1) expand all structures outwards, (2) separate left and right hemispheres, and (3) add an offset to all volumetric structures relative to cortical surface. Null_color alpha value was set to 1 to make brain surface opaque. .. GENERATED FROM PYTHON SOURCE LINES 8-28 .. image-sg:: /auto_examples/simple_surface_rendering/images/sphx_glr_plot_volumetric_expanded_001.png :alt: plot volumetric expanded :srcset: /auto_examples/simple_surface_rendering/images/sphx_glr_plot_volumetric_expanded_001.png :class: sphx-glr-single-img .. code-block:: default import matplotlib.pyplot as plt from cerebro import cerebro_brain_utils as cbu from cerebro import cerebro_brain_viewer as cbv my_brain_viewer = cbv.Cerebro_brain_viewer(offscreen=True,null_color=(0.7,0.7,0.7,1)) surface_model = my_brain_viewer.load_template_GIFTI_cortical_surface_models('pial') cifti_space = my_brain_viewer.visualize_cifti_space( volumetric_structures="all", cifti_expansion_scale=40, cifti_left_right_seperation=20, volumetric_structure_offset=(0, 10, -80), ) fig, ax = plt.subplots(figsize=(10,10)) ax.axis('off') my_brain_viewer.offscreen_draw_to_matplotlib_axes(ax) # Clear this viewer my_brain_viewer.viewer.window.destroy() plt.show() .. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 5.461 seconds) .. _sphx_glr_download_auto_examples_simple_surface_rendering_plot_volumetric_expanded.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_volumetric_expanded.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_volumetric_expanded.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_