Development of an automatic evaluation method for patient positioning error

Highly accurate radiotherapy needs highly accurate patient positioning. At our facility, patient positioning is manually performed by radiology technicians. After the positioning, positioning error is measured by manually comparing some positions on a digital radiography image (DR) to the corresponding positions on a digitally reconstructed radiography image (DRR). This method is prone to error and can be time‐consuming because of its manual nature. Therefore, we propose an automated measuring method for positioning error to improve patient throughput and achieve higher reliability. The error between a position on the DR and a position on the DRR was calculated to determine the best matched position using the block‐matching method. The zero‐mean normalized cross‐correlation was used as our evaluation function, and the Gaussian weight function was used to increase importance as the pixel position approached the isocenter. The accuracy of the calculation method was evaluated using pelvic phantom images, and the method's effectiveness was evaluated on images of prostate cancer patients before the positioning, comparing them with the results of radiology technicians' measurements. The root mean square error (RMSE) of the calculation method for the pelvic phantom was 0.23±0.05 mm. The coefficients between the calculation method and the measurement results of the technicians were 0.989 for the phantom images and 0.980 for the patient images. The RMSE of the total evaluation results of positioning for prostate cancer patients using the calculation method was 0.32±0.18 mm. Using the proposed method, we successfully measured residual positioning errors. The accuracy and effectiveness of the method was evaluated for pelvic phantom images and images of prostate cancer patients. In the future, positioning for cancer patients at other sites will be evaluated using the calculation method. Consequently, we expect an improvement in treatment throughput for these other sites. PACS number: 87


I. INTRODUCTION
Particle beams can provide sharper dose distributions than photon beams based on the characteristics of the Bragg peak and sharp lateral penumbra. However, there are some risks to normal tissues around a target in irradiating with a high dose, and to the target in not depositing the prescribed dose if the irradiation position deviates from that of the target. Therefore, accurate patient positioning is crucial to ensure that the radiation dose is precisely and accurately delivered to the target.
For patient positioning research, CT-CT registration methods have been proposed using CT images or cone beam CT images, (1)(2)(3) 2D-3D registration methods have been proposed using two-directional X-ray images, (4)(5)(6)(7)(8)(9)(10) and patient positioning systems that are fast and highly accurate are widely used. For patient positioning in particle therapy, the prescribed dose is not deposited to the target when the water-equivalent path length (WEL) to the target changes, even if the target is positioned to the correct irradiation position using CT images. (11)(12)(13) Therefore, both target positions and the WEL to the target need to be taken into account for accurate target irradiation. Generally, patient positioning is performed based on bony structures that cause large changes in the WEL when their positions change, and a margin is added to the target to ensure that the prescribed dose is delivered to the target despite changes in the WEL. (14)(15)(16)(17) Our facility provides carbon ion therapy as a treatment option in some cancer therapies, (18) and uses orthogonal (frontal and lateral) X-ray images for patient positioning. This system is reasonable in terms of the speed and accuracy of positioning the bony structures to the extent required during treatment planning. However, the patient positioning is manually performed by radiology technicians. Moreover, a 'pointing' technique is used just before irradiation to evaluate patient positioning and to provide evidence of errors in positioning; it involves comparing a number of positions on a digital radiography image (DR) to the corresponding positions on a digitally reconstructed radiography image (DRR) constructed from CT images used for treatment planning. However, the pointing technique has variations across measurers and can be time-consuming owing to its manual nature. The number of treated patients is increasing every year; approximately 800 patients were treated from fiscal years (April 1 to March 31) 2012 to 2013 (about 60% of patients had prostate cancer), and approximately 600 patients will be treated in fiscal 2014. (19) Therefore, improving the throughput of patient positioning, especially for prostate cancer patients, is necessary to improve treatment throughput because treatment times are increasing as the number of patients increases.
In the present study, we propose an evaluation method for measuring patient positioning error that alternates with the pointing technique to improve patient positioning throughput. Our proposed method calculates positioning errors from captured images made by DRs, DRRs, pointing results, and couch positions. The method also incorporates the pointing results to evaluate the calculation results. The accuracy of the method was evaluated using a pelvic phantom, and the effectiveness of the method for patient images was evaluated using a coefficient between the method and the pointing technique by comparing with the pointing results using images of prostate cancer patients before positioning. Additionally, positioning results for prostate cancer patients from fiscal 2012 to July 2014 at our facility were evaluated using the proposed method. The results of the evaluation and the effectiveness of our proposed method have been demonstrated in this paper.

