Skip to main content

Cone Beam Projector in Python

Project description

PyPI version


This is the CONRAD cone beam projector ported to pycuda.


pip install conebeam-projector

Or from this repo:

pip install -e .


import pyconrad.autoinit
import pyconrad.config
import pycuda.gpuarray as gpuarray

import conebeam_projector
from edu.stanford.rsl.conrad.phantom import NumericalSheppLogan3D

phantom = np.array(NumericalSheppLogan3D(
    *pyconrad.config.get_reco_size()).getNumericalSheppLoganPhantom(), np.float32)
pyconrad.imshow(phantom, "phantom")
projector = conebeam_projector.CudaProjector()

sino = gpuarray.zeros(pyconrad.config.get_sino_shape(), np.float32)

projector.forward_project_cuda_raybased(phantom, sino, use_maximum_intensity_projection=False)
pyconrad.imshow(sino, "Sinogram")
backprojection = projector.backProjectPixelDrivenCuda(sino)
pyconrad.imshow(backprojection, "backprojection")


Configuration of the projector geometry is done by (py)CONRAD. The first time you use it CONRAD will suggest you to create a global Conrad.xml in your home directory which stores all configuration options. You can launch conrad from bash command line to get a GUI loaded. You can set the configuration programmatically via

import pyconrad.autoinit  # launches JVM
import pyconrad.config
this_is_the_configuration_obj = pyconrad.config.get_conf()

This will give you a instance of CONRAD’s edu.stanford.rsl.conrad.utils.Configuration class.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for conebeam-projector, version 0.1.2
Filename, size File type Python version Upload date Hashes
Filename, size conebeam_projector-0.1.2.tar.gz (21.7 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page