Computational system to create an entry file for replicating I-125 seeds simulating brachytherapy case studies using the MCNPX code

Purpose: A computational system was developed for this paper in the C++ programming language, to create a 125 I radioactive seed entry file, based on the positioning of a virtual grid (template) in voxel geometries, with the purpose of performing prostate cancer treatment simulations using the MCNPX code. Method: The system is fed with information from the planning system with regard to each seed’s location and its depth, and an entry file is automatically created with all the cards (instructions) for each seed regarding their cell blocks and surfaces spread out spatially in the 3D environment. The system provides with precision a reproduction of the clinical scenario for the MCNPX code’s simulation environment, thereby allowing the technique’s in-depth study. Results and Conclusion: The preliminary results from this study showed that the lateral pe-numbra of uniform scanning proton beams was less sensitive In order to validate the computational system, an entry file was created with 88 125 I seeds that were inserted in the phantom’s MAX06 prostate region with initial activity determined for the seeds at the 0.27 mCi value. Iso-dose curves were obtained in all the prostate slices in 5 mm steps in the 7 to 10 cm interval, totaling 7 slices. Variance reduction techniques were applied in order to optimize computational time and the reduction of uncertainties such as photon and electron energy interruptions in 4 keV and forced collisions regarding cells of interest. Through the acquisition of isodose curves, the results obtained show that hot spots have values above 300 Gy, as anticipated in literature, stressing the importance of the sources’ correct positioning, in which the computational system developed provides, in order not to release excessive doses in adjacent risk organs. The 144 Gy prescription curve showed in the validation process that it covers perfectly a large percentage of the volume, at the same time that it demonstrates a large decline for short distances.


Introduction
According to estimates provided by Brazil's National Cancer Institute (INCA/RJ/Brazil) on the incidence of cancer in Brazil for the year 2012, 60,180 new cases of prostate cancer are expected. These values correspond to an estimated risk of 62 new cases per 100,000 men. 1 The latest global estimate iden-tifies prostate cancer as the second most common type of cancer in men, with roughly 915,000 new cases in 2008. Approximately 75% of all diagnosed cases occur in developed countries. The prostate cancer rate worldwide has increased about 25 times, with the highest rates observed in Australia, New Zealand, Western Europe and North America. 1 In Brazil, the increase in life expectancy, the improvement and evolution of diagnostic methods, and the quality of information systems may explain the increase in incidence rates over the years. 1 For this reason, the study and development of computational systems in the area of healthcare has shown considerable growth, vis-à-vis the need to improve the quality of treatments, which are carried out based on information and computational data obtained from 2D and 3D imaging.
Due to the possibility of performing complex computational modeling in realistic virtual environments, computer simulations using the Monte Carlo method 2 have been widely used in the area of medical physics aimed at providing tools that can be used to generate auxiliary data, the purpose of which is to assist the medical staff in seeking the best parameters for radiotherapy treatments. Obtaining reliable results during computational simulations is directly linked to the reproduction of a clinical scenario in a virtual environment, considering the geometry's correct modeling as well as the chemical composition's definition and the density of the materials employed.
A system was developed and assessed during this exercise named IS -Seed Insertion -in the C++ programming language 3 , which reproduces the experimental template ( Figure  1) employed for the 125 I seeds' three-dimensional insertion during the prostate cancer treatment, in order to provide a tool allowing the automation and reproduction of the clinical scenario during low-dosage rate (LDR) brachytherapy procedures in a computational environment employing the Monte Carlo MCNPX code.
The IS program's use (Figure 2) developed in the C++ language jointly with the MCNPX simulation code allows performing more realistic computational simulations bearing in mind the seeds' correct three-dimensional positioning, in the variation of case studies due to a computational environment's freedom, and also allows a drastic reduction of the time spent to replicate a large number of seeds using the MCNPX code.

I Seeds
Brachytherapy consists in a barely invasive procedure, by means of which radioactive seeds are implanted permanently in the patient under treatment. The 125 I source (Figure 3) has been broadly employed in different radiotherapy clinics during permanent implants in order to treat some types of tumors, in particular prostate cancer. 4 Differently from teletherapy, in which a source is located outside the patient, in brachytherapy the source is positioned inside or close to the region under treatment. Owing to the likelihood of obtaining the dose's high decreasing gradient, brachytherapy allows administering a localized high radia-tion dose, thus reducing the dose on adjacent side organs. 4 Brachytherapy is employed to treat cancer in different regions of the body, among which may be mentioned prostate, cervix and eyes, among others. 4 Please note that inserting 125 I seeds is a clinical and randomized process, and it is not possible to predict whether the inserted source will be placed exactly in the position planned or whether a rotation will occur with it. Materials such as Vycril are placed in the source to prevent it from rotating in any of the three directions. The responsibility for the sources' exact positioning is the physician's, and the positioning's reproduction is the doctor's responsibility, who albeit assisted by the ultrasound image, minor uncertainties may occur during surgery.
The Amersham model 6711 125 I source employed as a reference in this paper was modeled as consisting in an internal silver cylinder containing an emitting film m in thickness, with an outer casing in cylindrical form made of titanium 0.81 mm in diameter and a length of 4.5 mm, closed by two ellipsoids. 5

