Note
Click here to download the full example code
Volume manipulationΒΆ
Loading and viewing a Volume with anatomist

Out:
object and window are not deletable since there is a reference on it. Execute 'del win' and 'del avol' to delete them.
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
Total running time of the script: ( 0 minutes 1.859 seconds)