A comparison of line integral algorithms

Integrals along lines passing through arrays of integer data are used in many applications. Existing algorithms employ parametric methods and floating point calculations to determine the data values that contribute to the line integrals, along with some form of interpolation to weight these data values. A new, nonparametric integer‐arithmetic noninterpolating algorithm (NI0) and an extension using first‐order interpolation (NI1) are presented here. These algorithms are compared for accuracy and speed with both Siddon’s [Med. Phys. 1 2, 252 (1985)] parametric floating point algorithm using no interpolation (PF0) and our extension using first‐order interpolation (PF1). NI1 gives line integral values significantly closer to those of PF1 than does PF0 and runs nine times faster on a VAXstation 2000. NI0 gives less accurate line integral values than does PF0 but runs 19 times faster.