Journal of X-Ray Science and Technology 11 (2003) 61 70 61 IOS Press A numerical simulator in VC++ on PC for iterative image reconstruction Xiang Li a,, Ming Jiang c and Ge Wang a,b a Department of Biomedical Engineering, University of Iowa, Iowa City, IA 52242, USA E-mail: xiang-li@uiowa.edu b Department of Radiology, University of Iowa, Iowa City, IA 52242, USA E-mail: ge-wang@uiowa.edu c School of Mathematics, Beiing Universty, 5 Summer Palace Street, Beiing, China 100871 E-mail: iangm@math.pku.edu.cn Abstract. With the development of computing technology, there is an increasing interest in iterative CT image reconstruction. To study iterative reconstruction algorithms, we have developed a software simulator IterCT in VC++ on PC and made it publicly available on the Internet. In the latest version of the simulator, we have implemented four representative iterative image reconstruction algorithms, which are expectation maximization (EM) method and its ordered-subset version (OSEM), the simultaneous algebraic reconstruction technique (SART) and its ordered-subset version (OSSART). The filtered backproection method is included as the benchmark. Keywords: Computed Tomography (CT), image reconstruction, iterative reconstruction, expectation maximization (EM), simultaneous algebraic reconstruction technique (SART), ordered-subset 1. Introduction With the development of computing technology and X-ray tomography algorithms, it is appealing to shift from filtered backproection towards iterative reconstruction [13,14]. The iterative approach is valuable and powerful in the cases of incomplete and/or noisy proection data. The basic idea of iterative reconstruction is to divide a cross- section or a volume into finite elements (pixels and voxels in two and three dimensions, respectively), model the imaging process as a linear system, and then invert this system iteratively [9,10]. The expectation maximization (EM) algorithm has been successful in emission and transmission tomography. The iterative algorithm for positron emission tomography (PET) was proposed by Shepp and Vardi [3]. It determines an optimal estimate of the underlying emitting source distribution in the sense of maximizing the likelihood. Snyder et al. demonstrated that the likelihood function is equivalent to the I- divergence, and gave a deterministic interpretation to this EM formula [11]. Wang et al. applied the EM formula to several transmission CT problems [1]. The simultaneous algebraic reconstruction technique (SART) was proposed by Andersen and Kak as an improvement to the well-known algebraic Corresponding author: Xiang Li and Ge Wang, CT/MicroCT Lab, C721 GH, University of Iowa Hospital and Clinics, Iowa City, IA 52242, USA. Tel.: +1 319 384 5546; E-mail: {Xiang-li, ge-wang}@uiowa.edu. 0895-3996/03/$8.00 2003 IOS Press. All rights reserved
62 X. Li et al. / A numerical simulator in VC++ on PC for iterative image reconstruction R y -R R x -R Fig. 1. Cross section grid overlapped on an image. reconstruction technique (ART) [5]. Recently, Jiang and Wang proved that the image sequence generated by the SART converges to a weighted least-square solution [7]. The traditional EM and SART algorithms utilize all the proection data simultaneously in each iteration. The proection data can also be sub-grouped into pre-defined ordered subsets (OS) then reconstruction algorithms are applied to every subset in sequence. As a result, the EM and SART algorithms become OSEM [4] and OSSART algorithms, respectively. It was reported that OS versions converge much faster than their simultaneous counterparts [15]. We consider that the above four iterative algorithms, EM, OSEM, SART and OSSART, are representative for several important reasons. The obectives of the EM and SART schemes are the I-divergence and the least square measure, which have been axiomatically ustified in the nonnegative and real spaces, respectively [1,11]. These algorithms respectively maximize the Poisson and Gaussian likelihood with appropriate data. Furthermore, their computational structures are similar to the filtered backproection method, and relatively easy to implement. Although both the EM and SART algorithms are slow in terms of convergence, their OS versions may shorten reconstruction time by an order of magnitude. Finally, theoretical understanding has been gained over the past years regarding the convergence of the EM, OSEM, SART, and OSSART. To study those iterative reconstruction algorithms, we have developed a user-friendly simulator IterCT in Visual C++ on PC and made it publicly available on the Internet. (http://ct.radiology.uiowa.edu/ iterct) In the following section, we review the four representative iterative reconstruction algorithms. In the third section, we describe the design and implementation of the software. In the last section, we discuss relevant issues and conclude the paper.
X. Li et al. / A numerical simulator in VC++ on PC for iterative image reconstruction 63 Updated Image Re-proect Data Measurement Subset Compare Measurement Subset Measurement Subset Measurement Subset Error (Weighted) Backproect Correction 2. Iterative reconstruction algorithms Fig. 2. Use of Ordered Subsets for Iterative Reconstruction. Without loss of generality we focus on the 2D case. A cross section can be divided into N square pixels, represented by an N-dimensional column vector x, as shown in Fig. 1. Each pixel has a constant X-ray linear attenuation coefficient x, =1,...,N. Similarly, proection data can be assembled into an M-dimensional column vector b, with the element being b i,i=1,...,m. Let A =(a i ) be the matrix mapping x to b, where a i measures the contribution of x to b i.wehave the following linear system: Ax = b (1) The CT image reconstruction problem is to find x. The EM algorithm is formulated as follows: ( M ) x k+1 = x k i=1 a i(b i /ˆb i ) M i=1 a, =1,...,N. (2) i The SART formula is expressed as: M x (k+1) = x (k) i=1 a i + M i=1 a i (b i ˆb i ) N =1 a i, =1,...,N. (3) The ordered-subset (OS) technique sub-groups proection into several sets of data. S t,t=1, 2,...,L, where L is the total number of subsets, and applies either the EM or SART algorithms to each of the individual subsets. The intermediate reconstructed image is used as the input to the next subset reconstruction. One iteration is defined as a single pass through all the subsets [4]. Specifically, the OSEM formula is: x (k,t+1) = x (k,t) ( l S t a l (b l /ˆb l ) l S t a l ),t =1,...,L; =1,...,N. (4)
64 X. Li et al. / A numerical simulator in VC++ on PC for iterative image reconstruction Fig. 3. Interface. The OSSART formula is: (b x (k,t+1) = x (k,t) l S t a t ˆb l ) l N + =1 a l M l=1 a,t =1,...,L; =1,...,N. (5) l In summary, the generic iterative reconstruction algorithm is described as follows: 0. Initiation: Make a guess on the image to be reconstructed, set the iteration index k =0; 1. Re-proection: Estimate proection data b i based on the current guess x (k). ˆb =< a i,x (k) >, where a i denotes the ith row of A, ˆb i the ith reproection value in Step k, and <, > the inner product; 2. Comparison: Compare real data with re-proected ones. 3. Backproection: Backproect the comparison results over the image space; 4. Modification: Update the current image by incorporating weighted backproection in a pixelspecific fashion; 5. Evaluation: Evaluate the reconstruction error; if the error is not sufficiently small, set k = k+1, and repeat Steps 1 to 4. Figure 2 shows how to apply ordered-subsets for iterative reconstruction.
X. Li et al. / A numerical simulator in VC++ on PC for iterative image reconstruction 65 3. Software implementation 3.1. System architecture and main features Fig. 4. Snap shot of the Help file. The simulator IterCT is developed using Microsoft R Visual C++ 6.0 under Windows R 2000. The current version assumes the parallel-beam geometry. Figure 3 gives the screen shot of its interface. IterCT consists of five modules: Image, Proection, Reconstruction, Analysis and Help. The first four simulate the cross section image, proection process, image reconstruction and reconstruction error analysis, respectively. The Help module provides a user manual for the usage of IterCT and the literature of iterative algorithms. Figure 4 provides a screen shot for the help file. IterCT allows users to either create a cross section on the fly or open a previously created cross section file. A slice is obtained by cutting through the 3D Shepp- Logan phantom, as shown in Fig. 5. The phantom parameters are described in Table 1 [5]. The image size is up to 512 by 512. Users also have the option to either generate the proection data or open a saved proection data file. When a proection data set is ready users can choose among five reconstruction algorithms (four iterative algorithms and one filtered backproection). Then users can select part of the reconstructed image and perform error analysis or compare the original slice with its reconstruction. For demonstration users can also perform a fast simulation by clicking the appropriate buttons on the left tool bar of the main interface. Figure 6 shows the high-level system architecture.
66 X. Li et al. / A numerical simulator in VC++ on PC for iterative image reconstruction (a) (b) (c) (d) Fig. 5. Slicing a 3D Shepp-Logan Phantom. (a): the interface, (b): z = 0.3096, (c): z = 0.25, (d): z = 0.7031. 3.2. Obect-oriented design and data structure Through out the design of IterCT we took an obect-oriented approach to gain the advantages as software reusability and functionality extensibility. Some important classes in IterCT are: Ray, Simulator, Phantom and View. The Ray is defined as a straight line through a field of view. It is evenly divided with the step length equaling to the pixel size. A Ray obect has attributes of ray number and proection number that uniquely define the ray path. Each Ray obect has two operations along the ray path: Re-proect to generate an estimated proection and Backproect to distribute a comparative error to pixels. The Simulator class has four methods simulating four steps of the iterative reconstruction. Inside
X. Li et al. / A numerical simulator in VC++ on PC for iterative image reconstruction 67 Image Module To provide cross section images Slicing through a 3D Shepp&Logan phantom Read an image file Image slice Proection Module To provide proection data Generate proection data by ray-tracing through the slice Read proection data file Image slice Proection data Analysis Module To analyze reconstruction Difference image Error in a region of interest Error between original and reconstructed slice Reconstructed slice Reconstruction Module To showcase reconstruction algorithms Four iterative and one filtered backproection algorithms Fig. 6. System Architecture diagram. MainView original_image original_proection MessageHandlers() PhantomView CreatePhantomSlice() OpenPhantomFile() SavePhantomFile() DrawPhantom() ProectionView CreateProection() OpenProectionFile() SaveProectionFile() DrawProection() ReconstructionView(s) Simulation(simulator) DrawSimulation() ray:cray proection number ray number ForwardProect (image) BackProect (image) Fig. 7. Classes Model diagram. simulator:csimulator ForwardProection(image, ray) GetBackProectData() BackProection(image, ray) UpdateImage() the simulator it initiates Re-proect function calls to obtain the proection data set. After comparing with real data, the simulator calls the Backproect functions and updates an intermediate reconstructed image. In this common structure, the details of comparison and updating are specialized according to the EM, OSEM, SART and OSSART formulae, respectively. The Phantom class wraps the phantom definition and slice attributes such as image dimension, size and type. It has a SetParameters function. According to specified image types a Phantom class gives different slices. The View classes are containers and function call initiators. They utilize other classes like Ray and Simulator to calculate the proection and reconstruction, and draw the results. There are five types of View classes: MainView, PhantomView, ProectionView, ReconstructionView and AnalysisView. Figure 7 illustrates the class models. Figure 8 shows their relationship. 3.3. Reproection and backproection IterCT uses ray-tracing and bilinear interpolation to simulate reproection. The value at each dividing point along the ray path is the bilinear interpolation from values of its four nearest neighbors that are on
68 X. Li et al. / A numerical simulator in VC++ on PC for iterative image reconstruction User input: Messages Analyze reconstruction Create phantom MainView PhantomView Uses Phantom Open phantom Create proection Open proection ProectionView Reconstruction Ray Data AnalysisView ReconstructionView Uses Simulator Fig. 8. Class Collaboration diagram. Table 1 Reconstruction Time Comparison. Initial guess 0.1569. Tested on a desktop PC computer with two 1.2G Hz AMD Athlon CPU, 1 G memory EM OS-EM SART OS-SART Iteration number 16 2 with 8 subsets 16 2 with 8 subsets Reconstruction time 46 s 16 s 46 s 16 s Iteration number 80 10 with 8 subsets 80 10 with 8 subsets Reconstruction time 4 min 52s 1 min 24s 4 min 52s 1 min 24 s the image grid. The ray proection value is the ray integral or the sum of values at all dividing points along the ray path. The data to be backproected is reassigned to each dividing point s four neighbors in the same manner. Sum of all weighting factors along th column ( M i=1 a i) is computed as for backproection while factors along ith row N =1 a i is estimated as for reproection. In both cases we assume a unit image vector for reproection and backproection. 3.4. Size and order of subsets Hudson and Larkin discussed some methods for grouping proection data [4]. In our program, rays are first reshuffled randomly then divided into subsets in sequence. More specifically, after random reshuffling, the ray number and proection number are no longer the original ones associated with ray index. Then we group ray[i], i =1,...,T as the first subset; ray[i], i =(T +1),...,(2T 1) as the second subset; and so on. T is the size of subset which equals to the number of proections divided by number of subsets L. 3.5. Error analysis IterCT enables users to select a certain region in the reconstructed image and calculate the mean square error of reconstruction. Users can compare the reconstruction with the original image by viewing the difference image or the mean square error. Mean square error comparison between the original proection data and the reproected data is also displayed.
X. Li et al. / A numerical simulator in VC++ on PC for iterative image reconstruction 69 (a) (b) (c) (d) (e) (f) (g) (h) (i) () Fig. 9. Simulation results. The Gaussian noise is added such that the mean value is proection measurement E; the standard deviation is E/8. (a): Original Image, (b): Filtered Backproection reconstruction, (c): EM reconstruction, 16 iterations, (d): OS-EM reconstruction, 2 iterations 8 subsets, (e): SART reconstruction, 16 iterations, (f): OS-SART reconstruction, 2 iterations 8 subsets, (g): EM reconstruction, 80 iterations, (h): OS-EM reconstruction, 10 iterations 8 subsets, (i): SART reconstruction, 80 iterations, (): OS-SART reconstruction, 10 iterations 8 subsets. 3.6. Simulation results Figure 9 shows the simulation results when Gaussian noise is added to the proection data. Due to its statistical nature, the iterative algorithm gives better results when the data is noisy. Table 1 documents the speed performance of four iterative algorithms. It shows that the OS methods can greatly improve the reconstruction speed.
70 X. Li et al. / A numerical simulator in VC++ on PC for iterative image reconstruction 4. Discussions and conclusion With a user-friendly graphical interface and online help, IterCT can be used both as a research prototype and a teaching tool. Its obect oriented design enables easy expansion of ray geometry and reconstruction algorithms. For example, the fan beam geometry can be added to the package by adding a rebin function to the ray class. More sophisticated phantom definitions can be introduced without maor change to other parts of the software. The scan mode can be extended to spiral scanning and cone-beam geometry. Subset effects on the improvement of performance is another interesting topic. In conclusion, we have developed an iterative CT reconstruction simulator IterCT for desktop computers running Windows R 2000 operating system. The software can be downloaded from the web site http://ct.radiology.uiowa.edu/ iterct. The EM, OS-EM, SART and OS-SART algorithms have been implemented along with the filtered backproection reconstruction. It can be used as a teaching tool as well as the test-bed for iterative reconstruction experiments. Acknowledgement We thank Chris Piker for technical support. This work is supported in part by an NIH grant (R01 DC03590). References [1] G. Wang, D.L. Snyder, J.A. O Sulivan and M.W. Vannier, Iterative deblurring for CT metal artifact reduction, IEEE Trans. Med. Imag. 15 (1996), 657 664. [2] G. Wang, G. Schweiger and M.W. Vannier, An iterative algorithm for x-ray CT fluoroscopy, IEEE Trans. Med. Imag. 17 (1998), 853 856. [3] L.A. Shepp and Y. Vardi, Maximum Likelihood Reconstruction for Emission Tomography, IEEE Trans. Med. Imag. MI-1 (1982), 113 122. [4] H.M. Hudson and R.S. Larkin, Accelerated image reconstruction using ordere subsets of proection data, IEEE Trans. Med. Imag. 13 (1994), 601 609. [5] A.H. Andersen and A.C. Kak, Simultaneous algebraic reconstruction technique (SART): A superior implementation of the ART algorithm, Ultrasonic Imaging 6 (1984), 81 94. [6] J. Browne and A.R. De Pierro, A row-action alternative to the EM algorithm for maximizing likelihoods in emission tomography, IEEE Trans. Med. Imag. 15 (1996), 687 699. [7] M. Jiang and G. Wang, On the convergence of SART, Revision: 1.8, May 14, 2001. [8] A.H. Andersen, Algebraic reconstruction in CT from limited views, IEEE Trans. Med. Imag. 8 (1989), 50 55. [9] A.C. Kak and M. Slaney, Principles of computerized tomographic imaging, Siam, ISBN 0-89871-494-X, pp. 102 103; Chapter 7, Algebraic Reconstruction Algorithms, 2001. [10] J.D. Enderle, S.M. Blanchard and J.D. Bronzino, Introduction to biomedical engineering, Academic Press, Chapter 14, Radiation Imaging, 2000. [11] D.L. Snyder, T.J. Schulz and J.A. O Sullivan, Deblurring subect to nonnegativity constraints, IEEE Trans. Singal Processing 40 (1992), 1143 1150. [12] I. Csiszar, Why least squares and maximum entropy? An axiomatic approach to inference for linear inverse problems, Ann. Statistics 19 (1991), 2032 2066. [13] M. Jiang and G. Wang, Development of Iterative Algorithms for Image Reconstruction, Submitted to Journal of X-ray S&T: A Special Issue on Clinical Applications of Modern Imaging Technologies. [14] G. Wang et al., Cone-beam reconstruction for Micro-CT, Invited paper at the 1st IEEE International Symposium on Biomedical Engineering, Washington D.C. July, 7 17, 2002. [15] M. Jiang and G. Wang, Parallel Block-Iterative Algorithms for Image Reconstruction, ICMS 2002, International Congress of Mathematical Software.