.. 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 .. image:: /auto_examples/images/sphx_glr_volumetest_001.png :class: sphx-glr-single-img .. 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.859 seconds) .. _sphx_glr_download_auto_examples_volumetest.py: .. only :: html .. container:: sphx-glr-footer :class: sphx-glr-footer-example .. container:: sphx-glr-download :download:`Download Python source code: volumetest.py ` .. container:: sphx-glr-download :download:`Download Jupyter notebook: volumetest.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_