Shortening the delivery time of proton therapy by real-time compensation method with raster scanning

Among the various scanning techniques, spot and raster scanning are the most frequently adopted. Raster scanning turns off the beam only when each isoenergy slice irradiation is completed. This feature intrinsically solves the leakage dose and frequent beam-switching problems encountered during spot scanning. However, to shorten the delivery time of raster scanning, a sophisticated dose control strategy is required to guarantee dose distribution. In this study, a real-time compensation method with raster scanning for synchrotron systems was designed. It is characterized by a small spot-spacing planning strategy and real-time subtraction of the transient number of particles delivered between two planning-spot positions from the planned number of particles of the subsequent raster point. The efficacy of the compensation method was demonstrated by performing accurate raster scanning simulations with an in-house simulation code and accurate final dose evaluations with a commercial treatment planning system. Given the similar dose evaluation criteria under a practical high scanning speed, compared with the spot scanning method, the total delivery time of the compensated raster scanning method was significantly shortened by 53.3% in the case of irradiating a cubical target and by 28.8% in a pelvic case. Therefore, it can be concluded that real-time compensated raster scanning with a fast scanning configuration can significantly shorten the delivery time compared to that of spot scanning. It is important to reduce the pressure on patients caused by prolonged immobilization and to improve patient throughput capacity at particle therapy centers.


Introduction
In recent years, particle therapy has become an attractive form of cancer treatment. Passive beam scattering [1] and active beam scanning [2,3] have been developed for particle therapy. Active beam scanning is the trend of proton therapy and can realize high-dose conformity in tumors and decrease the dose to normal tissues [4,5] by allocating pencil beams next to each other with adequate overlap. Active beam scanning has been used in several tens of existing centers and has been adopted in new particle therapy centers [6,7]. However, active beam scanning is more sensitive to organ motion than passive scattering [8,9]. Various motion mitigation techniques have been developed for the treatment of moving tumors, including beam gating [10,11], rescanning [12], and beam tracking [13], where gating and rescanning usually require a considerable amount of time [14]. Therefore, shortening the delivery time is helpful for the clinical application of timeconsuming motion mitigation techniques.
Three different but similar beam scanning techniques have been used in clinical routine: spot scanning [15], line scanning [16], and raster scanning [17]. In spot scanning, when the number of particles reaches the prescribed value for each spot, the beam is switched off, and the beam position is subsequently moved. The leak dose caused by the finite beam switch-off response time is unavoidable. Usually, the beam is shut off before reaching the preset value at a spot so that the leak dose can be corrected to some extent. However, this correction can only achieve average compensation for the leak dose if the beam current fluctuates. Therefore, the time loss owing to switching the beam on/off frequently and the leak dose are two major challenges in shortening the delivery time of spot scanning. In line scanning, continuous beam scanning is applied along line segments in the lateral plane. The dose delivered along a line segment can be dynamically adjusted by changing the beam intensity and scanning speed. For this method, an optimization procedure is required in which discrete beam weights are interpolated and optimized iteratively to obtain continuous beam weights. In raster scanning, the beam remains on when the beam position is moved from one raster point to the next. This feature makes it possible to irradiate a target volume more efficiently without the time loss and leak dose problems encountered during spot scanning [17]. However, an inevitable transient dose is delivered to the sites between each pair of consecutive raster points.
To address the effects of transient dose on dose distribution and shorten the irradiation time, Inaniwa et al. proposed an optimization method [18] in which the transient dose between two raster points was included in the optimization process with the assumption that the beam current time structure was stable and reproducible. However, the beam spill profile extracted from a synchrotron accelerator usually varies from spill to spill, mainly because of small fluctuations in the power supplies for the main-ring bending magnets and extraction devices [19]. Therefore, the assumed reproducible beam-spill time structure used in the optimization process is difficult to obtain during actual irradiation. In addition, repeated dose calculations are required during the optimization process. In each iteration, it is necessary to discretize the continuous movement process of raster scanning, resulting in a significant increase in the number of auxiliary points used for dose calculation. Thus, it takes longer and requires more memory to perform optimized calculations to obtain the optimal plan for raster scanning. Klimpki et al. proposed a relatively straightforward method to address this problem [20]. When the transient number of particles was accurately predicted, the file of the spot-scanning plan was adapted by directly subtracting the expected transient number of particles from the planned number of particles of the subsequent raster point. Thus, the original spot-scanning plan was converted into a raster-scanning plan before scanning irradiation. This method provides a feasible dose control strategy for raster scanning in cyclotron-based proton facilities with a relatively stable and reproducible beamspill time structure. However, this straightforward method also suffers from a similar limitation in that reproducible beam spills are difficult to obtain using synchrotron-based proton facilities.
Because of the abovementioned limitations of the existing dose control strategies for performing raster scanning irradiation with synchrotron-based particle therapy facilities in the literature, a real-time compensation method was studied. The method was characterized by two features: large spot overlapping and real-time compensation for the transient number of particles. For this purpose, a plan similar to that of spot-scanning was first optimized with a relatively small spot spacing. Subsequently, during raster scanning delivery, this plan was executed using a real-time compensated dose control strategy. Using this compensation method, the transient particles delivered between two consecutive raster points were compensated by subtracting the on-the-fly measured transient number of particles from the planned number of particles of the subsequent raster points in real time. In this study, a preliminary numerical study of the feasibility of the compensation method was performed. Subsequently, spot scanning and real-time compensated raster scanning were accurately simulated using an in-house simulation code. In the clinical case, a commercial treatment planning system (TPS) was used for accurate final dose evaluation after scanning irradiation simulation.
The remainder of this paper is organized as follows. The real-time compensation method for raster scanning and the cases studied are described in Sect. 2. The efficacy of the compensation method for shortening delivery time in a cubical target and a pelvic clinical case and future work are discussed in Sect. 3. Finally, the conclusions are presented in Sect. 4.

