Filip Jacobs, et. al. University of Ghent
Calculating the exact radiological path through a pixel or voxel space is a frequently encountered problem in medical image reconstruction from projections and greatly influences the reconstruction time. Currently, one of the fastest algorithms designed for this purpose was published in 1985 by Robert L. Siddon [1]. In this paper, we propose an improved version of Siddon's algorithm, resulting in a considerable speedup.
Keywords: reconstruction, projection, radiological path
In image reconstruction from projections we calculate an image from a given set of measurements which are related to line-integrals over the image [2,3]. Examples of such images can be found in PET, CT and MRI studies where the images represent the distribution of an administere radio-active tracer, the distribution of the linear attenuation coefficients of tissue and the distribution of protons, respectively, in cross-sections of a patient.
In order to simplify the notations, we will restrict ourselves to a 2D-description of the algorithm. The theory can easily be extended to rays lying in a 3D space. The results presented in the last section of this paper, however, are based on both a 2D- and 3D- implementation of the algorithms.
Prior to the reconstruction, the image is discretized into pixels and the line-integrals into weighted sums. The weighting factor for the value
Because of the huge amount of measurements given by a medical scanner and the large number of pixels, it is impossible to store all weighting factors l(i,j) in a file prior to the reconstruction. Therefore, they have to be calculated on the fly which greatly limits the reconstruction time. A fast algorithm to evaluate equation (1) is a necessity to obtain acceptable reconstruction times.
Currently, one of the fastest algorithms designed for this purpose was published in 1985 by Robert L. Siddon[1]. We improved his algorithm in a way that the time spent in the inner loop is reduced considerably, and the reconstruction time accordingly (also see [4]). In the first section we introduce the used notations. In the following section, we review Siddon's algorithm for rays lying in a 2D plane and give the basic formulas needed to explain the improved algorithm in the subsequent section. In the final section, we compare the two algorithms for rays lying in a 2D plane as well as for rays lying in a 3D space by comparing the obtained reconstruction times for 3D (i.e a stack of several 2D planes) and fully 3D (i.e. oblique raysums are also available) PET images.
The pixel space is determined by the intersection of two sets of equally spaced parallel planes, perpendicular to an x- and an y-axis (see Figure 1). The x- and y-axis are perpendicular to each other. The two sets will be referred to as the x- and y-planes, respectively. The number of x-planes equals
We could evaluate equation (1) by summing over all (i,j). This would be very inefficient, as pointed by Siddon, because most l(i,j) are zero. It is more efficient to follow the ray through the pixel space. Therefore, we use a parametrical representation of the ray,
$$p_{12} = { \begin{matrix} p_x(α)=p_{1x}+α(p_{2x}-p_{1x}) \ p_y(α)=p_{1y}+α(p_{2y}-p_{1y}) \end{matrix}$$(2)
with α ∈ [0, 1] for points between
with
and
Given that the ray does intersect the pixel space, i.e.
Furthur, we calculate two arrays
Subsequently, we sort the elements of (
After implementing and profiling Siddon's algorithms, we found that its speed is greatly limited by the frequent use of equations (22) and (23) where floating point values are converted into integer values. In the following section we present an altered algorithm, based on Siddon's algorithm, which restricts the use of these equations to once for each ray.
As pointed out in the above section, frequent use of equations (22) and (23) limits the speed of Siddon's algorithm. In this section we propose an improved algorithm which restricts the use of these equations to once for each ray. It also obviates the need to allocate memory for the different α-arrays.
We follow Siddon's approach until the values of
We also calculate the values
Note that
Following the ray through the pixel space, we have to update the values of
Finally, after initializing
Besides the calculation of raysums, some algorithms also need the exact intersection lengths l(i,j) to calculate something else, e.g. the backprojection of an image. It is for these algorithms that we formulated (30-39). Algorithms which do not need the explicit calculation of intersection lengths should incorporate (30) and (35) into (31) resp. (36) without the multiplication with
In order to compare the two algorithms in realistic situations, we chose the reconstruction of 3D and fully 3D Positron Emission Tomography (PET) images with the Maximum Likeihood Expectation Maximization (MLEM) algorithm [5].
3D PET data consists of a set of sinograms. Each sinogram corresponds to a spatial plane through the patient. Each element of a sinogram corresponds to a raysum of a ray through the spatial plane and is determined by its angle with respect to the x-axis of a 2D Cartesian xy-coordinate system and its distance to the origin. Because each sinogram corresponds to a 2D image, 3D PET is actually a 2D problem. For the evaluation, we used a data set obtained with an ECAT 951 PET-scanner consisting of 31 sinograms of 256 angles and 192 distances each. The 31 reconstructed images have dimensions 192 by 192.
Fully 3D PET data consists of a set of data planes. Each data plane corresponds to a spatial plane through the origin of a 3D Cartesian xyz-coordinate system and is determind by its tilt with respect to the xy-plane and its angle with respect to the xz-plane. Each element of a data plane correspond to a raysum of a ray perpendicular to the spatial plane and is determined by two Cartesian coordinates. Because raysums are available for rays with different tilts, fully 3D PET is a real 3D problem. For the evaluation we used a data set calculated by the software package eval3dpet[6,7]. The data planes in the data set correspond to 15 tilts and 96 angles and have dimensions of 90 by 128. The reconstructed image has dimensions 64 by 128 by 128.
The MLEM algorithms have been implemented in C on a Sun Ultra 2 Creator with 2 Ultra-SPARC processors. In Table 1 we compare the reconstruction times for 5 iterations for the 3D PET case and 1 iteration for the fully 3D PET case. We observe that speedups between 3 and 5 are obtained. The speedup for fully 3D PET is smaller than the one for 3D PET because only a smaller fraction of the total reconstruction time is used to calculate the radiological paths, i.e. 37% instead of 57%.
We found that the improvement of Siddon's algorithm resulted in a speedup of 7.5 for the calculation of radiological paths and in a speedup 5.0 for the total reconstruction time in the case of 3D. The time used to calculate the raysums was reduced from 89% to 57% which emphasises the importance of reducing the time spent on calculating the raysums and/or the intersection lengths.
Fig. 1 A schematic overview of the used notations. The pixel values are denoted by
Table 1. A comparison of the algorithm of Siddon and the improved algorithm by comparing the reconstruction times (in min.) of a 3D PET image after 5 iterations and a fully 3D PET image after 1 iteration.