A practical method for predicting patient‐specific collision in radiotherapy

Abstract Purpose To develop a practical method for predicting patient‐specific collision during the treatment planning process. Materials and method Based on geometry information of the accelerator gantry and the location of plan isocenter, the collision‐free space region could be determined. In this study, collision‐free space region was simplified as a cylinder. Radius of cylinder was equal to the distance from isocenter to the collimator cover. The collision‐free space was converted and imported into treatment planning system (TPS) in the form of region of interest (ROI) which was named as ROISS. Collision was viewed and evaluated on the fusion images of patient's CT and ROIs in TPS. If any points of patient's body or couch fell beyond the safety space, collision would occur. This method was implemented in the Pinnacle TPS. The impact of safety margin on accuracy was also discussed. Sixty‐five plans of clinical patients were chosen for the clinical validation. Results When the angle of couch is zero, the ROISS displays as a series of circles on the cross section of the patient's CT. When the couch angle is not zero, ROISS is a series of ellipses in the transverse view of patient's CT. The ROISS can be generated quickly within five seconds after a single mouse click in TPS. Adding safety margin is an effective measure in preventing collisions from being undetected. Safety margin could increase negative predictive value (NPV) of test cases. Accuracy obtained was 96.3% with the 3 cm safety margin with 100% true positive collision detection. Conclusion This study provides a reliable, accurate, and fast collision prediction during the treatment planning process. Potential collisions can be discovered and prevented early before delivering. This method can integrate with the current clinical workflow without any additional required resources, and contribute to improvement in the safety and efficiency of the clinic.


| INTRODUCTION
Collision between the treatment hardware and the patient is a concern in C-arm linear accelerators. Some cases (i.e., treatment isocenter location, position and immobilization devices) tend to increase the risk of collisions. Such collisions can lead to equipment damage and (or) patient injury during the delivery process. In recent years, radiation treatment planning and delivery techniques have been greatly improved. Noncoplanar treatment plans, which utilize nonzero couch angles, are often used to obtain better dose distributions. [1][2][3] However, the added geometric complexity increases the risk of collisions between gantry and patient, or gantry and couch. 4,5 Collision issues are among the most commonly reported incidents for stereotactic body radiation therapy (SBRT) 6 and the lack of reliable collision avoidance is a critical barrier to the delivery of advanced treatments. 7,8 Some researchers proposed methods to avoid collisions using supplemental cameras during the delivery process. 9 And these features of collision avoidance are also available in some linear accelerator devices, such as Varian's LaserGuard collision detection system. Generally, these devices or methods play a very good role in the protection against collisions during the delivery. However those methods do not prevent collision in advance. They can be used as A number of quality-control approaches have been developed to mitigate this risk before the delivery process. The most common are gantry/couch angle charts. [10][11][12] The charts make it efficient for radiation oncology teams to verify whether beam setup will result in collisions between the machine and the patient. But these charts do not take into account of the specific treatment center and additional treatment devices. Some groups have demonstrated collision avoidance using 3D or CAD design systems. In the early days, the location of isocenter was not considered and patient's body was replaced with geometric models. 13,14 These factors have a great impact on the accuracy of the results. More accurate frameworks have been developed in recent years. [15][16][17][18] The relevant geometry was modeled from a polygon mesh, and they focused on visualization and moved to a strictly computational solution. Those solutions significantly improved prediction accuracy and could be used in many complex noncoplanar plans. But those software solutions usually require specialized 3D modeling modules, and the construction is complicated. Since those solutions are usually not plugged in the planning system, the application of them remains to be a time-consuming process.
Although collision detection in radiotherapy has been researched in different forms over the past 10 years, a reliable clinical implementation has not been widely adopted. Our current study aims to provide a simple and accurate patient-specific collision avoidance method during the treatment planning process. The scripts based on this method which is built in the treatment planning system can be called simply and quickly.

2.A | Model
Collision calculations using the methodology presented in this study require information about both the C-arm linear accelerator and the CT images of patient in the treatment position. The collisionfree space inherent to the linear accelerator is defined by the machine geometric parameters. Previous studies 16,17 show that each point on the surface of its components describes a circle when the linear accelerator gantry rotates along the isocenter. As shown in Fig. 1, the collision-free space for the machine is determined by these circles. Although the treatment head has pieces that protrude farther than others, it is simplified here as a flat surface, so the radius of the clearance circle remains unchanged along the longitudinal (superior-inferior) direction. Patient's body and couch beyond these circles are at risk for collision. For collisions are usually determined by the smallest circle, the radius of smallest circle could be chose as the radius of the whole structure for safety and simplicity. In the "rooms-eye view", the collision-free space is a cylinder with radius equal to the distance between the isocenter and front cover of collimator. The height of cylinder is defined by the length of the treatment head in the superior-inferior direction. The radius can serve as a threshold for collision detection, and the height can be used to determine the longitudinal range of the patient.
When isocenter of the patient's treatment plan is selected, the relative position between the collision-free space and the patient's CT is determined. The structure of collision-free space can be fused to the patient's CT images by transformation. In this paper, the structure of collision-free space was imported into the TPS in the form of region of interest (ROI). ROI is used in almost all planning systems and can be visualized in various displays. Thus, this method can be highly integrated with existing commercial TPS. The treatment planner can see clearly the relative position between the patient body (or couch) and the ROI of safe space (ROISS) in the planning system. The shape and position of ROISS on patient's CT images is determined by plan isocenter and machine parameters.
When the couch angle is θ, the shape of ROISS is an oval on patient's cross section. As shown in Fig. 2, the elliptic equation on the cross section of treatment center (z 0 ) is: where a = r/cosθ, b = r, r is the radius of cylindrical structure.
The elliptic equation on the cross section of nontreatment center (z i ) is: where d=|z1-z0|·tan θ. From Eqs. (1) and (2), it is clear that the shape of ROISS will be a series of same circles on CT images when the couch angle is zero (coplanar plan).

