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).

Multi-backend

The same code runs on NumPy, CuPy and PyTorch arrays through the Python array API.

GPU-native

Fast C/CUDA projectors — the same code runs on the CPU or a CUDA GPU, chosen by the array backend and device.

Sinogram & listmode

Dedicated sinogram and listmode PET projectors, with optional time-of-flight (TOF) support.

Differentiable / DL-ready

Projectors plug into PyTorch autograd, ready to embed in deep-learning reconstruction pipelines.

Reconstruction examples

Worked examples running OS-MLEM and other algorithms on both sinogram and listmode data.

Open & easy to install

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:

    1. 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

Aims of parallelproj

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.

Compared to STIR and CASToR

STIR and CASToR are mature, full reconstruction frameworks with built-in scanner models, algorithms, data I/O and corrections – for complete, validated end-to-end reconstruction across many scanners and modalities.

Complementary, not competing

parallelproj focuses on algorithm prototyping, not on replacing STIR or CASToR – and can even serve as their GPU projection backend.

Easy to install

Available on conda-forge (one-command install) with many examples – from install to a running prototype reconstruction, quickly.

More frameworks

Also see the Yale Reconstruction Toolbox and PyTomography, built on the libparallelproj projectors.

Out of scope (by design)

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.