Skip to content

TomographicImaging/gVXR-SPIE2024

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gVXR logo

X-ray simulations with gVXR as a useful tool for education, data analysis, set-up of CT scans, and scanner development (Invited Paper)

Franck P. Vidala,b,*, Shaghayegh Afsharic, Sharif Ahmedd, Carolyn Atkinse, Éric Béchetf, Alberto Corbí Bellotg, Stefan Bosseh,i, Younes Chahide, Cheng-Ying Chouc, Robert Culverj, Lewis Dixonb, Martí Puig Fantauzzik,l, Johan Friemannm, Amin Garboutl, Clémentine Hattonn, Audrey Henryn, Christophe Leblancf, Alberto Leonardid, Jean Michel Létango, Harry Lipscombl, Tristan Manchesterd, Bas Meerep, Simon Middleburghb, Iwan Mitchellb, Liam Pererad, and Jenna Tugwell-Allsupq

aScientific Computing, Ada Lovelace Centre, Science Technology Facilities Council, UK

bSchool of Computer Science & Engineering, Bangor University, UK

cDepartment of Biomechatronics Engineering, National Taiwan University, Taiwan

dDIAD beamline, Diamond Light Source, UK

eUK Astronomy Technology Centre, Royal Observatory, Edinburgh, UK

fDépartement d'Aérospatiale et Mécanique, Université de Liège, Belgium

gEscuela Superior de Ingeniería y Tecnología - Universidad Internacional de La Rioja, Spain

hDepartment of Computer Science, University of Koblenz, Koblenz, Germany

iDepartment of Mechanical Engineering, University of Siegen, Siegen, Germany

jThe Manufacturing Technology Centre, UK

kDepartment of Engineering Science, University of Oxford, UK

lHenry Royce Institute, Henry Moseley X-ray Imaging Facility, Department of Materials, The University of Manchester, UK

mDepartment of Industrial and Materials Science, Chalmers University of Technology, Sweden

nScalian DS, Rennes, France

oINSA‐Lyon, Université Claude Bernard Lyon 1, CNRS, Inserm, CREATIS UMR 5220, U1294, Lyon, France

pDepartment of Mechanical Engineering, Eindhoven University of Technology, Netherlands

qRadiology Department, Betsi Cadwaladr University Health Board (BCUHB), Ysbyty Gwynedd, UK

* Corresponding author

Accepted for publication in Developments in X-Ray Tomography XV, SPIE Optics + Photonics (19-22 Aug 2024)

Abstract

gVirtualXray (gVXR) is an open-source framework that relies on the Beer-Lambert law to simulate X-ray images in real time on a graphics processor unit (GPU) using triangular meshes. A wide range of programming languages is supported (C/C++, Python, R, Ruby, Tcl, C#, Java, and GNU Octave). Simulations generated with gVXR have been benchmarked with clinically realistic phantoms (i.e. complex structures and materials) using Monte Carlo (MC) simulations, real radiographs and real digitally reconstructed radiographs (DRRs), and X-ray computed tomography (XCT). It has been used in a wide range of applications, including real-time medical simulators, proposing a new densitometric radiographic modality in clinical imaging, studying noise removal techniques in fluoroscopy, teaching particle physics and X-ray imaging to undergraduate students in engineering, and XCT to masters students, predicting image quality and artifacts in material science, etc. gVXR has also been used to produce a high number of realistic simulated images in optimization problems and to train machine learning algorithms.

Keywords

X-ray imaging, computed tomography, simulation, GPU programming

Content

  • environment.yml: Conda environment file.
  • code: In this directory, you' find Jupyter notebooks and Python scripts to simulate CT scan acquisition data with gVXR, reconstruct them using CIL, as well as the Jupyter notebooks used to generate some of the figures of the paper on
    • dragon-without-JSON.ipynb and dragon-without-JSON.py are the Jupyter Notebook and the corresponding Python script that show how to load a STL file and simulate a complete CT scan acquisition, inc. a scintillator, a detector impulse response, tube anode angle, tube voltage, beam filtration, exposure, mono-material sample (mixture). The python API is used for the simulation. We also show how to reconstruct the data using both FDK and SIRT (iterative method).

      Image comparison of the FDK and SIRT reconstructions

    • dragon-with-JSON.ipynb and dragon-with-JSON.py are used to perform the same simulation, but this time the simulation parameters are described in a user-friendly JSON file.

    • step-wedge.ipynb is a Jupyter Notebook that shows how to simulate a CT scan of a step wedge. The user can interactively modify the geometrical property of the step wedge. The phantom is created using a function built in gVXR.

      Step wedge model

    • foam.ipynb is a Jupyter Notebook that shows how to simulate a CT scan of a cuboid made of foam. The user can interactively modify the property of the foam. The phantom is created using a function built in gVXR.

      Foam model

    • find_energy-mock_fuel.ipynb is the Jupyter Notebook that we used to plan our experiment at the I12 beamline of the Diamond Light Source synchrotron.

    • mock_fuel-without-JSON.ipynb shows how to simulate a CT scan of a mock nuclear fuel pellet based on the I12 beamline of the Diamond Light Source synchrotron.

    • mock_fuel-experimental.ipynb is the Jupyter Notebook that we used to reconstruct experimental data of a mock nuclear fuel pellet scanned at the I12 beamline of the Diamond Light Source synchrotron with different energies.

    • create-figures.ipynb is the Jupyter Notebook that we used to create some of the figures.

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

Supported platform

The code has been tested on GNU/Linux x86_64 and Windows x86_64.

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.
  • xpecgen 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.

References

TBA

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published