Real-time compensation method for raster scanning
In raster scanning, the beam remains on when it is moved from one position to the next. Typically, a small transient dose is introduced between two consecutive raster points, which is an extra dose to the planned dose. To overcome this transient extra-dose problem, a real-time compensation method for raster scanning was designed, and a preliminary numerical study on the feasibility and efficacy of the compensation method under various situations was performed. The real-time compensation method had the characteristic of adopting a small spot-spacing planning strategy, while the other aspects of the plan are identical to those of any other spot-scanning plan.
2.1.1 Dose control strategy of compensation method Figure 1 illustrates the operation of the real-time compensation method for raster scanning. Figure 1a shows the dose monitor counts during beam delivery when compensated raster scanning irradiation was performed. The scanning magnet current is shown in Fig. 1b. Dose monitors were used to monitor the scanning process. When a raster point was irradiated with a new beam pulse or the beam began to move from one position to another, a count on command was issued. When the planned value of a raster point was reached or the irradiation of each isoenergy slice was completed, a count reset command was issued, and the cached count value was cleared. Relying on a quick-response dose monitor, the transient particles delivered between two consecutive raster points were counted as the particles were irradiated at the subsequent raster point in the case of a large spot overlap. In this manner, the transient particles were compensated, and the number of particles actually irradiated at the next raster point varied in real time. When the planned number of particles of the subsequent raster points was delivered in advance during movement, the subsequent raster points were typically canceled. When a new spill was extracted from the accelerator, the beam remained off until it started to irradiate the first spot. Therefore, there was no need to compensate for the first irradiated raster point of each spill.
There is no need to frequently switch on/off the accelerator beams in raster scanning, which potentially reduces time loss and significantly simplifies the control system of a proton therapy system. When a synchrotron-based beam delivery system is used, the beam spill structure varies from one spill to another, and the beam intensity is not always constant over one spill. With real-time particle fluence information, the transient number of particles can be compensated for accurately and flexibly.