II. MATERIALS AND METHODS
A. Imaging devices X-ray CT (Aquilion LB, Self-Propelled, Toshiba Medical Systems Co., Tokyo, Japan) images were acquired for treatment planning. DRRs were generated from CT images using a treatment planning machine (XiO-N, Mitsubishi Electric Co., Tokyo, Japan) after deciding on the isocenter (IC) and beam directions. Before beam irradiation in the treatment room, X-ray images were acquired as DRs by frontal and lateral directional X-ray tubes and flat-panel detectors (DAR-8000f, Shimadzu Co., Kyoto, Japan). as shown in Fig. 1, and DRs were displayed using an X-ray TV (XTV) system (Shimadzu Co.). After sending DRs to a positioning system (Mitsubishi Electric Co.) from the XTV system, DRs were used for patient positioning with reference to DRRs. In addition, both frontal and lateral X-ray tubes were located upstream of each carbon beam port, and the X-ray tubes were retracted when the carbon beam irradiation was activated. After patient positioning, the residual errors for several points were measured by radiology technicians using the pointing technique defined as follows: 1. A feature point, such as the edge of bony structure on the DR, was selected. The points were selected that corresponded to the positions that the bony structures clearly displayed on the images regarding the planning target volume (PTV) neighborhood, and upstream of the PTV along the beam direction. If the average error of all points was ˃2 mm in each direction, patient setup was repeated. The pointing results, coordinates of the couch, DRs, and DRRs were captured as an image after pointing. Our proposed software calculated the patient positioning error using the captured images.

B.1 Preprocessing
The captured images displayed the outline of the PTV, x-and y-axes, grid points, pointing lines, and numbers; the images were pretreated to highlight regions of interest for the evaluation of patient positioning errors on the DRs and DRRs. A flowchart describing the preprocessing steps and captured images is shown in Fig. 2. First, pixel values of the outer contour of the PTV, the x-axis and y-axis, grids that show the spacing, and the pointing positions and numbers on the DR and DRR regions of the captured images were interpolated using 8 neighborhood pixel values. Next, the region in the DRs blocked by the collimators was marked and excluded from the registration. This was achieved by calculating the gradient using a Sobel operator, which is an edge detector. The edge points that satisfied Eq. (1) were searched along the left-right and the above-below directions. (1) where p F,L = (x F,L , y F,L ) is each position in the frontal or the lateral images. The x F direction corresponds to the lateral direction on the couch, the directions of y F and y L correspond to the longitudinal direction, and x L corresponds to the vertical direction. I F,L Sobel is the pixel value of the frontal or lateral edge-image created by the Sobel operator, and m t is the threshold for the masking processing. In this research, m t was empirically determined to be 30000. After preprocessing, a best-matching position was determined for a region on the DR and a region on the DRR to estimate patient positioning error. The method of searching the best-matching position is shown in the Materials & Methods sections B.2 and B.3 following.

B.2 Algorithm of calculating patient positioning error
The best-matching position for DRs and DRRs were determined using a cross-correlation-based block-matching method, as shown in Eq. (2), when the center of the frontal DRR changes d F = (Δx F , Δy F ) or the center of the lateral DRR changes d L = (Δx L , Δy L ), respectively.
p is the pixel value at the point p F,L for frontal or lateral DRR, p is the pixel value at the point p F,L for frontal or lateral DR, w is the N × N calculation window size defined in N = s × s n around p F,L , I is the average of the pixel values for w, I' is the weighted pixel value (defined in Eq. (4)), s is the image size (s = 480 at our facility), s n is a variable showing the region size using the calculation method, and s n is determined as 0 to 1. The bestmatched position was calculated when Eq. (3) was satisfied, changing d F and d L in the M × M search window size. d F and d L were calculated to the subpixel level, and subpixel values were calculated using bilinear interpolation.

