Automatic patient positioning and gating window settings in respiratory‐gated stereotactic body radiation therapy for pancreatic cancer using fluoroscopic imaging

Abstract Before treatment delivery of respiratory‐gated radiation therapy (RT) in patients with implanted fiducials, both the patient position and the gating window thresholds must be set. In linac‐based RT, this is currently done manually and setup accuracy will therefore be dependent on the skill of the user. In this study, we present an automatic method for finding the patient position and the gating window thresholds. Our method uses sequentially acquired anterior–posterior (AP) and lateral fluoroscopic imaging with simultaneous breathing amplitude monitoring and intends to reach 100% gating accuracy while keeping the duty cycle as high as possible. We retrospectively compared clinically used setups to the automatic setups by our method in five pancreatic cancer patients treated with hypofractionated RT. In 15 investigated fractions, the average (±standard deviation) differences between the clinical and automatic setups were −0.4 ± 0.8 mm, −1.0 ± 1.1 mm, and 1.8 ± 1.3 mm in the left–right (LR), the AP, and the superior–inferior (SI) direction, respectively. For the clinical setups, typical interfractional setup variations were 1–2 mm in the LR and AP directions, and 2–3 mm in the SI direction. Using the automatic method, the duty cycle could be improved in six fractions, in four fractions the duty cycle had to be lowered to improve gating accuracy, and in five fractions both duty cycle and gating accuracy could be improved. Our automatic method has the potential to increase accuracy and decrease user dependence of setup for patients with implanted fiducials treated with respiratory‐gated RT. After fluoroscopic image acquisition, the calculated patient shifts and gating window thresholds are calculated in 1–2 s. The method gives the user the possibility to evaluate the effect of different patient positions and gating window thresholds on gating accuracy and duty cycle. If deemed necessary, it can be used at any time during treatment delivery.


