U.S. flag An official website of the United States government

MCGPU: GPU-accelerated Monte Carlo X-ray Imaging Simulator

Catalog of Regulatory Science Tools to Help Assess New Medical Devices


This regulatory science tool presents a computer model designed to generate virtual x-ray projections of computational anatomical models described by voxels. 


Technical Description

MCGPU [1,2] is an open-source x-ray imaging simulation software that can replicate radiographic or computed tomography devices, and it is particularly fitted to replicate mammography systems, as demonstrated in its use in a large virtual imaging trial project7. Other variants of the software intended to simulate other imaging modalities such as Positron Emission Tomography (PET) [3] have also been developed.

The physics-based Monte Carlo algorithm implemented in MCGPU is based on the general-purpose algorithm and atomic interactions models from PENELOPE. A key innovation of MCGPU is the use of Graphics Processing Units (GPU) to maximize the simulation speed, which enabled the simulation of tomographic modalities with hundreds of views, and the simulation of thousands of patient images in virtual trials [7]. The foundation of the implemented Monte Carlo algorithm is the random sampling of billions of independent x-ray tracks from a computational x-ray source model, their transport through the patient anatomy represented by voxels (including modeling of absorption and scattering events), and their detection in a computational model of an x-ray detector.

The latest version of the MCGPU source code, input files for example simulations, and compilation instructions are available at the GitHub repository.

Intended Purpose

The MCGPU simulation software is intended to generate virtual radiographic images of computational anatomical models and estimate the radiation dose received by the patient being imaged. The simulation reproduces closely the physical processes in radiographic image formation and, as a result, the simulated images can be used to study the performance of real imaging devices. The capability to simulate x-ray imaging devices in silico is very valuable for device development and evaluation due to the ethical constraints on testing ionizing radiation emitting devices with real patients. Virtual images can also be directly used in the development and optimization of image processing software (such as computed tomography reconstructions) or for training and testing artificial intelligence software [8,9].

Some of the advantages of using MCGPU simulations compared to acquiring images with a real device are no radiation exposure to any person, accurate estimation of organ dose, known ground truth of anatomy, control over different sources of variability, possibility to model changes in hardware before manufacturing, and substantial savings in cost and time.

In addition to its use in device research and development, ionizing radiation modeling software like MCGPU is used in the regulatory submissions to estimate the radiation dose delivered by imaging devices, and as part of the validation of radiation treatment planning systems.


MCGPU uses the atomic interaction physics library from the open-source software PENELOPE, which has been thoroughly validated in different medical physics applications (see details in the PENELOPE manual).

Verification and validations activities to establish the realism of the MCGPU simulator in breast imaging applications are presented in reference2. In that work, the code performance was verified using quality control phantoms, and the accuracy was validated comparing with experimental measurements of resolution and noise properties following the IEC 62220-1-3 standard (Characteristics of digital X-ray imaging devices – Determination of the detective quantum efficiency), which is used to evaluate x-ray imaging systems in clinical practice.

MCGPU has also been used and validated by external groups such as in references [4,5].


MCGPU includes a model of an x-ray source and detector that can be customized by the user in the input file. However, it does not model all existing source and detector technologies. In some cases, the simulated device might represent an idealized or simplified version of the real device. In addition, the simulator has to be coupled by the user with an appropriate anatomical model of a patient. The realism of the simulated images is limited by the realism of the anatomical model used in the simulation.

MCGPU only simulates x-ray transport: secondary electrons and fluorescence radiations generated in atomic interactions are assumed to be locally absorbed. This limits the accuracy of the code in high energy photon applications, for example.

For a complete list of model assumptions and simplifications in the breast imaging simulator see section 2.5 in [2].

Supporting Documentation

All MCGPU versions are free and open-source software. The source code, auxiliary files, instructions on the operation of the code, and example input files to simulate mammography and digital breast tomosynthesis images can be found at the GitHub repository. The main source of documentation for the MCGPU is provided in our peer-reviewed publications [1,2] and the book chapter [6 ] describing and exemplifying the use of the tool.

A summary of publications describing the MCGPU algorithm, its validation, and relevant applications is provided below:

Algorithm description and validation:

1. Badal A and Badano A, Accelerating Monte Carlo simulations of photon transport in a voxelized geometry using a massively parallel Graphics Processing Unit, Medical Physics 36, pp. 4878-4880 (2009)

2. Badal A, Sharma D, Graff CG, Zeng R, and Badano, A Mammography and breast tomosynthesis simulator for virtual clinical trials. Computer Physics Communications, 261, 107779 (2021)

3. López-Montes A, Cabello J, Conti M, Badal A, Herraiz JL, GPU-accelerated Monte Carlo-Based Scatter and Prompt-Gamma Corrections in PET, IEEE Nuclear Science Symposium and Medical Imaging Conference 2021, M-07-01 (2021)

Independent validation by external groups:

4. Bosman D, García Balcaza V, Delgado C, Principi S, Duch MA, Ginjaume M, Validation of the MC-GPU Monte Carlo code against the PENELOPE/penEasy code system and benchmarking against experimental conditions for typical radiation qualities and setups in interventional radiology and cardiology. Physica Medica 82, pp. 64-71 (2021)

5. Massera, RT, Thomson, RM, Tomal, A. Technical note: MC-GPU breast dosimetry validations with other Monte Carlo codes and phase space file implementation. Medical Physics 49, pp. 244-253 (2022)

Book chapter introducing the code:

6. Badal A and Badano A. Fast Simulation of Radiographic Images Using a Monte Carlo X-Ray Transport Algorithm Implemented in CUDA, Chapter 50 in GPU Computing Gems (Emerald Edition), edited by Wen-Mei W. Hwu, publisher Morgan Kaufmann/Elsevier (2011)

Relevant applications of the software:

7. Badano A, Graff CG, Badal A, Sharma D, Zeng R, Samuelson F, Glick S, Myers K, Evaluation of digital breast tomosynthesis as replacement of full-eld digital mammography using an in silico imaging trial, JAMA Network Open 1, p. e185474-e185474 (2018)

8. Makeev A, Toner B, Qian M, Badal A, Glick S, Using convolutional neural networks to discriminate between cysts and masses in Monte Carlo simulated dual energy mammography, Medical Physics 48, p. 4648-4655 (2021)

9. Cha K, Petrick N, Pezeshk A, Graff CG, Sharma D, Badal A, Sahiner B, Evaluation of data augmentation via synthetic images for improved breast mass detection on mammograms using deep learning, Journal of Medical Imaging 7, p. 012703 (2019) [https://doi.org/10.1117/1.JMI.7.1.012703]


For more information: