A simulation‐based method for evaluating geometric tests of a linac c‐arm in quality control in radiotherapy

Abstract Purpose Assessment of the accuracy of geometric tests of a linac used in external beam therapy is crucial for ensuring precise dose delivery. In this paper, a new simulation‐based method for assessing accuracy of such geometric tests is proposed and evaluated on a set of testing procedures. Methods Linac geometry testing methods used in this study are based on an established design of a two‐module phantom. Electronic portal imaging device (EPID) images of fiducial balls contained in these modules can be used to automatically reconstruct linac geometry. The projection of the phantom modules fiducial balls onto the EPID detector plane is simulated for assumed nominal geometry of a linac. Then, random errors are added to the coordinates of the projections of the centers of the fiducial balls and the linac geometry is reconstructed from these data. Results Reconstruction is performed for a set of geometric test designs and it is shown how the dispersion of the reconstructed values of geometric parameters depends on the design of a geometric test. Assuming realistic accuracy of EPID image analysis, it is shown that for selected testing plans the reconstruction accuracy of geometric parameters can be significantly better than commonly used action thresholds for these parameters. Conclusions Proposed solution has the potential to improve geometric testing design and practice. It is an important part of a fully automated geometric testing solution.

linac is periodically conducted as a part of quality assurance programs in radiotherapy departments. 2 Each country has its own legislation or recommendations for the quality tests, for example, in a form of papers prepared by national societies of medical physicists which specify types of tests to perform, their frequency, and proposed tolerance values, based on international guidelines. [2][3][4] The most important geometric tests include estimation of the position of isocenter, jaws offsets, and precision of movements of a gantry, a collimator and a couch.
A generic procedure for a geometric test (e.g., the Winston-Lutz test) consists of positioning of a special phantom containing one or more radiopaque fiducial markers in a radiation beam, acquisition of MeV images of the phantom (most frequently electronic portal imaging device (EPID) images) and then-based on dedicated image analysis methods-determination of the quantities of interest like isocenter position, source to detector distance (SDD) etc. 1,[5][6][7][8][9][10][11][12][13] Finally, the value of the geometric parameter as computed from the test results (e.g., EPID images) is compared against the assumed nominal value. If the difference exceeds an action threshold, the device does not pass the test.
There are at least three weak points in this procedure. This paper is an extension of a previous work 13 where a design of a multimodular phantom is presented and a set of reconstruction procedures for this phantom is briefly analyzed. In this paper, we focus on the problem of how the design of a geometric testing procedure and phantom influences the accuracy of estimation of parameters related to the geometry of linac C-arms. We show in simulations how the distributions of the results of geometric tests depend on testing plans and uncertainties related to EPID imaging. This is, to the best of our knowledge, the first work considering the influence of inaccuracies of imaging on the accuracy of geometric tests. 5,6 Based on simulation results, we postulate a probabilitybased extension to the geometric tests of linear accelerators. In particular, given an actual value of a difference between a nominal and a measured value of a geometric parameter (for example the isocenter position or the size of a radiation field), one may estimate some probability associated with this value for a device with all subsystems correctly set and for uncertainty of the geometric parameter measurement introduced only at the stage of imaging of a phantom used in geometrical testing (as explained above, this uncertainty may arise for example due to noise and finite resolution of EPID used to capture phantom images). From this probability, one may infer if the device operates correctly or if there are other factors besides uncertainties in image acquisition (e.g., a malfunctioning subsystem of a linac) which account for the observed discrepancies between a nominal and an observed value of a geometric parameter under test. In the present paper, we consider geometry testing procedures based on a phantom proposed in an earlier paper, 13 however the proposed approach can be applied to other phantoms described in the literature as well.

