{'fraction_non_alphanumeric': 0.020561685055165497, 'fraction_numerical': 0.006018054162487462, 'mean_word_length': 5.519607843137255, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Clinical treatment planning for kilovoltage radiotherapy using EGSnrc and Python.

Kilovoltage radiotherapy dose calculations are generally performed with manual point dose calculations based on water dosimetry. Tissue heterogeneities, irregular surfaces, and introduction of lead cutouts for treatment are either not taken into account or crudely approximated in manual calculations. Full Monte Carlo (MC) simulations can account for these limitations but require a validated treatment unit model, accurately segmented patient tissues and a treatment planning interface (TPI) to facilitate the simulation setup and result analysis. EGSnrc was used in this work to create a model of Xstrahl kilovoltage unit extending the range of energies, applicators, and validation parameters previously published. The novel functionality of the Python-based framework developed in this work allowed beam modification using custom lead cutouts and shields, commonly present in kilovoltage treatments, as well as absolute dose normalization using the output of the unit. 3D user-friendly planning interface of the developed framework facilitated non-co-planar beam setups for CT phantom MC simulations in DOSXYZnrc. The MC models of 49 clinical beams showed good agreement with measured and reference data, to within 2% for percentage depth dose curves, 4% for beam profiles at various depths, 2% for backscatter factors, 0.5 mm of absorber material for half-value layers, and 3% for output factors. End-to-end testing of the framework using custom lead cutouts resulted in good agreement to within 3% of absolute dose distribution between simulations and EBT3 GafChromic film measurements. Gamma analysis demonstrated poor agreement at the field edges which was attributed to the limitations of simulating smooth cutout shapes. Dose simulated in a heterogeneous phantom agreed to within 7% with measured values converted using the ratio of mass energy absorption coefficients of appropriate tissues and air.