| INTRODUCTION
Fiducial markers are commonly used in respiratory-gated stereotactic body radiation therapy (SBRT) of pancreatic cancer [1][2][3][4] to assist in the visualization of the treatment area. SBRT of the pancreas needs a very accurate patient setup because small margins are used around the target to minimize dose and toxicity to surrounding organs at risk (OARs) such as the duodenum. Fiducials are used together with monitoring of patient breathing during patient setup and treatment. 5 In gated treatments, proper setup of the patient requires that not only patient's position but also the gating window thresholds agree with the treatment plan. Different commercial treatment systems use various motion management methods for patient setup and/or intrafractional position monitoring. [6][7][8][9] However, current linear accelerators do not have the functionality to perform automatic setup of the patients and gating window based on fiducials, and rather rely on a manual patient setup. 10 SBRT treatments, therefore, could benefit from the assistance of automatic, user-independent methods.
Cone-beam CT (CBCT) and fluoroscopic images are frequently used in image-guided RT of pancreatic cancer to position the patient prior to treatment delivery. CBCT provides good soft-tissue contrast, but is acquired throughout several breathing cycles, and is thus affected by the whole respiratory-induced motion range. The resulting images, including fiducials, the tumor, and healthy organs, will therefore be blurred and difficult to use for patient positioning. 11 Fluoroscopic images, frequently acquired after CBCT to verify or further refine setup, offer, on the other hand, high-resolution, real-time image information of the fiducials' positions. A human observer (therapist, medical physicist, radiation oncologist) visually compares the acquired fluoroscopic images (the fiducials in real time moving throughout the respiratory cycle) with reference images from the treatment planning system, and decides how the patient should be positioned. The high temporal resolution and high contrast of fiducials on x-ray images assist in making this decision. Due to the fiducials' high intensity in the fluoroscopic images, they can be automatically detected 12-16 and have the potential to be automatically matched to the reference image. 10 During respiratory-gated RT, a breathing signal is typically acquired by externally measuring the anterior-posterior (AP) position of the chest or the abdomen. Assuming that the relationship between the internal position of the tumor and the external breathing signal does not change during the treatment fraction, the latter can then be used to identify when the tumor is at the correct position for treatment, that is, within the gating window. 5 During setup, both the fiducials and the breathing signal need to be observed in order to set the patient position and the gating window thresholds.
Due to a lack of both built-in functionality and a scarcity of suggested methods that are applicable to most conventional linear accelerators, this process is currently done manually by the user, and the patient setup and corresponding treatment delivery accuracy are therefore user dependent. 10 Recently, Wan et al. have developed a method to perform automatic setup (patient position and gating window) based on CBCT images. 11 While CBCT images are routinely acquired during setup of   SBRT patients, they take a considerable amount of time to acquire   and would not be an ideal imaging technique to use in the middle of   treatment if the position or internal-external tumor-surrogate correlation needs to be verified. Fluoroscopic images, on the other hand, are quicker and simpler to acquire. In this study, we present a userindependent automatic method of simultaneously finding an optimized patient position and gating window thresholds in patients with implanted fiducial markers for pancreatic treatments treated on a linear accelerator with a single kV imager. This is the first study to the best of our knowledge that presents such a method for conventional linear accelerators. The method is based on sequentially acquired fluoroscopic images in the lateral and AP directions, which are easily and quickly acquired when deemed necessary. We retrospectively compared clinically used setups to the automatic setups by our method in a group of pancreatic cancer patients. to monitor breathing motion during image acquisition. A 4DCT was created by using the phase information of the breathing signal to bin the images into ten phases in steps of 10%, where the 0% phase corresponds to end-of-inhale and the 50% phase to end-ofexhale. Since the treatment protocol uses end-of-exhale gating, 17 the average intensity, the minimum intensity, and the maximum intensity projections (MIP) CT image sets built from the 30% to 70% phases (CT 3070av , CT 3070min and CT 3070MIP , respectively) were reconstructed and exported to the treatment planning system (TPS; Eclipse, Varian Medical Systems, Palo Alto, CA, USA). The spatial resolution of the images was 2.5 mm in the superior-inferior (SI) direction and 0.98-1.27 mm in the axial plane.
Using the CT 3070av , CT 3070min , and CT 3070MIP images as well as additional PET imaging, an internal target volume (ITV) was contoured in the TPS. The planning target volume (PTV) was created from the ITV using an isotropic 3-mm margin. We contoured the fiducials on the CT 3070MIP images, and in some cases added an isotropic 1-mm margin. The fiducial contours were then copied onto the CT 3070av to include them in the plan. AP and lateral digitally reconstructed radiographs (DRRs) containing the projected fiducial contours were calculated to assist in patient setup and were also exported for analysis.  When the patient was deemed to be accurately positioned, we acquired one AP and one lateral fluoroscopic image sequence, typically lasting 15-20 s each, for analysis purposes before treatment delivery was started. Since the TrueBeam is equipped with a single kV image detector, the AP and lateral fluoroscopic imaging sequences were acquired sequentially with a 90-degree gantry rotation taking place between them. The fluoroscopic mages were acquired at a frame rate of 14.8 times per second, at 1500 mm source-detector-distance (SDD) and had a pixel size of 0.388 9 0.388 mm 2 . The source-axis-distance (SAD) was 1000 mm.

2.C | Fiducial tracking
The fluoroscopic images and the RPM data were imported in Matlab (version 2014b, MathWorks, Natick, MA, USA) for analysis. In order to develop the automatic setup procedure, the position and motion of the fiducials during the breathing cycle and the gating window is needed. The method of template matching was used for fiducial tracking. 18 For each fiducial, we manually created one rectangular template shape for lateral imaging and one rectangular template shape for AP imaging using the first lateral and the first AP image from the first fraction. Each template shape contained one fiducial with a surrounding margin of a few pixels where the center of the template corresponded to the center of the fiducial. For each following fraction, the center pixel of each fiducial was found in the first AP and lateral fluoroscopic images. To create the fraction-specific fiducial templates, we then matched these fiducial centers to the center of the template shapes and extracted the corresponding pixels from the fluoroscopic image.
To automatically find the fiducial center in a fluoroscopic image, we used the fiducial center for the preceding image to create a search region ten pixels larger than the template in all directions.
To find how much the fiducials had moved between images, the fiducial templates and the search regions were evaluated by the normalized cross-correlation 19 as implemented by normxcorr2 in Matlab. The tracked positions were visually inspected in all sequences.

