.. 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_02_plot_phantom.py: Example 02: Plot a phantom ========================== .. code-block:: default import foam_ct_phantom import h5py import pylab as pl pl.gray() phantom = foam_ct_phantom.FoamPhantom('test_phantom.h5') geom = foam_ct_phantom.VolumeGeometry(256,256,1,3/256) phantom.generate_volume('test_midslice.h5', geom) vol = foam_ct_phantom.load_volume('test_midslice.h5') pl.imshow(vol[0]) pl.show() .. _sphx_glr_download_auto_examples_02_plot_phantom.py: .. only :: html .. container:: sphx-glr-footer :class: sphx-glr-footer-example .. container:: sphx-glr-download :download:`Download Python source code: 02_plot_phantom.py <02_plot_phantom.py>` .. container:: sphx-glr-download :download:`Download Jupyter notebook: 02_plot_phantom.ipynb <02_plot_phantom.ipynb>` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_