/gvxr-CMPB

Simulation of X-ray projections on GPU: benchmarking gVirtualXray with clinically realistic phantoms

Primary LanguageJupyter NotebookOtherNOASSERTION

DOI

gVXR logo

Simulation of X-ray projections on GPU: benchmarking gVirtualXray with clinically realistic phantoms

Jamie Lea Pointona, Tianci Wena, Jenna Tugwell-Allsupb, Aaron Sújarc,a, Jean Michel Létangd, Franck Patrick Vidala,*

a School of Computer Science & Electronic Engineering, Bangor University, UK

b Radiology Department, Betsi Cadwaladr University Health Board (BCUHB), North Wales, Ysbyty Gwynedd, UK

c Department of Computer Science, Universidad Rey Juan Carlos, Mostoles, Spain

d Univ Lyon, INSA-Lyon, Université Claude Bernard Lyon 1, UJM-Saint Étienne, CNRS, Inserm, CREATIS UMR 5220, U1294, F-69373, LYON, France

* Corresponding author

Accepted for publication in Computer Methods and Programs in Biomedicine (20 March 2023)

Abstract

Background and Objectives: This study provides a quantitative comparison of images created using gVirtualXray (gVXR) to both Monte Carlo (MC) and real images of clinically realistic phantoms. gVirtualXray is an open-source framework that relies on the Beer-Lambert law to simulate X-ray images in realtime on a graphics processor unit (GPU) using triangular meshes.

Methods: Images are generated with gVirtualXray and compared with a corresponding ground truth image of an anthropomorphic phantom: (i) an X-ray projection generated using a Monte Carlo simulation code, (ii) real digitally reconstructed radiographs (DRRs), (iii) computed tomography (CT) slices, and (iv) a real radiograph acquired with a clinical X-ray imaging system. When real images are involved, the simulations are used in an image registration framework so that the two images are aligned.

Results: The mean absolute percentage error (MAPE) between the images simulated with gVirtualXray and MC is 3.12%, the zero-mean normalised cross-correlation (ZNCC) is 99.96% and the structural similarity index (SSIM) is 0.99. The run-time is 10 days for MC and 23 msec with gVirtualXray. Images simulated using surface models segmented from a CT scan of the Lungman chest phantom were similar to i) DRRs computed from the CT volume and ii) an actual digital radiograph. CT slices reconstructed from images simulated with gVirtualXray were comparable to the corresponding slices of the original CT volume.

Conclusions: When scattering can be ignored, accurate images that would take days using MC can be generated in milliseconds with gVirtualXray. This speed of execution enables the use of repetitive simulations with varying parameters, e.g. to generate training data for a deep-learning algorithm, and to minimise the objective function of an optimisation problem in image registration. The use of surface models enables the combination of X-ray simulation with real-time soft-tissue deformation and character animation, which can be deployed in virtual reality applications.

Keywords

X-rays; Computed tomography; Simulation; Monte Carlo; GPU programming; Image registration; DRR

Highlights

  • Realistic X-ray simulation from anatomical data
  • Registration of simulated X-ray images on real radiographs
  • Validation and benchmarking using Monte Carlo simulation, real radiographs and DRRs
  • Superior computational performance for VR and high-throughput data applications

Content

In this notebook, we aim to demonstrate that gVirtualXRay is able to generate analytic simulations on GPU comparable to images generated with the state-of-the-art Monte Caro simulation packages. An anthropomorphic phantom is used. It corresponds to a 5-year old boy. We take into account i) a realistic beam spectrum (tube voltage and filtration) and ii) the energy response of the detector.

Corresponding results MAPE: 3.12%, ZNCC: 99.96%, and SSIM: 0.99

In this notebook, we aim to demonstrate that gVirtualXray is able to generate analytic simulations on GPU comparable to digitally reconstructed radiographs (DRRs) of a real CT scan computed with Plastimatch.

Corresponding flowchart

For this experiment, we attempt to recreate a X-ray projections of the Lungman chest phantom with gVirtualXray.

Corresponding results MAPE: 1.76%, ZNCC: 99.66%, SSIM: 0.98

MAPE: 2.43%, ZNCC: 99.31%, SSIM: 0.93.

In this notebook, we demonstrate how to gVirtualXray can be used to generate CT data from polygon meshes. For this experiment, we attempt to recreate a CT volume from X-ray projections of the Lungman chest phantom simulated with gVirtualXray.

Corresponding flowchart

The CT volume is reconstructed with the Core Imaging Library (CIL).

Corresponding results MAPE: 5.50%, ZNCC: 98.96%, SSIM: 0.62

Corresponding results MAPE: 5.01%, ZNCC: 98.44%, SSIM: 0.78

Corresponding results MAPE: 4.46%, ZNCC: 99.05%, SSIM: 0.82

We aim to reproduce a real digital radiograph taken with a clinically utilised X-ray equipment. Image registration is used to make sure the same geometrical set up is used in both the real data acquisition and the virtual one.

Corresponding flowchart

Corresponding results MAPE: 1.56%, ZNCC: 98.91%, and SSIM: 0.94.

Requirements

You must install Conda. See https://conda.io/projects/conda/en/latest/user-guide/install/index.html for more information.

Installation

conda  env create -f environment.yml

Related software projects

  • gVirtualXray (gVXR) provides a programming framework for simulating X-ray images on the graphics processor unit (GPU) using OpenGL. In a nutshell, it computes the polychromatic version of the Beer-Lambert law (the mathematical model that relates the attenuation of X-ray photons to the properties of the material through which the photons are travelling) on the graphics card from polygon meshes.
  • xraylib provides the mass attenuation coefficients used by gVXR.
  • The Core Imaging Library (CIL) is an open-source mainly Python framework for tomographic imaging for cone and parallel beam geometries. It comes with tools for loading, preprocessing, reconstructing and visualising tomographic data.
  • SpekPy is a free software toolkit for calculating and manipulating x-ray tube spectra.
  • Gate is an open-source software dedicated to numerical simulations in medical imaging and radiotherapy based on Geant4, the general-purpose Monte Carlo (MC) code by the European Organization for Nuclear Research (CERN).
  • SimpleITK is an open-source multi-dimensional image analysis in Python, R, Java, C#, Lua, Ruby, TCL and C++. Developed by the Insight Toolkit community for the biomedical sciences and beyond.
  • The Visualization Toolkit (VTK) is open source software for manipulating and displaying scientific data. It comes with state-of-the-art tools for 3D rendering, a suite of widgets for 3D interaction, and extensive 2D plotting capability.

References