Preliminary numerical study of compensation method
To determine the appropriate scanning parameters that make compensated raster scanning effective, a preliminary numerical study of the effectiveness of the compensation method under various situations was carried out. Spot matrices with different spot spacings were created for a uniform 10910 cm 2 field in water. The same spot size (sigma) was used for the Gaussian superposition calculation in all the cases. Therefore, to achieve the desired superposition distribution for a defined field, the spot weights of each spot matrix were varied with a specified spot spacing. When spot weights were assigned, an extreme scenario with raster scanning was selected. Specifically, the planned weight of the subsequent raster points was delivered to the sites between the two raster points in advance, while the subsequent raster point was omitted during the raster scanning simulation.
When performing the Gaussian superposition calculation, the transient weights delivered during movement were considered as the weights delivered at the auxiliary points between two raster points. The effect of the number of auxiliary points on the superposition distribution difference was studied under different spacing/sigma ratios. The (a) the dose monitor counts when the compensated raster scanning has been performed and (b) scanning magnet current: T0, T1, T2,… represent the trigger signals that cause the beam to move from one position to another; t0, t1, t2,… represent the beam shift to the planned position and the end of movement difference in the superposition distribution is presented by the root mean square (RMS), which was calculated for the superposition distribution in the quasi-continuous calculation process against the superposition distribution in the discrete calculation process with different numbers of auxiliary points as.
where i is the index of all grids within the defined field, n is the total number of grids, and D c i and D d i are the grid values in the case of quasi-continuous calculation and discrete calculation with different numbers of auxiliary points, respectively. In the numerical calculation, the quasi-continuous calculation process between each pair of raster points was described by up to 1000 equally spaced auxiliary points. Figure 2 shows the relationship between the superposition distribution difference and number of auxiliary points under different spacing/sigma ratios. When the spacing/ sigma ratio was B 1.5, the RMS was generally less than 1% regardless the number of auxiliary points used, indicating that the superposition distribution of discrete calculations with one auxiliary point represented the superposition distribution of continuous irradiation with high confidence.
The homogeneity of the superposition distribution was employed to estimate the effectiveness of the compensation method. For the extreme raster scanning scenario, the homogeneity of the superposition distribution under various conditions was quantitatively calculated as.
where D max and D min are the maximum and minimum grid values, respectively, in the evaluated region. Here, the evaluated region was defined as 80% of the field size to eliminate dose fall-off at the edge of the field for smaller spacing/sigma ratios. Figure 3 shows the homogeneity and superposition distributions for the different spacing/sigma ratios. We can clearly see that when the spacing/sigma ratio was B 1.4, the homogeneity was controlled within 3% for the extreme raster scanning scenario, indicating that by intentionally shortening the spacing size, the homogeneity error induced by the real-time compensation method was acceptably small.

Simulation techniques and parameters
To simulate a typical scanning irradiation process using active beam scanning and to evaluate the dose distribution, a sophisticated simulation code was developed [21]. The simulation code comprised three main parts: data preparation, irradiation process simulation, and weighted superposition of the respective dose distributions from all beam spots. The data preparation included the reading of the beam spill profile of the synchrotron accelerator and scanning parameters, such as scanning speed, expected beam intensity, and scanning method, and the generation of integral depth dose curves with Geant4 [22,23]. The beam spots were allocated according to the geometry of the target and the absolute number of particles to be irradiated was then calculated based on the relative beam weight of each spot. To perform a detailed clinical case study and increase the flexibility of the simulation code, other types of data can also be input by directly reading the irradiation information file of the treatment plan, such as the beam spot position, beam energy, and planned number of particles for each spot.
Second, the scanning irradiation simulation was executed with spot-by-spot time integration of the beam spill to alternate the function of the dose monitor in the actual beam delivery process. To perform a more realistic scanning simulation, the time delays caused by the finite response time of the proton therapy system cannot be neglected. AcceleratorResponseDelay is the time interval between the time at which the preset value is reached and the time at which the beam is turned off during spot scanning. VaryCurrentDelay is the time interval between the time that the control system sets the current pattern of the power supply and the time that the current pattern starts to be adjusted when the power supply has received the commands. PulseOutDelay is the time required to stabilize the magnetic field during scanning irradiation. Two different scanning speed scenarios were simulated: fast and slow scanning scenarios. For a beam in the left/right  10 , and a constant beam intensity was used. The beam spill extraction time of the synchrotron was not fixed [24], which means that the new beam spill was extracted when irradiation was completed within an iso-energy slice or all particles within one spill were consumed. The parameters used in the irradiation simulations are listed in Table 1.
In the simulation process, the time-stamp of the beam dwelled at a given position, the beam position moved from one position to another, and various time delays were recorded. Then, the beam current integration over each time interval marked by the time-stamp was performed again to obtain the actual number of delivered particles during each time interval, which includes the actual number of irradiated particles where the beam dwelled at a given position and the actual number of delivered particles during the movement.
Third, superposition of the deposited dose at each spot position was performed after beam current integration. For spot scanning, only the deposition dose at the original spot positions must be superimposed. When the scanning parameters were suitable for performing compensated Fig. 3 (Color online) Homogeneity and superposition distributions for different spacing/sigma ratios in an extreme raster scanning scenario: (a) homogeneity of distribution with different spacing/sigma ratios, (b) superposition distribution for compensated raster scanning when spacing/sigma ratio equals 1.3, and (c) superposition distribution for compensated raster scanning when spacing/ sigma ratio equals 1.5, which served as a negative example for comparison Note: For a beam in the left/right direction, x corresponds to the S-I direction, y corresponds to the A-P direction, and z corresponds to the R-L direction raster scanning, the difference in distribution induced by the number of added auxiliary points between two consecutive raster points was small. Thus, an auxiliary point was added between each pair of sufficiently overlapping consecutive raster points to simplify the calculation process. The corresponding number of particles of the added auxiliary points was assigned to account for the transient number of particles delivered between two consecutive raster points. In addition, superposition of the deposited dose at the original raster points was performed. Using this simulation code, a detailed scanning process with active beam scanning for a cubical target and clinical case was successfully simulated. Thus, the effects of various machine parameters on the final dose distribution were investigated.