2.D | Estimation of in-room fiducial positions
By using the projected fiducial positions on the fluoroscopic images acquired at SDD, our method will calculate how much the patient needs to be shifted to reach the optimized position. However, to accurately convert the projected fiducial positions into patient shifts, we need to take the divergence of the x-ray beam between the fiducials and the detector into account. When calculating the fiducial AP position in the in-room coordinate system, AP room , from its projection on the lateral fluoroscopic image, we therefore need to know its in-room LR position, LR room . The same applies for the LR room position. Considering the imaging geometry where one sequence is laterally acquired and the other sequence is taken in the AP direction, the following equations relate the detector coordinates to the room coordinates. Here, LR room is defined positive toward the left hand and AP room defined positive in the anterior direction for a patient in a head-first supine position. To estimate LR room and AP room for a fiducial, we took an approach similar to Cho et al. and approximated LR room by initially assuming that AP room = 0 mm and vice versa. 20 Then, we iteratively used eqs. (1) and (2) to improve the estimates until the differences between two iterations both were below 0.1 mm. This approach is numerically wellbehaved and converges after two to three iterations.
Since we acquire the AP and lateral fluoroscopic image series sequentially and the fiducials are moving with respiration, we cannot pair up images to make this estimation for every fiducial position.
Instead, we estimated one representative AP room and one representative LR room per fiducial using the mid-range fiducial LR detector and AP detector positions. •

2.E |
Step I: Superior-inferior patient shift For each fiducial f, the difference between its overall most superior extent and the superior border of its projected contour on the DRR, dSI detector , was calculated for both AP and lateral imaging, as shown in Fig. 1, and converted to its in-room differences according to where the subscripts AP and LAT denote imaging direction. The optimized SI patient shift dSI is given by the smallest of dSI room . This shift is conservative in the sense that we do not allow any part of any fiducial to be more superiorly located than its projected contour. • Step II: Lower and upper gating window thresholds Taking dSI from Step I into account, we found the largest breathing amplitude for which no fiducial is more inferiorly positioned than the inferior border on its corresponding projected contour (Fig. 2).
That breathing amplitude was set as the upper gating window threshold.
The lower gating window threshold is set as the overall smallest observed breathing amplitude. In a situation when the patient starts exhaling more deeply, this will prevent a beam on situation with fiducials located more superiorly than their projected contours. • Step III: Left-right and anterior-posterior patient shifts Using only the fiducial positions from the N 1 AP images within the gating window and taking dSI from Step I into account, we calculated the LR patient shift dLR according to The optimized AP patient position is found in an analogous way using the laterally acquired images. Using only fiducial positions from the N 2 images within the gating window and taking dSI from Step I into account, we calculated the AP patient shift dAP according to

2.F | Assessment of patient setup
One of the assumptions behind using an external surrogate for respiratory gating is that the relationship between the external breath- To assess gating accuracy, we classified a fiducial position as accurately gated if at least 75% of the fiducial was inside its pro-

| DISCUSSION
In this study, we presented an automatic method for finding an opti- showed that the automatic method has the potential to decrease the interfractional setup variation as well as to increase the gating accuracy and the duty cycle.
We chose to create a method where the primary goal was to achieve 100% gating accuracy while at the same time maximizing the duty cycle. As shown by the 29%-56% duty cycle variation for Our method employs two sequentially acquired 2D imaging projections. Since the fiducials are moving with respiration, this imaging geometry means that 3D triangulation of individual fiducial positions is not possible. 20,[22][23][24][25][26] However, to be able to accurately calculate patient 3D shifts, x-ray beam divergence still must be taken into account. This means that for AP imaging we need to know the LR fiducial position (and vice versa). We used eqs. (1) and (2) to make per-fiducial position estimates at mid-range of the motion and applied those estimates in eqs. (3)(4)(5)(6). Although a relatively simple approach, it has some advantages such as that no other imaging is required or for prior fiducial motion knowledge to be available while it at the same time produces sufficient accuracy. An error dx in the AP room or LR room estimate would affect dSI room in eqs. (3) and (4)   Having access to an automatic method to assist in setting the patient position and gating window thresholds could increase treatment delivery accuracy.

ACKNOWLEDGMENTS
This study was funded by Varian Medical Systems.

CONF LICTS OF INTEREST
This study was funded by a research grant from Varian Medical Systems held by Dr Cerviño. Dr. Hattangadi-Gluth has a research grant from Varian Medical Systems, unrelated to the current study.