B.3 Weight function
Image values from the weighted DRR image d F,L = arg max(R F,L (d F,L )) and the weighted DR image I' DR are shown in the following equation: where w is the weight function, which is calculated using the Gaussian function shown in Eq. (5): where is the position on the frontal DRR's IC or the lateral DRR's IC based on treatment planning. σ is calculated in Eq. (6): (6) where s σ is a sigma variable. During patient positioning, it is possible to modify the target position at one time to the position at another time if the patient is completely rigid. However, because a patient is of course nonrigid, it is difficult to perform this modification perfectly. Therefore, during actual patient positioning, radiology technicians position the patient with an emphasis on the target and on the tissues that the beam passes through to get to the target. If s σ in Eq. (6) changes, the importance for the IC on the image could be changed. The same weight was used for the image if the calculation window size N changes by s n , and s σ was used for changing the weight in the image.

C.1 Accuracy of calculating method for patient positioning error
The accuracy of the calculation method for patient positioning error was evaluated using a pelvic phantom, as shown in Fig. 3. After setting up the phantom, the couch was moved along a pattern of 10 positions -0.5 mm, 1.0 mm, 2.0 mm, 4.0 mm, 10.0 mm, -0.5 mm, -1.0 mm, -2.0 mm, -4.0 mm, and -10.0 mm -in the lateral, vertical, and longitudinal directions, and DRs of the phantom were acquired at each couch position along the pattern. In this evaluation of patient positioning error, it was assumed that the rotation error was negligible and can be

C.2 Evaluating the correlation between the positioning and the calculation method
The calculation method can be used as an alternative to the pointing technique if there is a correlation between the calculation results and the pointing results. Therefore, correlations between the calculation results and the pointing results were evaluated using the phantom images and patient images, respectively. Correlations were computed between the calculation results (Δx F , Δy F , Δx L , Δy L ) and the pointing results corresponding to the calculation results. The phantom images consisted of 11 patterns (10 patterns mentioned in section Materials & Methods C.1 above and the origin position) of the captured images (corresponding to 22 lateral and frontal images) of the pelvic phantom, and the patient images consisted of 12 captured images of prostate cancer patients before positioning.

A. Verification of the accuracy of the calculation method for the phantom
The accuracy of calculating the positioning error was validated using the pelvic phantom. The accuracy of the phantom was evaluated using the conditions outlined in the Materials & Methods section C.1, and the errors were calculated using Eq. (7). The root mean square error (RMSE) of the calculation results was 0.23 ± 0.05 mm (mean and standard deviation), and the RMSE of the pointing results was 0.27 ± 0.12 mm. The pattern of couch movement and the errors in the calculation and pointing results for each pattern are shown in Table 1.
In addition, there was some influence on the RMSEs when changes in s n or s σ were estimated. The RMSE graph when s n = 0.8 and s σ was changed is shown in Fig. 4(a), and the RMSE graph when s σ = 0.4 and s n was changed is shown in Fig. 4(b).

B. Evaluation of the correlation coefficient between the calculation and pointing results
The correlation coefficients between the calculation and the pointing results were evaluated using the conditions outlined in the Materials & Methods section C.1. The correlation coefficient between the calculation and the pointing results for the pelvic phantom images was 0.989, and the correlation graph between the calculation and pointing results for the phantom images is shown in Fig. 5(a). The correlation coefficient between the calculation and pointing results for the 12 captured images of prostate cancer patients before patient positioning was 0.980, Table 1. Pattern of couch movement and calculation and pointing results for each pattern.  and the correlation graph is shown in Fig. 5(b). The mean and maximum SD for the three radiology technicians in each direction for the pointing results were 0.21 mm and 0.49 mm, respectively, for the phantom images, and 0.40 mm and 1.32 mm, respectively, for the prostate cancer patients. The mean and maximum SD for the three conditional images before prostate cancer patient positioning were 0.27 mm and 1.48 mm, respectively. Each technician decided each condition (image magnifications and image center positions) for the three images.