Simulation and dose evaluation of cubical target
With the specified parameters, the developed simulation code can create a treatment plan for a simple cubical target to obtain a three-dimensional dose distribution conformal to the target. A spread-out Bragg peak (SOBP) with a distal range of 30 cm and a modulation width of 10 cm was generated with different energies from 174 to 221 MeV for the delivery of a 2 Gy (RBE) prescribed dose to a regular cubical target volume with a cross section of 10910 cm 2 . For nontrivial target geometries, it is necessary to optimize the weight of spots to achieve a uniform dose distribution that closely conforms to the target volume. In this case, no complex optimization was performed for the beam spots. The spot weights were identical within each iso-energy slice and were assigned according to the corresponding SOBP weights in the longitudinal direction. A two-dimensional Gaussian distribution was employed to model the lateral spread of the beam.
In the dose calculation, a fixed Gaussian spot size for all energies (sigma = 4 mm) and a dose grid size (19191 mm 3 ) were used, and the spot spacing was set to 5 mm in the lateral plane and 6 mm in the depth direction, which sufficiently overlapped to ensure the effectiveness of the compensation method. Using the assumed parameters, the transient number of particles between each pair of spot positions was calculated as where I is the beam intensity and DT is the sum of the inevitable delay time and the transition time between two consecutive raster points. The feasible beam intensity for raster scanning is the maximum usable beam intensity to ensure that the proposed compensation method is effective. It was uniquely determined by the scanning speed and MU count of the raster point with the minimum prescribed number of particles, given as P NextSpot_i is the planned number of particles at the raster point that follows raster point i, N Spot is the total number of beam spots, and DT i is the sum of the delay time at raster point i and the transition time from raster point i to raster point i ? 1. In general, spots with high weights were located in the distal slice of the target, and spots with low weights were found in the proximal slice. The feasible beam intensity is usually determined by a spot of the proximal slice. When raster scanning was applied, the feasible beam intensity in the fast and low scanning scenarios for this cubical target were 4.0 and 0.9 nA, respectively. The dose distribution of the proximal layers was contributed by the Bragg peak dose of this slice and several plateau doses of deeper slices. The slight overdose caused only by the excessive Bragg peak dose of this slice had no significant effect on the homogeneity of the dose distribution. Therefore, scanning irradiation was performed when the beam intensity was larger than I feasible . The delivery time was calculated by summing the beam-on time that dwelled at each raster point, the transition time, and the energy switching time.