2.A | Simulations
In this work, the process of projecting fiducial markers onto the EPID matrix is simulated, taking into account errors caused by finite resolution of the detector and noise inherently associated with imaging process. In the simulations, we assume that all the subsystems of a simulated device are set correctly, that is, there is no difference between nominal and actual device settings like gantry or collimator angle, SDD, jaw positions, and other. Acquisition of images of a multimodule multifiducial phantom 13 by an EPID is simulated using these nominal settings. The phantom 13 consists of two modules, the first one, mounted on a treatment table, contains a set B = {B k : k = 1, 2, …, N B } of N B fiducial balls and the second one, mounted on a gantry head, contains a set C = {C l : l = 1, 2,..., N C } of N C fiducial balls. 13 Let Q denote a parameter which must be estimated during a geometrical testing of a linac (e.g., isocenter position). Q, like any other geometrical parameter, has some preset nominal value Q N , which is used to simulate the process of acquisition of phantom EPID images. We denote by Q M a value of Q estimated based on analysis of EPID images.
Due to inherent noise present in images captured by ionizing radiation detectors, Q M is a random variable sampled from some distribution with probability density function f Q (x|P T , B, C, σ) where P T describes the testing procedure and σ is the standard deviation quantifying the uncertainty of the EPID image analysis. The procedure P T = {(θ i , ψ j ): i = 1, 2,..., N Θ , j = 1, 2,..., Nψ} of geometrical testing of a linac consists of a set of pairs of collimator angles θ i and gantry angles ψ j . The testing procedure depends also on other geometrical settings like table position or rotation. These settings were fixed in the simulations, although both table translation and rotation can be determined from the projection images of the phantom used in the simulation. 13 The nominal coordinates of the projections of the centers of B k and C l onto the EPID imaging plane are determined for each element of P T using nominal settings of a linac. It is assumed that the measured coordinates P(B k ) and P(C l ) of the projections of centers of B k and C l , respectively, onto the EPID imaging plane are random variables with a two-dimensional symmetric Gaussian distribution centered at the nominal projection points of the centers of the ball markers and standard deviation equal to σ.
Given the measured coordinates P(B k ) and P(C l ) of the projections of the centers of fiducial markers B k and C l for each element of P T , Q is recomputed from these data resulting in Q M . Q M differs from Q N to an extent that depends on how big the uncertainty σ is, on the phantom design (i.e., on B and C) and on the testing procedure P T . While P T , B and C are a part of the designed testing procedure, the value of σ can be reduced by for example increasing the irradiation time or by increasing the resolution of the EPID detector matrix. Further details concerning the simulations and reconstruction of the geometry of the linac are described in Data S1.

2.B | Geometrical quantities
Following quantities are computed based on simulation results: 1. Radiation isocenter position. To find the radiation isocenter I, rotation axes of the collimator are determined for a sequence ψ = {ψ 1 , ψ 2 ,..., ψ N } of angular positions of a gantry. Let these axes be denoted by R 1 , R 2 ,..., R N . Then, the position of the isocenter is defined as follows: where d(P, R i ) is the distance from a point P to the axis R i . Nominally, isocenter is located at the origin, that is, the point with coordinates (0, 0, 0). From the simulations, we determine the distribution of the distance from the nominal to the calculated position of the isocenter as well as distributions of the components of the calculated isocenter position. The reconstruction procedure is performed using Algorithm 2 from Data S1 2. Source to detector distance, which is the distance from the source of the MeV radiation to the EPID detector plane. The nominal value of SDD is 180 cm. The value of SDD is calculated based on the isocenter position calculated using Algorithm 2 and equation of the detector plane obtained using Algorithm 4 from Data S1.
3. Source to axis distance (SAD), which is the distance from the source to the projection of the source onto the plane normal to the rotation axis of the collimator and containing the isocenter.
The nominal value of SAD is 100 cm. It is calculated using isocenter position, reconstructed collimator axis and reconstructed radiation source position (see Algorithms 2 and 4).

4.
Gantry rotation axis. Nominally, gantry rotation axis is equal to a vector (0, 1, 0), that is a vector parallel to the Y axis of the coordinate frame of the isocenter. First, positions of fiducial ball markers and radiation sources are collected for a set of gantry angles and collimator angles. Gantry rotation axis is estimated by calculating the extrinsic mean of directions of optimal rotations of collected points for different gantry angles (see Algorithm 2 in Data S1).

Gantry rotation angle, which is the angle between the local verti-
cal direction and the axis of rotation of the collimator for the actual gantry angular position (see Algorithms 1 and 4 in Data S1).
6. The radiation field size. To find the radiation field size for some   The values of differences L between estimated and nominal lengths of the edges of a radiation field in an isocentric plane depend on the same components of the testing procedure as ω.
With the bigger phantom design, the error of a measurement L can be reduced to 0.5 mm which is slightly larger than an EPID pixel.      provide guidelines for selection of a testing plan to achieve the submillimeter and subdegree accuracy of geometric testing procedures used in quality control in radiotherapy.

