Portal dosimetry scripting application programming interface (PDSAPI) for Winston‐Lutz test employing ceramic balls

Abstract Purpose Stereotactic radiosurgery (SRS) and stereotactic body radiation therapy (SBRT) treatments require a high degree of accuracy. Mechanical, imaging, and radiation isocenter coincidence is especially important. As a common method, the Winston‐Lutz (WL) test plays an important role. However, weekly or daily WL test can be very time consuming. We developed novel methods using Portal Dosimetry Scripting Application Programming Interface (PDSAPI) to facilitate the test as well as documentation. Methods Winston‐Lutz PDSAPI was developed and tested on our routine weekly WL imaging. The results were compared against two commercially available software RIT (Radiological Imaging Technology, Colorado Springs, CO) and DoseLab (Varian Medical Systems, Inc. Palo Alto, CA). Two manual methods that served as ground truth were used to verify PDSAPI results. Twenty WL test image data sets (10 fields per tests, and 200 images in total) were analyzed by these five methods in this report. Results More than 99.5% of WL PDSAPI 1D shifts agreed with each of four other methods within ±0.33 mm, which is roughly the pixel width of a‐Si 1200 portal imager when source to imager distance (SID) is at 100 cm. 1D shifts agreement for ±0.22 mm and 0.11 mm were 96% and 63%, respectively. Same trend was observed for 2D displacement. Conclusions Winston‐Lutz PDSAPI delivers similar accuracy as two commercial applications for WL test. This new application can save time spent transferring data and has the potential to implement daily WL test with reasonable test time. It also provides the data storage capability, and enables easy access to imaging and shift data.

off and high conformality to spare organs at risk. The corresponding quality control procedures prior radiation treatment are essential to assure delivered accuracy and precision. One of the important factors is the coincidence of imaging, mechanical, and radiation isocenters.
Lutz, Winston, and Maleki 2 developed a method to verify the alignment using a film prior to each SRS treatment. This quality assurance (QA) procedure, Winston-Lutz (WL) test, was originally designed to verify the coincidence of radiation isocenter and mechanical isocenter in a 6MV linear accelerator-based SRS system.
With the advent of on-board imagers, WL test has been modified by using electronic portal imaging device (EPID). Electronic portal imaging can be very useful due to its nature of fast image acquisition, digital format, high spatial resolution, as well as potential Portal Dosimetry. 3 Several American Association of Physicists in Medicine (AAPM) task group (TG) reports recommend verifying congruence between radiation and imaging isocenters. [4][5][6][7][8][9] Per TG142, the daily accuracy of imaging and treatment coordinate coincidence should be within 1 mm for SBRT techniques. 6 TG179 recommends that the geometric calibration, the relationship between imaging and LINAC radiation isocenters, should be tested daily following the procedure described in AAPM TG-66. 5 10,11 Generally, WL is done by using a film or portal imager. These films or portal images can be analyzed by commercial software.
However, either scanning films or transferring DICOM images is time consuming, especially when considering a daily implementation of the WL test. Also, current commercial software solutions do not have the capability to additionally perform ongoing QA for external patient surface tracking systems, and cone-beam computed tomography (CBCT) imaging system measured shifts as well as isocenter drifts over time.
Many algorithms for WL portal image analysis have employed edge detection and center of mass calculations. [12][13][14] However, the accuracy can be suboptimal for low-resolution images. Winey et al developed a fast WL algorithm, using a double convolution, to find cone and sphere centers separately. 15 They provided a robust solution for low-resolution images. However, these algorithms require the extraction of data into a third party software as opposed to direct analysis within the oncology information system.
The goals of this study are to provide an integrated solution to speed up the isocenter congruence QA on a phantom with ceramic balls by using a Treatment Planning System (TPS) Application Programming Interface (API) to analyze images online, and provide the functions of recording and reporting in a commercial oncology information system. Besides routine WL test, the application also allows the user to test surface monitoring system.
A custom software application was developed to enable the delivery of a daily WL with a reasonable time frame, help user to quantify isocenter congruence, and provide documentation tool for isocenter drifts over time. Equations built into the application are:

