.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/volumetest.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_volumetest.py: Volume manipulation ------------------- Loading and viewing a Volume with anatomist .. GENERATED FROM PYTHON SOURCE LINES 39-66 .. rst-class:: sphx-glr-script-out Out: .. code-block:: none object and window are not deletable since there is a reference on it. Execute 'del win' and 'del avol' to delete them. | .. code-block:: default from __future__ import print_function from __future__ import absolute_import import anatomist.api as anatomist # works with all implementations # initialize Anatomist a = anatomist.Anatomist() # load a volume in anatomist avol = a.loadObject('irm.ima') win = a.createWindow('Axial') # put volume in window a.addObjects([avol], [win]) # change palette avol.setPalette('Blue-Red-fusion') print("object and window are not deletable since there is a reference on it. Execute 'del win' and 'del avol' to delete them.") # display in matplotlib for sphinx_gallery win.sphinx_gallery_snapshot() import sys if 'sphinx_gallery' in sys.modules: del win, avol .. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 1.887 seconds) .. _sphx_glr_download_auto_examples_volumetest.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: volumetest.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: volumetest.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_