.. 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_04_generate_projections_cone.py: Example 04: Generate cone-beam projections ========================================== .. code-block:: default import foam_ct_phantom import numpy as np import h5py import pylab as pl pl.gray() phantom = foam_ct_phantom.FoamPhantom('test_phantom.h5') geom = foam_ct_phantom.ConeGeometry(256,256,np.linspace(0,2*np.pi,256),3/256,sod=2,odd=0,usecuda=False) phantom.generate_projections('test_projs_cone.h5',geom) projs = foam_ct_phantom.load_projections('test_projs_cone.h5') pl.imshow(projs[0]) pl.show() .. _sphx_glr_download_auto_examples_04_generate_projections_cone.py: .. only :: html .. container:: sphx-glr-footer :class: sphx-glr-footer-example .. container:: sphx-glr-download :download:`Download Python source code: 04_generate_projections_cone.py <04_generate_projections_cone.py>` .. container:: sphx-glr-download :download:`Download Jupyter notebook: 04_generate_projections_cone.ipynb <04_generate_projections_cone.ipynb>` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_