C. Positioning errors for prostate cancer patients in each year
A total of 8514 captured images (fiscal 2012, 3566 images; fiscal 2013, 4012 images; fiscal 2014, 936 images) after the completion of patient positioning before irradiation for prostate cancer patients from fiscal 2012 to July 2014 were evaluated using our proposed method at our facility. The calculation parameters were empirically determined s n = 0.8, s σ = 0.4, and M = 15 (search size was an approximately 10 mm × 10 mm window). Histograms for the pointing and calculation results in each year are shown in Fig. 6. The number of captured images in which the RMSE of the calculation results was < 2 mm was 8234 (96.7%), and the calculation and pointing results for each axis direction and the RMSE in each year are shown in Table 2.

A. Accuracy of the calculation method
The pixel spacing of the captured images used was 0.446 mm/pixel, and the method could calculate with an accuracy better than the resolution of one pixel because the averaging RMSE of the calculation results was 0.23 ± 0.05 mm. The averaging errors of the calculation results in longitudinal positions -0.35 ± 0.06 mm were systematically negative. This is caused by the errors of Δy F,ref and Δy L,ref in Eq. (7) to be high, and E(m Long,i ) might negatively increase in total if the errors of Δy F,ref and Δy L,ref increased. Meanwhile, the averaging RMSE of the pointing results was 0.27 ± 0.12 mm; this averaging error was as low as the average of the calculation results, but the SD of the pointing results was lower than that of the calculation results. The reason for this was likely the variability in human pointing. In addition, a pointing accuracy superior to the resolution of one pixel for the positioning device could not be evaluated, because it is impossible to point at a resolution that exceeds the resolution of one pixel. The accuracy of the calculation results for lateral images was lower than the accuracy for frontal images.   There are two possible reasons for this: first, that small errors in preprocessing when extracting the collimated region produced errors in the calculation of the best-matching position, which were especially large in lateral images because the acquired region in the lateral images was smaller than the region in the frontal images; and second, that the contrast in the lateral images was lower than the contrast in the frontal images because the lateral transmission distance was greater than the frontal one.
On the other hand, Fig. 4 shows that the calculation accuracy increased when the sigma value decreased, and the accuracy increased when the image size increased. The calculation method used regions of DR and DRR cut from the captured images, and did not directly use the original DR and DRR. Therefore, the calculation method used images stored for magnification percentage and image center position at certain when each radiology technician had finished positioning. The calculation image size should be as large as possible and less than that of the collimated region. However, a larger calculation region could not be extracted from the DR in the captured images that had a larger difference from the DRR position because they had large collimated regions. In this case, the calculation accuracy decreased if the preprocessing involving extraction of the collimated region failed. However, use of the Gaussian function, shown in Eq. (5), improved the calculation accuracy because the function reduced the weight in the pixel value far from the IC. Figure 5(a) shows that the correlation coefficient between the calculation and the pointing results for the phantom images was high, and Fig. 5(b) shows that the correlation coefficient between the calculation and the pointing results for the patient images was also high. Pointing can measure the displacement from one point to the corresponding position if the patient's body structure changes, because the pointed position is manually selected and excludes the changed structure. The calculation method can measure the patient positioning error for prostate cancer patient images at least as well as pointing because the two methods have a high correlation coefficient. However, the calculation method should not have a correlation with the pointing results if the positioning errors were small, with an accuracy < 0.23 ± 0.05 mm; this means that the calculation results might not be the same as the pointing results when the positioning errors are small.