The MAX06 phantom
The MAX (Male Adult Voxels) phantom was develop by Kramer et al. 6 , and is based on segmented images of a male adult provided by Zubal et al. 7 . The MAX06 phantom is an update of the original MAX phantom, where structures such as bronchi, lymphonodes and prostate were included. There was also a modification in the voxel size from 3.6 mm to 1.2 mm. 8 This reduction led to an increase in the number of voxels by a factor of 27, which can preclude computational simulations even for some high performance computers. Therefore, in order to surpass computational limitations and save time, in this work the software Tomo_MC 9 was used to select some phantom slices of interest to the study: 154 along the x-axis (18.48 cm); 163 along the y-axis (19.56 cm) and 131 slices along the z-axis (15.72 cm). This selection resulted in 3.288.362 voxels instead of 150 million, the original number of MAX06 voxels (Figure 4).

Computational process Computational system's development
The construction process for the cells' cards and 125 I seeds' surfaces in an MCNPX code entry file is extremely elaborate when created manually. If for example the purpose was to create 100 seeds in an MCNPX code entry file, innumerous lines of manually digitized instructions would be required with their respective calculations to be handled individually, which could possibly give rise to errors and adversely affect the simulation's final results.
In the doctoral thesis "Assessments of the approximations employed in planning prostate brachytherapy treatment" by Reis 4 , a 7-month period was required to build an entry file of 88 125 I seeds, in addition the likelihood of error in preparing the entry file is large when compared to the program, which shows the complexity of the entry file's building process. In order to create an entry file, with the construction of cells and surfaces and of its data calculated and automatically positioned based on data on the seeds fed into the system, a program was prepared in the C++ programming language employing a free integrated Dev-C++ 10 ( Figure 5) development environment that employs GNU project compilers to compile programs for the Microsoft Windows operating system. The program's code employs multi-dimensional variables that allow storage of a set of data of the same type in different dimensions. Ordering and sequencing the control structures determine the format of actions such as for example: field protection, performance of assembly calculations for MCNPX code instruction cards and saving data in entry files. The fstream (file stream) library present in the program code allows handling data in files and creating objects that will serve as intermediaries between the program and the files handled. The basic flowchart of the algorithm IS system is shown in Figure 6.
When running the file, the data positioned in the reference planning are informed according to the requests submitted by the IS system. The initial question made by the program to the operator is on the amount of seeds to be employed in the treatment and where will be the grid's initial location so that it may be positioned pursuant to the lattice structure's spatial distribution. This position's precise information is obtained through the Moritz Geometry Tool 11 , program, which allows visualizing in 3D the voxel structure's geometry. This process being performed, the system requests the first seed's position, which is informed by the reference planning. Columns in the template are represented by the letters A to M and lines are represented by numerals from 0 to 12. If it is informed to the system that the first seed is located in "F3", it will automatically position the cards (instructions) of the respective seed, and then it will request this seed's depth in the prostate or in the desired organ. The seed's depth in the coordinate Z is informed by the user, and the IS system will automatically determine the instructions (orders) for its translation, and in this same manner the process will proceed in the same manner for the following seeds.
After inserting the seeds in the desired positions and depths, the system will request to be informed of the name of the .TXT format file to be created and the instruction format to be created for the MCNPX entry file. Format options are: I-125 without TR and I-125 with TR. (Figure 7).
Embedded in the IS system, using the transformation card (TR Card) found in the MCNPX code, allows positioning or rotating the 125 I modeled seeds, providing a dynamism in replicating the seeds, the positions and amounts of which are previously defined, using as a reference seeds defined in the source of the coordinates system. Based on the link established between the surfaces of the seeds defined at the source and the transformation card (TR Card) employed, the IS system will position the seeds to the respective previously planned positions.
After all the seeds are inserted, the cell block's initial number is requested, as well as the materials' initial number and the surface block's initial number. Once these latter fields are informed, the entry field is created as shown in Figure 8, and to finalize the program, the user is asked if it wishes to continue creating another entry file or to exit, thus finalizing the computational process.

IS system validation
In order to validate the IS system, the system was fed with literature data 12 through the insertion of 88 125 I seeds (the average number of seeds estimated for a prostate implant), and an entry file is created with all the seeds positioned in the phantom MAX06's prostate region, with initial activity determined for the seeds at the 0.27 mCi value. Isodose curves were obtained in all the prostate slices in 5 mm steps in the 7 to 10 cm interval, totaling 7 slices. The number of histories applied to the simulation was 200,000,000, totaling a 2-day value.
Variance reduction techniques were applied in order to optimize computational time and the reduction of uncertainties such as photon and electron energy interruptions (cut:p and cut:e) in 4 keV and forced collisions regarding prostate cells and adjacent tissues with their respective identifications (IDs) as shown in Figure 9. The deposition of total radiation in permanent prostate implants is proportional to the radionuclide's disintegration, and the total number of transformations is given by the equation (1), with an integer in the time interval (t = 0) the (t = ∞):

Isodose curves for a selected MAX06 slices
From the analysis of the results presented in Figure 8, it was concluded that the configuration that delivers absorbed doses closest to the recommended value is the set of 88 seeds with initial activity of 0.27 mCi. Therefore, for the construction of isodose curves, each voxel was normalized using this configuration as reference. Figure 10 below reflects the isodose curves for each slice of the phantom MAX06's prostate region and the respective values / colors shown in the sub-title. The isodose curves were placed in multiples of 36, as the idea is to show that the 144 Gy curve covers the larger portion of the prostate's volume.