parallelproj documentation¶
Source code on GitHub Report an issue
parallelproj provides simple and fast high-level python routines for tomographic reconstruction that are python array API compatible meaning that they can be used with a variety of python array libraries (e.g. numpy, cupy, pytorch) and devices (CPU and CUDA GPUs).
The same code runs on NumPy, CuPy and PyTorch arrays through the Python array API.
Fast C/CUDA projectors — the same code runs on the CPU or a CUDA GPU, chosen by the array backend and device.
Dedicated sinogram and listmode PET projectors, with optional time-of-flight (TOF) support.
Projectors plug into PyTorch autograd, ready to embed in deep-learning reconstruction pipelines.
Worked examples running OS-MLEM and other algorithms on both sinogram and listmode data.
On conda-forge (one-command install) and released under the Apache-2.0 license.
Hint
If you are using parallelproj, we highly recommend to read and cite our publication:
Schramm, K. Thielemans: “PARALLELPROJ - An open-source framework for fast calculation of projections in tomography”, Front. Nucl. Med., Volume 3 - 2023, doi: 10.3389/fnume.2023.1324562, link to paper, link to arxiv version
parallelproj vs other frameworks – which to use when
A fast, GPU-native python array API projection library – a toolbox, not a full pipeline. Use it to prototype reconstruction algorithms or build differentiable, DL-integrated recon (PyTorch autograd) on CPU and GPU.
parallelproj focuses on algorithm prototyping, not on replacing STIR or CASToR – and can even serve as their GPU projection backend.
Available on conda-forge (one-command install) with many examples – from install to a running prototype reconstruction, quickly.
Also see the Yale Reconstruction Toolbox and PyTomography, built on the libparallelproj projectors.
No vendor-specific raw data readers, and no built-in randoms or scatter estimation. Need those? Use a full framework – optionally with parallelproj as the projection backend, or get them from vendor toolboxes.