Deprecated ‐ Reconstruction - xcist/documentation GitHub Wiki

Third-generation clinical CT scanners employ a fan-beam or cone-beam geometry with a curved detector (figure 3, left-hand diagram), whereas projection x-ray systems (i.e. for radiography, diagnostic/interventional cardiology and neuroradiology, and mammography including 3D tomographic mammography), preclinical micro-CT and cone-beam CT (CBCT) scanners employ flat-panel detectors (figure 3, right-hand diagram). XCIST supports simulation of systems using either geometry, and reconstruction of projections from CT systems using either geometry. State-of-the-art CT scanners use multi-row detectors; the resulting cone-beam geometry requires 3D reconstruction.

Tang’s 3D weighting algorithm 1(#references) is an improved version of the classical Feldkamp-type cone-beam algorithm 2,3(#references). This approximate yet practical algorithm is well tested on 16- and 64-slice CT scanners, offering a balanced combination of low cone-beam artifacts with good noise and spatial resolution performance. While its general formulation applies to helical cone-beam CT, it extrapolates well to the case of axial cone-beam scanning. Axial FDK-based algorithms are very popular and widely applied in clinical and preclinical applications. We include a few sample reconstruction kernels including ‘soft’, ‘standard’, and ‘bone’, which represent typical clinical reconstruction kernels. The modular design enables users to use custom kernels. Parker weighting 4(#references) is used for short-scan simulations

UML Reconstruction

Prerequisites: Install XCIST using pip install gecatsim.

How the recon code works: The XCIST reconstruction code utilizes the FDK-type algorithm and supports both axial and helical scan modes. Implemented in C/C++ for enhanced performance, it can be accessed via a Python interface. In axial reconstruction, a ramp filter is applied first, followed by back projection. For helical reconstruction, the process involves fan-to-parallel rebinning of the sinogram data, followed by ramp filtering and then back projection. For further details, please refer to references shown below 5,6(#references).

Tunable Parameters: The following parameters can be specified in XCIST to control the reconstruction process:

recon.fov                               # diameter of the reconstruction field-of-view (in mm)
recon.imageSize                         # number of column/row pixels to be reconstructed (currently only square is supported)
recon.sliceCount                        # number of slices to reconstruct
recon.sliceThickness                    # reconstruction slice thickness AND inter-slice interval (in mm)
recon.centerOffset = [0.0, 0.0, 0.0]    # reconstruction offset relative to center of rotation (in mm)
recon.reconType = 'fdk_equiAngle'       # Name of the recon function to call, can be fdk_equiAngle for axial scan or helical_equiAngle for helical scan
recon.kernelType = 'standard'           # reconstruction kernels. 'R-L' for the Ramachandran-Lakshminarayanan (R-L) filter, rectangular window function,'S-L' for the Shepp-Logan (S-L) filter, sinc window function, 'soft', 'standard', 'bone' for kernels similar to those on clinical scanners
recon.startAngle = 0                    # in degrees; 0 is with the X-ray source at the top
recon.unit = 'HU'                       # unit of recon images, can be '/mm', '/cm', or 'HU'
recon.mu                                # mu in /mm to convert recon to HU; typically around 0.02/mm
recon.huOffset                          # unit is HU, -1000 HU by definition but sometimes something else is preferable
recon.printReconParameters = False      # Flag to print the recon parameters
recon.saveImageVolume = True            # Flag to save all recon slices as one big file
recon.saveSingleImages = False          # Flag to save recon results as individual images
recon.printReconParameters = False      # Flag to print the recon parameters
recon.displayImagePictures = False      # Flag to display the recon results as .png images
recon.saveImagePictureFiles = False     # Flag to save the recon results as .png images
recon.displayImagePictureAxes = False   # Flag to display the axes on the .png images
recon.displayImagePictureTitles = False # Flag to display the titles on the .png images

How to run recon in python: Here is an example Python script to run the reconstruction, assuming the desired sinogram file “{ct.resultxName}.prep” is already in the same folder. The “{ct.resultxName}.prep” file should contain binary float32 data in little endian format with dimensions [number of views, number of detector rows, number of detector columns]. Example configuration files can be downloaded from: https://github.com/xcist/example/tree/main/AAPM_datachallenge/simulation_scripts.

import gecatsim as xc
from gecatsim.reconstruction.pyfiles import recon
# import cfg files
ct = xc.CatSim("AAPM_MAR_phantom",
                         "AAPM_MAR_protocol",
                         "AAPM_MAR_physics",
                         "AAPM_MAR_scanner",
                         "AAPM_MAR_recon")
ct.resultsName = "out"

# reconstruction
cfg = ct.get_current_cfg();
# so xcist knows we are doing recon
cfg.do_Recon = 1

# run recon
recon.recon(cfg)

References:

[1] Tang X et al 2006 "A three-dimensional-weighted cone beam filtered backprojection (CB-FBP) algorithm for image reconstruction in volumetric CT-helical scanning." Phys. Med. Biol. 51 855–74 [2] Feldkamp L A, Davis L C and Kress J W 1984 "Practical cone-beam algorithm J. Opt. Soc. Am." A 1 612 [3] Wang G, Ye Y and Yu H 2007 "Approximate and exact cone-beam reconstruction with standard and non-standard spiral scanning." Phys. Med. Biol. 52 R1–13 [4] Parker D 1982 "Optimal short scan convolution reconstruction for fanbeam CT" Med. Phys. 9 254–7 [5] Wu, Mingye, et al. "Xcist—an open access x-ray/ct simulation toolkit." Physics in Medicine & Biology 67.19 (2022): 194002. [6] Tang, Xiangyang, et al. "A three-dimensional-weighted cone beam filtered backprojection (CB-FBP) algorithm for image reconstruction in volumetric CT—helical scanning." Physics in Medicine & Biology 51.4 (2006): 855.