Skip to content

TomographicImaging/gVXR-Tutorials

Repository files navigation

Hands-on training: Simulating X-ray images on GPU with gVirtualXray (gVXR)

Simulated radiograph of the Lungman phantom

PyPI Downloads Open in Colab Binder

Content of this file

  • Installation
    • Using Conda
    • Using pip
  • Content of this repository
  • How to find help
  • How to report bugs/request a new feature
  • Q&A
  • How to cite
  • Research excellence
  • User contributions

Installation

Using Conda

conda env create -f environment.yml
conda activate gvxr-tutorials

Using pip

pip install gvxr
pip install matplotlib viewscad xpecgen spekpy SimpleITK k3d

Content of this repository

  • Cheat sheet: This document list all gVXR's functions used in the tutorial notebooks. It also includes the help messages to describe the purpose of each function.
  • Test installation: Run the quick test script provided with gVirtualXray's Python package to make sure the installation is working well on your system. Open In Colab
  • First X-ray simulation: Explore the step-by-step notebook to create our first X-ray radiograph. A mono-material object is imaged with a monochromatic source and an ideal detector. We show how to visualise the X-ray radiograph and take a screenshot of the 3D visualisation of the simulation environment. Open In Colab
  • 3D visualisation: Get familiar with the three different 3D visualisation method provided with gVXR, i) K3D to interactively visualise the 3D scene in a Jupyter widget, ii) a customisable static 3D visualisation, and iii) an interactive 3D visualisation window. Open In Colab
  • Multi-material anatomical example: Using the knowledge learnt in First X-ray simulation, initialise your own simulation to create a radiograph of the Lungman phantom. Open In Colab
  • Ideal CT scan: Simulate a CT scan acquisition with gVXR and reconstruct the CT volume with CIL
  • Creating, combining and moving 3D objects: Exploit gVXR built-in functionality to create our own model by combining spheres, cuboids and cylinders.
  • Built-in phantoms: spheres in cylinders, foam, step wedge
  • Multi-material samples using chemical elements, mixtures and compounds
  • Source types and paramaters: Differentiate between source types (parallel beam, e.g. synchrotron, and cone-beam, e.g. X-ray tube). For X-ray tube add extra levels of realism with the focal spot and polychromatic spectrum. Introduce the notion of magnification to compute the pixel size in radiography.
  • Detector paramaters: Revisit the notion of pixel size and add extra levels of realism with the point spread function and scintillator material.
  • Realistic CT scans: Using some of the knowledge learnt in the notebooks above, create realistic CT scan acquisitions for both synchrotron and labCT.
  • Artefacts in CT images: Explore the common source of artefact in CT images.
  • Spectral CT imaging:
  • 2D-3D registration of a clinical digital radiograph:

How to find help

How to report bugs or request a new feature

Q&A

See Q&A.

How to cite

If you use gVXR in your own applications, particularly for research & development, I will be grateful if you could cite the articles as follows:

  • Seminal paper: Vidal, F. P., Garnier, M., Freud, N., Létang, J. M., and John, N. W., “Simulation of x-ray attenuation on the GPU,” in Proceedings of Theory and Practice of Computer Graphics 2009, 25–32, Eurographics Association, Cardiff, UK (June 2009). DOI: 10.2312/LocalChapterEvents/TPCG/TPCG09/025-032
  • First reference to gVXR as an opensource software: Vidal, F. P. and Villard, P.-F., “Development and validation of real-time simulation of x-ray imaging with respiratory motion,” Computerized Medical Imaging and Graphics 49, 1–15 (2016). DOI: 10.1016/j.compmedimag.2015.12.002
  • Clinical validation study: Pointon, J. L., Wen, T., Tugwell-Allsup, J., Sújar, A., Létang, J. M., and Vidal, F. P., “Simulation of x-ray projections on gpu: Benchmarking gvirtualxray with clinically realistic phantoms,” Computer Methods and Programs in Biomedicine 234, 107500 (2023). DOI: 10.1016/j.cmpb.2023.107500
  • Review paper on CT applications: Vidal, F. P., Afshari, S., Ahmed, S., Atkins, C. Béchet, E., Bellot, A., Bosse, S., Chahid, Y., Chou, C.-Y., Culver, R., Dixon, L., Friemann, J., Garbout, A., Hatton, C., Henry, A., Leblanc, C., Leonardi, A., Létang, J. M., Lipscomb, H., Manchester, T., Meere, B., Middleburgh, S., Mitchell, I., Perera, L., Puig, M., and Tugwell-Allsup, J., “X-ray simulations with gVXR as a useful tool for education, data analysis, set-up of CT scans, and scanner development,” in Developments in X-Ray Tomography XV, SPIE Optics & Photonics, Volume 13152, SPIE, San Diego, California, United States (Aug 2024). DOI: 10.1117/12.3025315

User contributions on our website

We'd like to share user contributions in a new section of gVXR's website https://gvirtualxray.sourceforge.io/. If you'd like to showcase your work, please contact me by email (Franck P. Vidal, STFC) or raise an issue on GitHub (https://github.com/TomographicImaging/gVXR-Tutorials/issues).

About

Training material on gVXR

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published