B. Correlation coefficient between the calculation and pointing results
Another method is needed if patient positioning errors that include rotation are evaluated, because the calculation method evaluates the errors as translations only. Yaw (rotation along the vertical axis) and pitch (rotation along the lateral axis) are the frontal image rotation and lateral image rotation, respectively. However, because roll (rotation along the longitudinal axis) cannot be determined from the frontal and lateral DRs, a 2D-3D registration method (4)(5)(6)(7)(8)(9)(10) is needed. In this evaluation of patient positioning error, it is assumed that the rotation error is negligible and can be almost ignored because the measurements take place after the patient positioning has been completed, and the pointing technique is also used for evaluation only regarding the translation errors.
On the other hand, the maximum SD of the pointing results for patient images before positioning was 1.32 mm, which was less precise than the 0.49 mm found for the phantom images. This means that the variation in the pointing accuracy increased because there were variations between radiology technicians in different pointing conditions, and interfractional changes such as gas between the acquisition of the treatment CT images and the positioning DRs. In addition, the maximum SD of the calculation results for the patient images before positioning was 1.48 mm, which was higher than the maximum SD of the pointing results. There are two explanations for this: the first is that interfractional changes, such as gas, produced a detrimental effect on the pointing accuracy for patient images before positioning; and the second is that the calculation area of the DR occupied the largest part of the collimated region because the patient position before positioning was far from the DRR position. Figure 6 shows that the absolute errors in the pointing results in each year at our facility were all < 2 mm. As compared with this result, the calculation results in 3.3% of all images had absolute errors of ˃2 mm. This happened when matching in the calculation failed. There were three reasons for the matching failure. The first was when extracting the collimated region (especially in lateral images) on the DR failed during preprocessing. The second was when there were interfractional changes, such as gas, between the acquisition of the treatment CT images and the acquisition of the positioning DRs. The third was when the matching in the calculation came close to failure in the lateral images because the contrast of the lateral images was lower than the contrast of the frontal images, because the lateral side transmission distance was longer than that of the frontal side, as mentioned above. Additionally, Table 2 shows that the SD of the vertical distance of 0.52 mm from the lateral images was larger than the SD of the lateral distance of 0.19 mm from the frontal images, for images with < 2 mm of calculation error. On the basis of this result, there are two ways to improve the calculation accuracy. First, the image magnification percentage and image center position when the image is captured should be selected properly to ensure that the calculation region is as large as possible in the image, and that the center of the calculation region is as centered as possible in the image. Second, the contrast of bony structures needs to be emphasized in order to relatively reduce the weight for the regions that are subjected to interfractional changes such as gas. However, the bony structures should be extracted from the CT images before the DRR is created from these images, because it is difficult to exclusively extract the bony structures in the DR or the DRR.

C. Evaluation of positioning errors for prostate cancer patients
During operation, matching failures can be avoided by not only checking the calculation results but also by checking the subtraction images of the DRs and DRRs. Reduction in the time taken will occur when using the calculation method because the failure of 3% of the images that have a large error should be evaluated using the pointing technique; however, evaluation using this method can result in the skipping of other images. Additionally, since the time taken to perform the calculation method (about 8 s) is faster than the 2-3 min that the pointing method takes, a time reduction of about 40 to 60 min could be expected if 20 patients were treated in one irradiation room for one day. However a reasonable tolerance should be decided for calculation of the images in other sites or in other facilities.
The evaluation results for the positioning of prostate cancer patients at our facility over three years using the calculation methods and pointing results were reasonable because they satisfied the < 2 mm setup error for positioning. (17) In terms of the results, the calculation method can be expected to improve treatment throughput. In the future, positioning for other sites including lung, head and neck, and liver will be evaluated using the calculation method, and an improvement in treatment throughput for these other sites can also be expected.

V. CONCLUSIONS
In this study, we proposed and developed a calculation method for measuring patient positioning error that is an alternative to the traditional pointing method. The accuracy of the calculation method was evaluated using pelvic phantom images, and the correlations between this method and the pointing technique were evaluated using the phantom images and prostate cancer patient images before positioning. In addition, the positioning results for prostate cancer patients over three years at our facility were evaluated using the calculation method. In terms of results, the calculation method was feasible for the evaluation of patient positioning and the improvement of treatment throughput. Moreover, when evaluating the patient images, three weak points were found in the matching method. First, the accuracy of the calculation method was sensitive to the failure of extracting the collimated region. Second, the accuracy of the calculation method was lower in the lateral images than in the frontal images because the contrast of the lateral images was lower than the contrast of the frontal images from the transmission distance.
Third, the accuracy of the calculation method was sensitive to interfractional changes, such as patient gas. In the future, we would like to improve the calculation accuracy and positioning for other sites; lung, head and neck, and abdominal cancer patients will be evaluated using the calculation method. Moreover, an improvement in treatment throughput for these other sites can be expected.