4.A | Future work
The simulation tools developed in the present study and the results presented can be used in a future study to design a probabilistic framework for testing the geometry of a linac in a following way. Then, to apply a geometry testing procedure, one may select a probability threshold Pr TH and if Pr(Δ ≥ Δ M ) is less than Pr TH , then one concludes that the geometrical test has failed because for the used testing plan P T the probability of observing an actual difference Δ M in a correctly tuned device is lower than an accepted threshold Pr TH . Equivalently, one may define a tolerated difference Δ TH by: and conclude that the test has failed if Δ M is larger than Δ TH . The distribution functions and probabilities can be derived directly from the simulation results, as demonstrated in the previous section.
Within the probabilistic framework described above questions about a testing plan, P T can be stated and answered in a future study. First, assume that the value of a tolerated difference Δ TH must be respected due to some factors of clinical relevance. If a testing plan P T is not properly designed, the measured differences Δ M can be larger than Δ TH in substantial percentage of cases of correctly tuned devices due to purely random factors. Thus one may ask what must be the testing plan P t,T if it is required that the assumed value of Δ TH corresponds to some user-specified probability threshold Pr TH . In other words, both Pr TH and Δ TH are given and only procedures P t,T such that QNþΔTH f Q x P t;T B; C; σ À Á dx; (4) are admissible. In practice, a testing procedure will be selected from the set of admissible plans for geometrical testing guided by some requirement, for example minimal number of gantry and collimator angles necessary to achieve the expected goal.
The final problem that may be also addressed in future within a probabilistic testing framework is the independence of measurements of various parameters. In particular, assume that two geometrical parameters, say are correlated. In particular, for measurement discrepancies that are not independent it is possible that observing some specific pair of Q 1,M and Q 2,M is an unlikely event but such conclusion cannot be drawn from the analysis of the distributions of Q 1 and Q 2 separately. In this analysis, the random variable QJ = (Q 1 , Q 2 ) with joint probability density function f QJ ðx; yjP T ; B; C; σÞ must be considered.
In the context of geometrical testing, another important problem can be formulated. Assume that the decision that a device passes or fails some geometrical test involving measurement of some geometrical parameter is made based on a preselected threshold probability Pr TH , the geometrical testing procedure may be complemented by a requirement that if an expected value of the geometric parameter differs from the nominal value by more than some acceptance threshold Δ TH , then such an event must be detected with a probability Pow TH . Now, if the testing procedure must meet constraints about both Pr TH and Pow TH , the problem is how to select an appropriate testing plan P T to address these requirements. While the answer to this question is certainly important, it would require simulation of possible mechanical failures of a linac, for example to estimate the distribution of a geometrical quantity of interest in both correctly tuned and malfunctioning devices (e.g., a device which introduces a random error with an expected value of Δ TH to the measured quantity).
Our simulation does not address such cases because modeling failures of a linac are not possible without detailed knowledge of its mechanical design.
T A B L E 1 0 Standard deviations (in degrees for parameters in rows 1 to 3 and in centimeters for parameters in rows 4 to 7) of the differences between estimated and nominal values of geometrical parameter for a big phantom modules.

| CONCLUSIONS
In this paper, a new simulation-based method for assessing accuracy of geometric tests of a linac is proposed and evaluated on a set of testing procedures. Parameters describing geometry of a linac are reconstructed from the projections of the centers of fiducial balls of a two-module phantom after adding random errors to the coordinates of these projections. Assuming realistic accuracy of EPID image analysis it is shown that for selected testing plans the reconstruction accuracy of geometric parameters can be significantly better than commonly used action thresholds for these parameters.
Proposed solution has the potential to improve geometric testing design.

ACKNOWLEDGMENTS
The study was supported by NCBR grant No. POIR.04.01.04-00-0014/16. The concept of a multimodular multifiducial phantom is a subject of a patent pending.

CONF LICT OF I NTEREST
The authors have no relevant conflicts of interest to disclose.