.. 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_03_generate_projections_parallel.py: Example 03: Generate parallel-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.ParallelGeometry(256,256,np.linspace(0,np.pi,128,False),3/256) phantom.generate_projections('test_projs_par.h5',geom) projs = foam_ct_phantom.load_projections('test_projs_par.h5') pl.imshow(projs[0]) pl.show() .. _sphx_glr_download_auto_examples_03_generate_projections_parallel.py: .. only :: html .. container:: sphx-glr-footer :class: sphx-glr-footer-example .. container:: sphx-glr-download :download:`Download Python source code: 03_generate_projections_parallel.py <03_generate_projections_parallel.py>` .. container:: sphx-glr-download :download:`Download Jupyter notebook: 03_generate_projections_parallel.ipynb <03_generate_projections_parallel.ipynb>` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_