Simulation and dose evaluation of clinical case
A patient case study was conducted to evaluate the efficacy of the real-time compensation method. The flexible simulation program directly reads the input file containing scanning irradiation information. Subsequently, spot scanning and raster scanning irradiation simulations using the developed simulation code and final dose evaluations using a commercial TPS were performed. Based on user-defined objective functions and constraints for the planning target volume (PTV) and organ at risk (OAR), optimal beam spot weights were obtained using RayStation (RaySearch Labs, version 10 B, Sweden). The prescribed dose of PTV was 70 Gy (RBE) delivered in 35 fractions (2 Gy (RBE) per fraction). A two-field intensity-modulated proton therapy treatment plan was generated for the pelvic region clinical case with gantry angles of 90°and 270°in combination with a coach angle of 0°. 36 energies with spot sizes in air at the isocenter ranging from 3.35 to 2.49 mm for 126.8 to 189.8 MeV, and 37 energies with spot sizes in air at the isocenter ranging from 3.44 to 2.52 mm for 122 to 185.8 MeV were applied to the target. In total, 11,169 beam spots were obtained using a two-field simultaneous optimization approach.
The small spot-spacing planning strategy is a significant feature of the real-time compensated raster scanning. Therefore, a statistical analysis of the spot spacing of the spot scanning plan was carried out to assess the feasibility of the compensated raster scanning method. Figure 4 shows a histogram of the distance between two consecutive beam spots. Spots with a distance of more than 10 mm from subsequent spots were classified as the last bin. In the scanning simulation, the beam was turned off when the distance between two consecutive raster points exceeded 10 mm. It was apparent that 85% of the spots had a spacing of less than 6 mm, while the spot size of the beam at the Bragg Peak ranged between 8.11 mm at 122 MeV and 5.85 mm at 189.8 MeV for this case. These results indicate that most beam spots satisfied the requirement of sufficient spot overlap.
To perform a scanning simulation of the clinical plan using the developed simulation code, a plan converter to translate the beam spot weights to the absolute number of particles was developed. First, an optimized original DICOM RT plan was exported from the TPS. According to the absolute dosimetry calibration curve, the converter produced the absolute number of particles to be delivered to each beam spot. Second, with the same beam spill structure and scanning parameters as those mentioned above for the cubical target, the scanning irradiation was simulated through a spot-by-spot time integration of the spill and considered various time delays encountered in the actual beam delivery. A simulated log file was obtained by scanning simulation and was used to reconstruct the dose distribution of the simulated beam delivery. For raster scanning, in addition to the original raster points, an auxiliary point was added between each pair of sufficiently overlapping consecutive raster points. The corresponding number of particles of the added auxiliary points was assigned to account for the transient number of particles between the two original consecutive raster points. As such, the number of raster points used for dose calculation increased from 11,169 to 21,658 in the pelvic case. Finally, the actual number of irradiated particles after scanning simulation was converted to the corresponding weight. For raster scanning, the original RT plan file was modified according to the original raster points with modified weights, and auxiliary points with corresponding positions and weights were added. Only the weights had to be modified for spot scanning. The modified RT plan was then imported into RayStation to recalculate the dose distribution for the final dose evaluation. A flowchart of the scanning simulation for the clinical case is shown in Fig. 5.
We assessed the effectiveness of the real-time compensation method for raster scanning by comparing the original planning dose distribution with the recalculated dose distribution after scanning simulation. Given the similar dose distribution conformity and constraint requirements, the two scanning methods for the pelvic region case were compared. The 3D pass rate C [25] with a tolerance of 3 mm and 3% of the prescribed dose and a threshold of 10% of the prescribed dose was evaluated. We used the open-source platform REGGUI to calculate the c function [26].

Irradiation of a cubical target
To verify the effectiveness of the compensation method for raster scanning, scanning simulations with and without compensation were performed on a cubical target based on the results of a preliminary numerical study. Under fast and slow scanning scenarios, the dose distribution of the target and delivery time of spot and raster scanning were compared.

