Abstract
We propose a new algorithm to compute the X-ray transform of an image represented by unit (pixel/voxel) basis functions. The fundamental issue is equivalently calculating the intersection lengths of the ray with associated units. For any given ray, we first derive the sufficient and necessary condition for non-vanishing intersectability. By this condition, we then distinguish the units that produce valid intersections with the ray. Only for those units rather than all the individuals, we calculate the intersection lengths by the obtained analytic formula. The proposed algorithm is adapted to 2D/3D parallel beam and 2D fan beam. Particularly, we derive the transformation formulas and generalize the algorithm to 3D circular and helical cone beams. Moreover, we discuss the intrinsic ambiguities of the problem itself, and present a solution. The algorithm not only possesses the adaptability with regard to the center position, scale and size of the image, but also is suited to parallelize with optimality. The comparison study demonstrates the proposed algorithm is fast, more complete, and is more flexible with respect to different scanning geometries and different basis functions. Finally, we validate the correctness of the algorithm by the aforementioned scanning geometries.
Introduction
In tomographic reconstruction, the X-ray transform is a critical mathematical operation representing the forward projection—calculating how a ray of energy attenuates as it passes through an object. As medical imaging moves toward low-dose scans and deep-learning-based reconstruction, the computational efficiency of these transforms has become a significant bottleneck. Traditional methods, such as Siddon’s algorithm, rely on finding and sorting intersection points where a ray crosses grid lines. While accurate, these approaches are computationally expensive and challenging to parallelize efficiently.
Methods and Geometric Adaptability
The proposed algorithm shifts from searching for intersections to calculating them through formal logic. The core innovation lies in deriving "non-vanishing intersectability" conditions—mathematical inequalities that precisely identify which pixels or voxels a ray will intersect.
For the identified units, the algorithm uses a direct analytic formula ($l = C_{up} - C_{low}$) to determine intersection lengths. To accommodate complex scanning geometries such as fan beams or helical cone beams, the algorithm employs transformation formulas that map these rays back into a standard parallel-beam framework. This allows a unified core algorithm to handle diverse 2D and 3D setups.
Grid Indexing and Ambiguity Resolution
A key challenge in grid-based transforms is handling "edge cases," such as rays that perfectly overlap grid lines. The authors address these intrinsic ambiguities by implementing a consistent indexing rule to ensure no intersection is double-counted or missed.
By pre-calculating the range of valid indices ($i, j, k$), the algorithm skips the vast majority of voxels that the ray does not touch. This "skip logic" significantly reduces computational overhead and ensures numerical robustness, achieving an optimal $O(N)$ complexity per ray.
Results and Discussion
Validation using synthetic suites across five scanning geometries—2D Parallel, 2D Fan, 3D Parallel, Circular Cone, and Helical Cone—demonstrated that the algorithm's output matches hand-calculated analytic results to machine precision. Because calculations for each ray and voxel are independent and require no global sorting, the method is "embarrassingly parallel" and ideal for GPU acceleration.
While the current work provides the mathematical foundation and validation in C++, future work will focus on full-scale GPU implementation and extending the logic to non-grid-based basis functions. This approach paves the way for more efficient high-performance imaging software in medical and structural biology applications.
Summary updated