Abstract
Background
The accurate Monte Carlo simulation of a linac requires a detailed description of its geometry and the application of elaborate variance-reduction techniques for radiation transport. Both tasks entail a substantial coding effort and demand advanced knowledge of the intricacies of the Monte Carlo system being used.
Methods
PRIMO, a new Monte Carlo system that allows the effortless simulation of most Varian and Elekta linacs, including their multileaf collimators and electron applicators, is introduced. PRIMO combines (1) accurate physics from the PENELOPE code, (2) dedicated variance-reduction techniques that significantly reduce the computation time, and (3) a user-friendly graphical interface with tools for the analysis of the generated data. PRIMO can tally dose distributions in phantoms and computerized tomographies, handle phase-space files in IAEA format, and import structures (planning target volumes, organs at risk) in the DICOM RT-STRUCT standard.
Results
A prostate treatment, conformed with a high definition Millenium multileaf collimator (MLC 120HD) from a Varian Clinac 2100 C/D, is presented as an example. The computation of the dose distribution in 1.86 × 3.00 × 1.86 mm3 voxels with an average 2 % standard statistical uncertainty, performed on an eight-core Intel Xeon at 2.67 GHz, took 1.8 h—excluding the patient-independent part of the linac, which required 3.8 h but it is simulated only once.
Conclusion
PRIMO is a self-contained user-friendly system that facilitates the Monte Carlo simulation of dose distributions produced by most currently available linacs. This opens the door for routine use of Monte Carlo in clinical research and quality assurance purposes. It is free software that can be downloaded from http://www.primoproject.net.
Zusammenfassung
Hintergrund
Eine korrekte Monte-Carlo-Simulation eines Linearbeschleunigers erfordert die detaillierte Beschreibung von dessen Geometrie und die Anwendung optimierter varianzreduzierender Techniken zur Simulation des Strahlungstransports. Beide Aufgaben sind mit erheblichem Programmieraufwand verbunden und setzen genaue Kenntnisse von Kodierungdetails des verwendeten Monte-Carlo-Programms voraus.
Methodik
PRIMO, die hier erstmalig vorgestellte Monte-Carlo-Benutzeroberfläche erlaubt mit wenig Aufwand die Simulation der meisten Linearbeschleuniger der Firmen Varian und Elekta, einschließlich ihrer Lamellenkollimatoren und Elektronentubusse. PRIMO kombiniert (1) die exakte Physik des PENELOPE-Kodes, (2) ausgesuchte und für diese spezielle Anwendung entwickelte varianzreduzierende Techniken, die erheblich die Rechenzeit verkürzen und (3) eine nutzerfreundliche graphische Benutzeroberfläche mit einfach zu bedienenden Werkzeugen zur Analyse der Simulationsergebnisse. PRIMO berechnet Dosisverteilungen in Phantomen ebenso wie in Computertomographien von Patienten, handhabt Phasenraumdateien („phase-space files“) im IAEA-Format und importiert Strukturen (wie Zielvolumina und Risikoorgane) im DICOM-RT-STRUCT-Standard.
Ergebnisse
Die Benutzeroberfläche wird am Beispiel einer Prostatabestrahlung mit dem feinzeichnenden Millenium-Lamellenkollimator (MLC 120HD) an einem Varian Clinac 2100 C/D vorgestellt. Die Berechnung der Dosisverteilung bei einer Voxelgröße von 1,86 × 3,00 × 1,86 mm3 mit einer durchschnittlichen statistischen Unsicherheit von 2 % benötigt mit einem 8-Kern-Intel-Xeon 2,67 GHz Prozessor 1,8 h. Darin ist die Simulation des nichtpatientenspezifischen Teils des Linearbeschleunigers allerdings nicht eingeschlossen, wofür einmalig 3,8 h benötigt werden.
Schlussfolgerung
PRIMO ist eine in sich abgeschlossene, eigenständige, nutzerfreundliche Bedienungsoberfläche, die eine einfache Durchführung exakter Monte-Carlo-Simulationen der Dosisverteilungen der meisten gängigen medizinischen Linearbeschleuniger erlaubt. Damit wird erstmalig die Möglichkeit eröffnet, im klinischen Alltag Monte-Carlo-Simulationen zu Forschungszwecken und zur Qualitätskontrolle einzusetzen. Die Software steht zum gebührenfreien Download auf http://www.primoproject.net.
Avoid common mistakes on your manuscript.
It is widely accepted that the Monte Carlo method applied to the simulation of radiation transport is able to compute accurate results in radiotherapy problems [8, 13]. However, general purpose Monte Carlo codes for radiation transport usually require exceedingly long simulation times to reduce the statistical uncertainty to acceptable levels. For clinical applications, several codes—in which approximations to the physical interaction and transport models were introduced—have been developed to overcome this limitation [6, 10, 12, 19, 21]. These codes lead to a gain in simulation speed at the expense of reducing the accuracy of the results or limiting the range of applicability. A further limitation for the implementation in clinical routine has been the difficulty and effort entailed in preparing, executing, and analyzing a simulation.
In this article we shall focus on the simulation of medical linear accelerators (linacs) and on the computation of the absorbed dose distribution in patients. These tasks require coding the linac geometry, which is a tedious and error-prone task, and the careful selection of certain transport parameters, which demands some knowledge of the physics of the Monte Carlo code employed. To surmount these constraints we have developed the PRIMO system. PRIMO generates the necessary input files for simulating a variety of Varian and Elekta linacs with the Monte Carlo code PENELOPE [1, 15, 16] and computes dose distributions in phantoms and computerized tomographies. It can also produce and import phase-space files in the International Atomic Energy Agency (IAEA) format [7]. In order to increase the simulation speed, we developed a set of dedicated variance-reduction techniques [4, 5, 14, 17]. PRIMO combines all these features and functionalities under a friendly graphical user interface, which includes various tools for analyzing and representing the generated data.
The end result is a program that handles the process of preparing, executing and analyzing the simulation of a linac and the computed dose distribution without requiring any previous knowledge from end users about the Monte Carlo method. Nonetheless, advanced users can have access to the details of the simulation by modifying the configuration files that govern the execution.
Code layers
PRIMO is designed as a layered software structure, which is schematized in Fig. 1. The lowermost layer is PENELOPE, formed by a set of subroutines that model the physics of the electromagnetic shower. PENGEOM, in the next layer, allows the description of material objects limited by quadric surfaces, such as those employed in this work for linac geometry modeling. PENGEOMis included in the PENELOPE distribution.
In PENELOPE, end users are responsible for writing a main program that defines the source of particles, the quantities of interest to be tallied and the variance-reduction techniques to be applied. PRIMO relies on PENEASY [17], a general purpose, modular main program that includes several source models and tallies. PENEASY incorporates PENVOX, a set of routines that handle voxelized geometries, or a combination of voxels and quadrics [2, 3]. Thus, the second layer of our software structure, which is devoted to the geometry, is formed by two parts: PENGEOM and PENVOX. Sitting above it, the PENEASY code provides the steering main program for the Monte Carlo simulation.
The input files required to run the PENELOPE/PENEASY system are created during run time by PENEASYLINAC [17], which forms the fourth layer of the structure. This code accepts as input the linac model and its configuration, which is determined by
-
whether the machine is operated in the electron or photon mode,
-
the nominal beam energy,
-
the position of the jaws, and
-
the configuration of the multileaf collimator (or electron applicator size in electron mode).
Based on these choices, PENEASYLINAC creates a quadric geometry file for PENGEOM and a configuration file for PENEASY. This latter file defines the particle source, the values of PENELOPE’s parameters governing the transport physics, and the values of the parameters for the applied variance-reduction techniques.
The upper code of the scheme is the Graphical Layer for the Automation of the Simulation System, designed for the modeled linacs, which we named Linac-GLASS. This layer is basically an elaborate user interface to operate PENEASYLINAC, to run PENELOPE/PENEASY, and to collect the simulation results and produce graphical plots of the data.
The parts of the system related to Monte Carlo simulation are written in Fortran, while the analysis tools and the graphical user interface are coded in Delphi. Owing to the latter, PRIMO runs only on Windows.
PRIMO work flow
Linac-GLASS is designed to reduce the user’s effort to accomplish the steps of simulation setup, execution, and analysis of the results. Any interface element available in GLASS can be associated to one of these three main categories. A brief description of the scope and functions available is given below.
Simulation setup
Radiation source
Simulation setup windows are used to define the radiation source. To simulate a linac, the accelerator model and the operation mode (photon or electron) must be chosen. The currently available linacs from Varian are Clinacs 600 C, 600 C/D, Unique, the series 18, 21, and 23, and TrueBeam, the latter by means of the phase-space files distributed by Varian in the IAEA format. PRIMO also includes the geometries of the Elekta linacs SL/i and MLCi.
Once the linac model has been chosen, users should specify the nominal energy. For each nominal energy there is a corresponding default set of primary beam simulation parameters. These default values can be modified to adequately reproduce experimental dose profiles. The shape of the radiation field is further defined by positioning the jaws, multileaf collimators, or electron applicators according to the linac model and operation mode chosen.
PRIMO decides the most adequate variance-reduction techniques to be employed and determines the parameters related to them. Notwithstanding, users can modify all parameters that govern the simulation.
The simulation of a linac can be used either to tally a phase-space file in the IAEA format or a dose distribution. Simulations can be started either from the primary electron source of the linac, as it has been already described, or from a previously tallied phase-space file. PRIMO can use imported phase-space files that have been written by other Monte Carlo codes using the IAEA format.
Dose tallying
Dose distributions can be estimated inside a phantom or in a computerized tomography study. For the latter, PRIMO imports DICOM-CT images (Digital Imaging and Communication in Medicine Standard) from which it can construct a voxelized geometry for the estimation of the dose. The importing process requires the conversion of Hounsfield units into mass density values. Additionally, each voxel of the computerized tomography must be associated with a material medium [9]. This is done by using the threshold method [20] interactively aided by the display of a frequency histogram of Hounsfield units and of density maps superimposed to the material maps. There are 40 materials available for the creation of voxelized geometries.
Structures such as planning target volumes or organs at risk can be delineated in the computerized tomography volume and used to calculate dose–volume histograms. Structures can also be imported from an external treatment planning system provided they conform with the DICOM RT-STRUCT standard.
Execution
The simulation can be separated by geometrical segments. Three segments are predefined, namely, the fixed upper components, the movable components of the linac and the dose tallying geometry (binned phantom or voxelized tomography). The current version can distribute a simulation in up to 24 processing cores of a single computer. When all the processes are completed PRIMO combines the corresponding dose distributions into a single dose map. Simulation progress can be tracked in run time.
Analysis
GLASS provides a complete set of tools for analyzing both phase-space files and dose distributions. The analysis of the former includes 2D plots of the spatial distribution of particles and the energy spectrum in the phase-space plane. Phase-space files produced by PRIMO can be filtered by the material medium where the particles were produced. This feature is useful for particle contamination studies or for further optimization of the simulation.
Dose estimation results are presented as 3D dose distributions superimposed to the computerized tomography volume or phantom. Users can navigate these volumes through axial, coronal, and sagittal slices. Lateral dose profiles and the depth curve are shown during navigation. In the case the dose distribution has been estimated in a computerized tomography volume, cumulative and differential dose–volume histograms are plotted for the delineated or imported structures. A useful feature of PRIMO is the possibility of importing experimental data from a dosimetry system. Simulated and experimental data are compared by means of dose profiles, differential plots, and the gamma test [11].
An example: prostate irradiation
In this section we describe the steps involved in creating and simulating a typical radiotherapy treatment plan with PRIMO. In this example a conformal technique is employed to irradiate the prostate with eight radiation fields with equally spaced gantry angles of 45°, starting at 0°. A simulation of the upper part of the linac, a Varian Clinac 2100 C/D, from the primary electron source downstream to a plane located upstream of the jaws was launched. The default set of parameters for the radiation source corresponding to a photon beam with nominal energy of 6 MV was chosen. The default parameters for this beam consist of a primary pencil beam source of 6.26 MeV electrons. A total of 5 × 108 primary electrons were simulated and a phase space was tallied. The splitting-roulette [14] variance-reduction technique was used in this simulation segment. This phase-space file has to be computed only once for all the considered radiation fields and phantoms at a given nominal energy. Therefore, the time devoted to this segment, although reported, is not taken into account to compute the total simulation time.
Prior to field setup, the set of images stored in DICOM-CT format was imported into PRIMO and the corresponding voxelized geometry was generated. The materials selected were air, adipose tissue, soft tissue, and compact bone. The planning target volumes and the organs at risk where delineated with PRIMO, including the prostate gland, and the rectum and bladder, respectively.
A second simulation segment including the jaws and the multileaf collimator was configured and run. Eight fields were defined to irradiate the prostate planning target volume. The field size was of 7.0 cm in the patient long-axis direction and ranged from 6.7–8.1 cm in the orthogonal direction. The shape of the fields were conformed to that of the prostate gland planning target volume by using a high definition Millenium multileaf collimator (MLC 120HD) as shown in Fig. 2. The phase space obtained in the previous simulation segment was used as the source of particles. The movable skins [5] variance-reduction technique applied to the multileaf collimator was used in this simulation segment. This technique consists of considering certain collimating elements of the linac as formed by skin and nonskin zones. Skins are regions where charged particles are likely to emerge and contribute to beam contamination. In the skins the simulation of charged particles is discontinued at relatively low energies so as to ensure that radiation transport is performed to high accuracy. Regions that will absorb nearly all charged particles are defined as nonskins and the absorption energies of these particles are accordingly set higher in order to avoid a waste of computation time. The skin depth depends on the beam energy. PRIMO automatically sets the position of the interfaces dividing both types of regions according to the nominal energy selected by the user. A screenshot of the 3D dose distribution obtained for the simulation of the plan described above is shown in Fig. 3.
Simulation timings
All simulations were run on an eight-core Intel Xeon processor running at 2.67 GHz. The simulations were distributed among the eight cores in all cases. The voxelized geometry had 256 × 100 × 256 voxels of size 1.86 × 3.00 × 1.86 mm3. PRIMO can distribute the simulation of multiple fields among the cores of a computer. The simulation time of segment 1 (from primary electron source down to the upstream face of the jaws) required 3.8 h. The combined simulation time of segments 2 (jaws and multileaf collimator 120HD) and 3 (computerized tomography) was 1.8 h, reaching an overall relative standard uncertainty of 2 %.
In order to put into perspective the simulation time needed for prostate irradiation, we computed the dose distribution in a water phantom for several reference fields. In all cases where the dose was tallied in water, the bin size was set to 2 × 2 × 2 mm3. Also, in all cases, the average standard statistical uncertainty was 2 %.
All simulation times, in hours, are reported in Tab. 1. It is interesting to note that the computation of the dose in the water phantom for the 10 × 10 cm2 reference field with 6 MV photons takes a time (0.9 h) comparable to that (1.8 h) required for the case of the tomographic volume. This fact indicates that the algorithm handling voxelized structures is efficient and that due to usage of movable skins in the multileaf collimator geometry the time employed in the simulation of this complex structure is moderate.
The minimum statistical uncertainty of the absorbed dose that can be reached with a given phase-space file is conditioned by the latent variance [18] associated to this phase-space file. Following Sempau et al. [18], it can be derived that the variance, σ2, of the absorbed dose obtained from a Monte Carlo simulation of a linac can be expressed as
The quantities c 1 and c 2,3 are independent from the simulation time. They are related to the simulation of segment 1 and segments 2 and 3, respectively. The time devoted to simulate segment 1 is denoted by t 1. Equivalently, t 2,3 corresponds to the simulation time of segments 2 and 3. From the previous equation it follows that the variance can be maintained constant while reducing t 2,3, provided t1 is appropriately increased (Tab. 1). Notice that by increasing t 2,3 up to infinity, the latent variance c 1/t 1 of the phase-space file tallied at segment 1 is asymptotically reached.
Conclusion
PRIMO facilitates the Monte Carlo simulation with PENELOPE of most Varian and Elekta linacs and the estimation of the dose distribution in water phantoms and computerized tomographies. Knowledge of the Monte Carlo method, of programming, of the peculiarities of PENELOPE, and of the physics of radiation transport is not necessary in order to set up, run, and analyze the simulation of a linac and the subsequent dose distribution. Users of other Monte Carlo codes can also benefit from PRIMO thanks to the possibility of importing and simulating external phase-space files written in the IAEA format.
Owing to a number of specifically developed variance-reduction techniques, PRIMO efficiently simulates linac geometries. Most cases can be simulated in the timeframe of 1–2 h using a single desktop computer, obtaining a dose distribution within the routine clinical requirements. Also, the code is capable of computing a dose distribution produced by a multiple-field irradiation. Users with a multiple-core computer can reduce simulation time by automatically distributing the simulation among the available computing cores. PRIMO is free software that can be downloaded from http://www.primoproject.net. In a nutshell, PRIMO is an automated, fully Monte Carlo-based, linac simulator and dose calculator, which is both user-friendly and self-contained.
References
Baró J, Sempau J, Fernández-Varea JM, Salvat F (1995) PENELOPE: an algorithm for Monte Carlo simulation of the penetration and energy loss of electrons and positrons in matter. Nucl Instrum Methods B 100:31–46
Brualla L, Palanco-Zamora R, Steuhl KP et al (2011) Monte Carlo simulations applied to conjunctival lymphoma radiotherapy treatment. Strahlenther Onkol 187:492–498
Brualla L, Palanco-Zamora R, Wittig A et al (2009) Comparison between PENELOPE and electron Monte Carlo simulations of electron fields used in the treatment of conjunctival lymphoma. Phys Med Biol 54:5469–5481
Brualla L, Salvat F, Palanco-Zamora R (2009) Efficient Monte Carlo simulation of multileaf collimators using geometry-related variance-reduction techniques. Phys Med Biol 54:4131–4149
Brualla L, Sauerwein W (2010) On the efficiency of azimuthal and rotational splitting for Monte Carlo simulation of clinical linear accelerators. Rad Phys Chem 79:929–932
Bueno G, Déniz O, Carrascosa CB et al (2009) Fast Monte Carlo simulation on a voxelized human phantom deformed to a patient. Med Phys 36:5162–5174
Capote R, Jeraj R, Ma CM et al (2006) Phase-space database for external beam radiotherapy. Report INDC(NDS)-0484. Vienna, Austria: International Atomic Energy Agency, Nuclear Data Section
Chetty I, Curran B, Cygler J, DeMarco J (2007) Report of the AAPM Task Group No. 105: issues associated with clinical implementation of Monte Carlo-based photon and electron external beam treatment planning. Med Phys 34:4818–4853
Fernández-Varea JM, Carrasco P, Panettieri V, Brualla L (2007) Monte Carlo based water/medium stopping power ratios for various ICRP and ICRU tissues. Phys Med Biol 52:6475–6483
Kawrakow I, Fippel M, Friedrich K (1996) 3D electron dose calculation using a Voxel based Monte Carlo algorithm (VMC). Med Phys 23:445–457
Low DA, Harms WB, Mutic S, Purdy JA (1998) A technique for the quantitative evaluation of dose distributions. Med Phys 25:656–661
Neuenschwander H, Mackie T, Reckwerdt P (1995) MMC—a high-performance Monte Carlo code for electron beam treatment planning. Phys Med Biol 40:543–574
Reynaert N, Vandermarck S, Schaart D et al (2007) Monte Carlo treatment planning for photon and electron beams. Rad Phys Chem 76:643–686
Rodriguez M, Sempau J, Brualla L (2012) A combined approach of variance-reduction techniques for the efficient Monte Carlo simulation of linacs. Phys Med Biol 57:3013–3024
Salvat F, Fernández-Varea JM, Sempau J (2011) PENELOPE 2011—a code system for Monte Carlo simulation of electron and photon transport. Issy-les- Moulineaux, France: OECD Nuclear Energy Agency
Sempau J, Acosta E, Baró J et al (1997) An algorithm for Monte Carlo simulation of coupled electron-photon transport. Nucl Instrum Methods B 132:377–390
Sempau J, Badal A, Brualla L (2011) A PENELOPE-based system for the automated Monte Carlo simulation of clinacs and voxelized geometries—application to far-from-axis fields. Med Phys 38:5887–5895
Sempau J, Sánchez-Reyes A, Salvat F et al (2001) Monte Carlo simulation of electron beams from an accelerator head using PENELOPE. Phys Med Biol 46:1163–1186
Sempau J, Wilderman S, Bielajew A (2000) DPM, a fast, accurate Monte Carlo code optimized for photon and electron radiotherapy treatment planning dose calculations. Phys Med Biol 45:2263–2291
Spezi E, Lewis G (2008) An overview of Monte Carlo treatment planning for radiotherapy. Radiat Prot Dosimetry 131:123–129
Zee W van der, Hogenbirk A, Marck S van der (2005) ORANGE: a Monte Carlo dose engine for radiotherapy. Phys Med Biol 50:625–641
Acknowledgments
The authors gratefully acknowledge Varian Medical Systems International AG (Zug, Switzerland) and Elekta Limited (Crawley, United Kingdom) for authorizing the distribution of the encoded geometry files related to their linac models. The authors are grateful to Prof. Dr. med. Wolfgang Sauerwein (Universitätsklinikum Essen) for his continued support and efforts that have helped in making the distribution of PRIMO feasible. JS thanks the Spanish Ministerio de Economía y Competitividad (project no. FIS2012-38480). LB acknowledges financial support from the Deutsche Forschungsgemeinschaft project BR 4043/1-1.
Compliance with ethical guideliines
Conflict of interest. M. Rodriguez, J. Sempau, and L. Brualla state that there is no conflict of interest.
The accompanying manuscript does not include studies on humans or animals.
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Rodriguez, M., Sempau, J. & Brualla, L. PRIMO: A graphical environment for the Monte Carlo simulation of Varian and Elekta linacs. Strahlenther Onkol 189, 881–886 (2013). https://doi.org/10.1007/s00066-013-0415-1
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00066-013-0415-1
Keywords
- Dose distribution
- Phantoms, imaging
- Computerized tomography, x-ray
- Planning target volume
- Organs at risk