Effectiveness of compensated raster scanning
The effectiveness of compensated raster scanning was estimated by comparing the dose distribution along the beam axis with and without the compensation method. The dose distributions at the central YZ plane (X = 0 mm) without and with compensated raster scanning are shown in Figs. 6a and 6b, respectively, using a feasible beam intensity of 0.9 nA in the slow scanning scenario, and Fig. 6c shows the dose difference between the two cases.  As shown in Fig. 6a, the target was over irradiated, and the dose distribution was severely distorted. The compensated dose distribution shown in Fig. 6b was relatively homogeneous. As shown in Fig. 6c, when the compensation method was not adopted, the excess dose associated with the transient dose was delivered to the target, and the largest dose difference was found at the proximal end of the target. Thus, it was concluded that transient particles have to be considered and the compensation method for transient particles was very effective. Figure 7 shows how the homogeneity of the dose distribution and delivery time varied with the beam intensity for the two scanning techniques under fast and slow scanning scenarios. The homogeneity is plotted as a function of the beam intensity; the larger the homogeneity value, the worse the dose distribution. Given the same homogeneity requirement of 3% for a cubical target with a prescribed dose of 2 Gy (RBE), the maximum limited beam intensities corresponding to spot scanning and raster scanning were 0.8 and 2.3 nA, respectively, and the results are presented in Fig. 7a. Similarly, in the fast scanning scenario, the maximum limited beam intensities corresponding to spot scanning and raster scanning were 0.8 and 6.0 nA, respectively, as illustrated in Fig. 7b. From the perspective of delivery time, the corresponding maximum limited beam intensities were used for the two scanning techniques. The delivery time was shortened by 43% in the slow scanning scenario from 88.9 s with spot scanning to 50.7 s with raster scanning. The delivery time was shortened by 53.3% in the fast scanning scenario from 86.7 s with spot scanning to 40.5 s with raster scanning. It was observed that raster scanning performed better in the case of fast lateral scanning.

Comparison of two scanning techniques
The real-time compensation method for raster scanning was investigated in a cubical target, and the results demonstrated that the inhomogeneity of the dose distribution increased with an increase in beam intensity in all studied cases. The inhomogeneity increased faster in the spot scanning than in the compensated raster scanning. If the same constraint on homogeneity was imposed, the limited beam intensity for raster scanning was higher than that for spot scanning. Moreover, for raster scanning, the target was irradiated with a higher beam intensity in the faster scanning scenario than that in the slow scanning scenario. For spot scanning, no significant difference was observed in the limited beam intensity between the two scanning scenarios.