2.B | Clinical implementation
The technique presented in this paper was implemented in the Pinnacle 3 9.10 (Philips Radiation Oncology Systems) treatment planning system. Varian Edge accelerator with Qfix couch was used in this study, and the size of couch and gantry have been measured. The patients were scanned with a Phillips Brilliance Big Bore CT using 3 mm slice thickness, and the images were sent to Pinnacle TPS.
ROI of couch structure was generated in place of CT couch which might lack detail and accuracy. ROI of couch was created by Pinnacle Scripts automatically. Contours of patient were contoured automatically using a density threshold of 0.6 g/cm 3 . The isocenter coordinates, ROI contours, couch angle, image coordinates, and beam information were read from the TPS by Pinnacle Scripts. Then this plan information together with treatment head geometry was sent to the program written in python (version 2.7.10).
In the python program, the isocenter coordinates were used as a point of origin. The safe space was generated. Then the space was converted into ROISS. The ROISS structure was written to DICOM file or Pinnacle ROI file. At last, ROISS structure was imported into

2.C | Collision detection
Collision was viewed and evaluated on the fusion images of patient's CT and ROIs in TPS. If any points of body contour or couch fell beyond the ROISS structure, collision would occur. This process could be implemented easily by ROIs subtract function provided by TPS. If the volume of either the couch or the body contour beyond the ROISS was zero, a possible collision would happen.
When a possible collision is detected, the program will further calculate the gantry angle range that would result in collision. Based on the published study, 16 the angle range of a collision is where φ r max is the angle value (polar coordinates) of the patient (or couch) point of maximum collision in a certain region. The variable φ is determined by equation where x rmax and y rmax are the coordinate value (Cartesian coordinates) of the point of maximum collision in a certain region, r is the radius of cylindrical structure as shown in Fig. 1(c). Rotation transformation of coordinates is required when using noncoplanar plan fields. The new coordinates of the ROI points follow where the transformation matrix is θ is the couch angle,

3.A | Clinical implementation
When the couch angle is zero (coplanar plan), ROISS generated in the Pinnacle is shown in Fig. 4. The ROISS is a cylindrical structure which contains a series of identical circles. Four examples based on a full gantry rotation are shown in Fig. 4. Figure 4(a) shows a safe rectal plan in which the patient and couch are within the safe space.
In Fig. 4(b), gantry-couch collision will happen in a rectal plan because the thickness of the prone plate is large and the location of treatment center is too high. Similar collisions can also occur in the

| DISCUSSION
In this study, we have established a new method to implement patient specific collision avoidance during the treatment planning process. ROISS was achieved by converting the collision-free space region into an ROI structure in TPS. Collision could be viewed and evaluated visually on the fusion images of patient's CT and ROIs in TPS. This process was successfully implemented in the pinnacle planning system through scripting and python code.
Through ROC analysis, a 3.0 cm safety margin could increase NPV of test cases to 100%. A safety margin with 3.0 cm or more is shown to be sufficient in preventing test case collisions from being undetected. As shown in Table 2, the clinically used margin of 3 cm reduces the accuracy from 97.5% to 96.3%. However, for a clinical setting, it is highly preferable that the safety margin is over 3 cm. If the safety margin is less than 3 cm, it will usually trigger the security alert (e.g., Varian's LaserGuard) when delivering the treatment plan.
So a 3-5 cm safety margin is highly recommended for this method.
Several collision prediction methods have been studied. For example, collision indicator charts for gantry-couch angle combinations for Elekta, Varian, and Siemens machines have been published. [10][11][12] These charts are quite useful as a quick reference to get a general idea of the collision for a common plan, but might yield misleading results if heavily relied upon for patient-specific collision assessments. Some computer code or CAD design that modeled the machine and patient for collision detection was also created. However, the patient was represented by a cylinder in some study. 14 The  In this study, we established a method to convert the collisionfree space region into an ROI structure in TPS. F I G . 6. Collision map of gantry angle vs couch angle for an abdominal case. −90°on the x-axis corresponds to 270°in the IEC 61217 coordinate system shown in Fig. 1(a).
F I G . 7. The difference between the measured and calculated collision angle with different couch angles.
guarantees safety of treatment plan, it will affect the accuracy of the prediction. For more accurate predictions, more elaborate models could be considered in the future.

CONF LICTS OF INTEREST
The authors declare no conflict of interests.
T A B L E 2 ROC results for the test cases with three different safety margins. Accuracy is given by the sum of true positive (TP) and true negative (TN) results divided by the total for all results. Negative predictive value (NPV) = TN/(TN + FN).