NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

An efficient algorithm to compute the X-ray transform

Chong Chen, Runqian Wang, Chandrajit Bajaj, Ozan Öktem · DOI

Abstract

Tomographic reconstruction is a cornerstone of modern medical imaging and structural biology, yet it remains computationally intensive. This paper presents a novel, mathematically optimized $O(N)$ algorithm for computing X-ray transforms across various 2D and 3D scanning geometries. By deriving a necessary and sufficient condition for ray-voxel intersections and utilizing a closed-form analytic formula for intersection lengths, the proposed method achieves optimal complexity and is highly suitable for massive parallelization on GPUs.

Introduction

The X-ray transform is the fundamental mathematical operation behind technologies like CT scans and Cryo-EM. It involves projecting a 3D object onto a 2D plane. In iterative reconstruction techniques—essential for low-dose or sparse-data scenarios—this forward projection and its adjoint (backprojection) must be calculated repeatedly, often hundreds of times. Traditional methods like Siddon’s algorithm, which rely on tracing and sorting intersection points, are slow and difficult to parallelize efficiently. This work addresses this bottleneck by introducing a direct, non-iterative approach to intersection calculation.

Methodology

The core of the algorithm shifts away from traditional "trace-and-sort" techniques. Instead, it relies on two mathematical pillars:

  1. Intersection Condition: A derived "sufficient and necessary condition" allows the algorithm to immediately identify which pixels or voxels a ray intersects without exhaustive checking.
  2. Analytic Formulas: Rather than measuring distances between discrete points, the algorithm uses a derived analytic formula to calculate intersection lengths directly, ensuring high precision.

Versatility through Transformation

While the algorithm is fundamentally designed for 2D parallel beam geometry, it is made "universal" through a set of transformation formulas. These map complex geometries—such as 2D fan beams, 3D circular cone beams, and 3D helical cone beams—back into the parallel beam framework.

Comparison of (a) 2D parallel beam and (b) 2D fan beam geometries, illustrating the mapping of complex scanning setups to a unified framework.

Implementation and Parallelization

The algorithm achieves a theoretical "speed limit" of $O(N)$ complexity for a single ray, where $N$ is the number of pixels along one axis. Because the calculations for each ray and voxel are independent, the process is "embarrassingly parallel," allowing for $O(1)$ complexity per thread on modern GPU architectures.

To ensure robustness, the authors addressed "intrinsic ambiguities"—cases where a ray perfectly overlaps with a grid line. A consistent indexing solution was developed to maintain stability and accuracy in these edge cases.

Grid indexing schemes: (a) linear indexing and (b) coordinate indexing, used to ensure robust ray-voxel intersection calculations.

Validation and Results

The algorithm was validated using synthetic test suites on 2D and 3D grids. The results demonstrated that numerical errors are negligible, matching hand-calculated geometric "ground truths" to machine precision. By eliminating the need for sorting and endpoint computation for every ray-voxel pair, the method significantly improves efficiency across five distinct scanning modalities.

Conclusion

This research provides a rigorous mathematical foundation for a faster, more flexible X-ray transform engine. Future work will focus on developing a comprehensive software package and a dedicated CUDA/OpenCL implementation to fully realize the algorithm's parallel processing potential. Extension to non-standard basis functions, such as polygonal or polyhedral grids, is also a promising direction.

Summary updated

BibTeX
@article{chen2022efficient,
  author = {Chong Chen and Runqian Wang and Chandrajit Bajaj and Ozan Öktem},
  title = {{An efficient algorithm to compute the X-ray transform}},
  journal = {Int. J. Comput. Math.},
  year = {2022},
  doi = {10.1080/00207160.2021.1969017},
}
Figure