Irradiation of pelvic region case
In this section, scanning simulations using two different scan techniques and final dose evaluations are presented for the clinical pelvic case. The statistical analysis results of the spot spacing indicated that the transient particles delivered between two raster points could be compensated by the real-time compensation method. The dose distributions of the two scanning techniques under different beam intensities were calculated in the fast and slow scanning scenarios. The planned dose distribution was defined as the reference dose distribution, and the reconstructed dose distribution was defined as the evaluated dose distribution. Gamma passing criteria with a dose tolerance (DT) of 3% and a distance-to-agreement (DTA) of 3 mm were used to estimate the dose accuracy. In the fast scanning scenario, the gamma passing rate and delivery time of each field with the two scanning techniques under different beam intensities are shown in Tables 2 and 3. The time required to change the gantry angle was not considered.
As shown in Table 2, the gamma passing rate decreased quickly with an increase in beam intensity in spot scanning, whereas the deterioration trend in Table 3 for raster scanning was relatively slow. When the 95% passing rate was used as the constraint criterion for an respectively The absolute dose difference between the distribution of spot scanning and planned dose distribution and that between the distribution of raster scanning and planned dose distribution are illustrated in Figs. 8c and d, respectively. When the same passing rate was imposed, spot scanning exhibited a larger dose difference than that of raster scanning. The difference shown in Fig. 8c is related to the finite response time of shutting off the accelerator during spot scanning. Because a real-time compensated method was used, the reconstructed dose distributions after raster scanning simulation were almost identical to the planned dose distribution, except for the surface of the target, and the excess dose was associated with the spots located proximal to the target. Spots with a smaller number of particles were usually located in the proximal region of the target owing to the weighted superposition of the dose distribution. When these spots were irradiated with a beam intensity larger than I feasible , a more efficient irradiation of the target was achieved. Simultaneously, it is more likely that an excess dose will be delivered to the surface of the target within an acceptable dose error. Results similar to those of the fast scanning scenario were obtained for the slow scanning scenario. If the same dose distribution constraints were imposed, the maximum limited beam intensities for spot scanning and raster scanning were 0.3 and 1.1 nA, respectively, and the delivery time was shortened by 25.6% (47 s) in the slow scanning scenario from 183.5 s with spot scanning to 136.5 s with raster scanning.
Under the same passing rate constraint, the corresponding maximum limited beam intensity was used for both scanning techniques. Figure 9 shows the dose-volume histogram (DVH) curves of the pelvic case, where the solid, dotted, and dash-dot lines correspond to the DVH curves of the planned, spot scanning, and raster scanning doses, respectively. The simulated DVH curve (dotted and dash-dot lines) shifted to the right compared to the planned curve (solid line), and the DVH curve of spot scanning moved farther than that of raster scanning for the majority of dose grids, indicating that most of the target had received a higher dose with the spot scanning method. In addition, the D2% of PTV for planned dose distribution was 71.7 Gy (RBE), the D2% of PTV increased by 2.23% (73.3 Gy (RBE)) with spot scanning and 3% (73.9 Gy (RBE)) with raster scanning, where D2% represents the dose to 2% of the PTV. Nevertheless, the dose distribution obtained using the two scanning techniques satisfied the majority of the clinical planning goals. For this pelvic region case, the results showed that real-time compensated raster scanning alleviated the deterioration of the dose distribution and irradiated the target with a higher beam intensity to shorten the beam delivery time. Moreover, the effects of lateral scanning speed on the delivery time were also studied. We found that a high scanning speed was  more beneficial for raster scanning, whereas for spot scanning, there was no significant difference in the delivery time between the fast and slow scanning scenarios. Therefore, it can be concluded that raster scanning combined with a fast scanning system provides a more efficient scanning strategy.
In the simulation, the beam intensity was assumed to be constant. However, in clinical practice, the beam spill profile of a synchrotron varies from one spill to another. For a more accurate assessment of the raster scanning technique, a detailed spill structure should be considered in the scanning simulation. Furthermore, path optimization [28] was not performed for the clinical case in this study. In other words, integrating path optimization into the treatment plan design is likely to generate more spots with sufficient overlapping and meet the feasibility requirement. It is more beneficial for reducing the delivery time with raster scanning.
Generally, in a simple cubical target and the studied clinical case, comparable dose homogeneity can be achieved in a shorter time with raster scanning. A numerical study of the compensation method was carried out from a 2D perspective based on the assumption that the medium was homogeneous. In the treatment plan, the 3D target was divided into slices with the same water equivalent length. Owing to the inhomogeneity of a patient's anatomy, the positions of two consecutive spots within an isoenergy slice are not always adjacent in space. Nevertheless, the clinical case studied here proves that this geometrically nonadjacent effect is negligible. However, further investigation and statistical analysis for different clinical cases are needed, particularly for cases with heterogeneous media and complex anatomical interfaces. By combining more diverse clinical cases, we intend to evaluate more suitable cases for raster scanning in clinical routine. Whether in a clinical case or a simple phantom, the results based on simulations alone are far from sufficient and must be validated by experiments. A quick-response beam monitor and validation system are crucial for implementing this real-time compensation method in a machine. Currently, the beam monitor and validation system reported by Klimpki et al. [29,30] provides hardware support for monitoring the real-time dose information required for compensated raster scanning. Moreover, the correction of the dose monitor response is based on the collection efficiency and is crucial for accurate beam delivery, particularly in the case of high beam intensity [31]. The results of experiments and simulations will lead to the development of faster proton radiotherapy to alleviate the pressure on patients owing to prolonged immobilization.

Conclusion
To shorten the delivery time of active beam scanning and ensure the quality of dose distribution, a real-time compensation method that adapted a small spot-spacing planning strategy was designed based on the beam characteristics of a synchrotron system and the beam delivery characteristics of raster scanning. The developed simulation program was used to accurately simulate the scanning irradiation of a cubical target and clinical pelvic cases under various situations and to evaluate the corresponding dose distribution. The results showed that the real-time compensated raster scanning method completed irradiation in a shorter time and obtained a dose distribution in simple cubical target and clinical pelvic cases comparable to that of spot scanning. In addition, raster scanning was more efficient in a fast scanning scenario. It is very useful for improving the patient throughput capacity at particle therapy centers and the clinical application of time-consuming rescanning mitigation techniques to alleviate the impact of target movement.
Acknowledgements The authors thank the Department of Radiation Oncology, Shanghai Ruijin Hospital, for providing patient data.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons. org/licenses/by/4.0/.