gVirtualXray

Virtual X-Ray Imaging Library on GPU

Fully functional LabCT device in the Unreal Engine

Radiographer's interactive teaching tool

Tomography acquisition and reconstruction

Anatomical data

Spectral CT

Synchrotron μ-tomography with strong artefacts

Registration: X-ray projections

Registration: X-ray projections

Registration: CT reconstructions

Registration of a generic 3D hand model on a clinical 2D radiograph

Early Graphical User Interface (GUI) integration

What is it?

gVirtualXRay (gVXR) is a C++ library to simulate X-ray imaging. It is based on the Beer-Lambert law to compute the absorption of light (i.e. photons) by 3D objects (here polygon meshes). It is implemented on the graphics processing unit (GPU) using the OpenGL Shading Language (GLSL).

SimpleGVXR is a smaller library build on the top of gVirtualXRay. It provides wrappers to Python, R, Ruby, Tcl, C#, Java, and GNU Octave.

Main features

  • Validation:
    • Against VXI ;
    • Against Geant4 ;
    • Against experimental data .
  • Scanned object topology:
    • Surface meshes (triangles) in most popular file formats (e.g. STL, PLY, 3DS, OBJ, DXF, X3D, DAE);
    • Volume meshes (tetrahedrons) in the INP Abacus format but their support is experimental;
    • Built in phantoms (e.g. cubes, spheres, cylinders, foams, step wedges, Welch dragon, implicit modelling (soft objects and metaballs)).
  • Scanned object composition:
    • Mono-material;
    • Multi-material (note: there must be at least one mesh per material);
    • Chemical elements (e.g. the symbol `W' or the atomic number 74 for tungsten);
    • Compounds, e.g. H2O for water;
    • Mixtures, e.g. Titanium-aluminum-vanadium alloy, Ti90Al6V4;
    • Hounsfield units (for medical applications).
  • X-ray source:
    • Beam geometry:
      • Cone beam (both point sources and focal spots) to mimic X-ray tubes;
      • Parallel beam to mimic synchrotrons.
    • Beam spectrum:
      • Polychromatic to mimic X-ray tubes (note: when using the Python API, you can specify the tube voltage and the filtration);
      • Monochromatic to mimic synchrotrons.
      • Noiseless
      • Poisson noise (note: the photon flux must be specified)
  • X-ray detector:
    • Geometry:
      • Linear detectors;
      • Flat pannels.
    • Models:
      • Ideal detector;
      • Scintillation (note: the user can specify the thickness and material composition of the scintillator);
      • Point spread function (note: the level of blur inherent to the detector).
    • Types:
      • Energy integration;
      • Photon counting.
  • CT scanning geometry:
    • Standard orbital trajectories
    • Arbitrary trajectories
  • Misc:
    • Built in 3D visualisation

Supported platform

  • gVXR is cross-platform: it runs on Windows (Intel architecture only), GNU/Linux (Intel and ARM architectures), and MacOS computers (Intel architecture only).
  • It supports GPUs from any manufacturer. It can even run on platforms without GPUs (in this case, be patient as the CPU will be used).
  • gVXR is scalable: it runs on laptops, desktop PCs, supercomputers, and cloud infrastructures.
  • Containerization using Docker is even possible.

Who is it for?

gVXR is an application programming interface (API). It is for software developers who wish to simulate realistic X-ray images in realtime when photon scattering is negligible. gVXR's features can be used in C++, Python, R, Ruby, Tcl, C#, Java, and GNU Octave. To simplify the setting up of a simulation, a user-friendly JSON file format has been designed (note: for Python only at the moment).

If programming is not your thing, check out WebCT , a feature-rich environment for previewing and simulating X-ray scans on the web browser.

Join the community

gVXR is 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. This paper presents applications of gVXR related to XCT.

Our community paper on "X-ray simulations with gVXR as a useful tool for education, data analysis, set-up of CT scans, and scanner development" was honoured with the Best Paper Award of the SPIE CT Conference 2024 for "tomography outreach tools".

Join the mailing list today

It only takes a minute to sign up. Our support team would be happy to help you.

How to find help

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:

User contributions on our website

We'd like to share user contributions in the a applications section of the website. If you'd like to showcase your work, please contact me by email (Franck P. Vidal, STFC).