Note
Click here to download the full example code
Example 04: Generate cone-beam projectionsΒΆ
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()