| METHODS
The AForge.NET image processing library utilizes a custom implementation of the connected components labeling algorithm to categorize regions within the image based on pixel intensity value. 16,17 The outlines of these categorized regions, denoted "blobs" by AForge, are analyzed by calculating the mean points between the outline and verifying the differences between an assumed shape (commonly a circle or a rectangle). In the current implementation of shape determination, the outline of the field and ball is reorganized into a circle. Portal images were then acquired for all 10 fields and exported for analysis using two commercially available software products, RIT and DoseLab. Two manual methods served as a benchmark to verify PDSAPI results. Twenty WL test image data sets (200 images in total) were analyzed by these five methods in this study.
The first manual comparison methods are a direct distance measuring method. This method uses Eclipse version 13.7 Portal Dosimetry application. Image intensity was set to obtain a consistent level for acceptable visualization of both ball edge and field edge. The digital graticule was used as reference to find ball center shift from field center. Four distances were measured to determine field center, and another four used to find ball center. Those eight measurements include vertical and horizontal distance from the center of digital graticule to ball boundary, vertical and horizontal distance from the center of digital graticule to field boundary, and vertical and horizontal width of both ball and field. All measurements were performed along with digital graticule X and Y axes. Measurements for ball and field will decide the centers for ball and field separately. By comparing those two centers, vertical and horizontal shifts were determined with the following equations.
where, B represents BB, and F represents field.
x B,CR is the distance from the center of digital graticule to the right side of ball boundary, ter, respectively, relative to panel center (x C , y C ). The shifts can be decided by the following equations: Here, B represents BB and F represents field. Pixel size at isocenter (PSI) is the scaling factor, and PSI equals 1 at source to imager distance (SID) at 100 cm. PSI depends on the vertical position of the EPID imager during the image acquisition.
PDSAPI-resolved field size and BB size (diameter) for all 20 image sets were also investigated. Due to the remarkable difference between in and out of field, the field size variation is much less than BB size. However, the matched fields are only used to find their centers. The size itself can be changed by the threshold applied, phantom setup, imager response, as well as machine performance. OSMS Isocube has four BBs around the central BB. For some gantry, collimator, and couch setting combinations, portion of other BB can go inside the field. This will affect the matched BB and field circles.
Threshold was applied to make field and BB more distinguishable, so the matched field and BB sizes are smaller than their physical sizes. F I G . 9. Field size and BB size congruence. 300 | PDSAPI accuracy was also evaluated for all our clinically used energies. The sequence of the fields follows the same order as Table 1. Four plans were made with different energies. Once phantom was aligned, four plans were delivered one after another without any setup change.
Comparison of contrast to noise ratio (CNR) at various MU levels was performed for both WL phantoms. Histogram tool in Portal Dosimetry was used. ROI was selected as a square with dimension as 15 by 15 pixels. CNR was defined as the ratio of absolute mean pixel value difference between inside BB and field (outside BB) and field noise.

| RESULTS
The shift results of all five methods are shown below in Fig. 4. X deviation is the horizontal shift, Y deviation is the vertical shift, and R is the 2D displacement. WL PDSAPI results were compared against all the other four methods. Manual 1 represents direct distance measuring method. Manual 2 represents Histogram tool measuring method.
There are 1600 pairs of 1D comparisons in total. Figures below (Fig. 5a-d)  methods. Only one pair (0.5%) 2D difference are more than AE0.33 mm for RIT and manual 2 methods each.
The correlations between PDSAPI and rest of the methods were also investigated as shown in Fig. 6a-d. Red dash lines represent AE0.33 mm away from perfect positive correlation. All of the points fall within the range of 1 pixel ROI (AE0.33 mm).
As shown in Fig. 7a,b, additional features of the PDSAPI application allow the user to review the displacement trends for single or multiple field(s) under the option "History", or to review displacement for any WL image data sets under the option "Displacement". Variation of PDSAPI decided field size and BB size were also studied. Figure 9 shown the temporal changes for one of the fields.
Field size are much more congruence than BB size due to substance dose fall-off out of the field.
For all the energies we investigated, no substantial energy dependence was observed on PDSAPI accuracy (Fig. 10). All of the differences from RIT or DoseLab are within 1 pixel size.
As shown in Fig. 11  within 0.33 mm difference from all other four methods. Similar efficiency of the PDSAPI was observed for 0.22 mm threshold. Substantial improvement was observed for 0.11 mm threshold when PDSAPI comparing against RIT (80.5%) and DoseLab (86.5%) (results are shown in Fig. 13a,b). Comparison against two manual methods is similar as OSMS cube phantom for 2/3 pixel width threshold.

| CONCLUSION
In this study, we developed a PDSAPI to expedite the WL test and to provide documentation capability. This application was tested during our routine clinical WL tests, and the result agrees well with two commercial software as well as two manual measurement methods.

CONF LICT OF I NTEREST
There is no relevant conflict of interest to disclose.