radiation therapy aims to deliver an ablative radiation dose to tumor targets while sparing the surrounding normal healthy tissue . while current development in radiotherapy machines enables focused radiation beams to be directed with high precision , anatomical motion during treatment causes misalignment between the external beam and the internal anatomy , compromising the treatment efficacy . therefore , it is important to reduce the impact of motion in radiotherapy . to achieve this goal , one aspect of the current invention synchronizes the treatment with anatomical motion , broadly known as “ tracking ”. the key idea behind tracking - based adaptive radiotherapy is to modify the treatment plan and reposition the beam to compensate for the anatomical motion . when rigid translational anatomical motion is assumed , there is a simple scheme to move the mlc to “ follow ” the target . when general motion is considered , however , a more sophisticated and systematic scheme is required for mlc adaptation . the most ideal situation would be performing a full - fledged re - planning in real - time . however , this is impractical due to heavy computation and the as - yet unresolved quality assurance issue . the problem of leaf arrangement for real - time intensity modulation has been studied quite intensively . the current invention applies a first order approximation to this ideal situation by adapting the mlc leaf configuration derived from a treatment plan to the instantaneous motion . the planned beam aperture is transformed with a collapsed transformation describing online motion on the beam - eye - view ( bev ) plane to generate a new aperture . however , motion could transform a deliverable beam aperture into quite complex shapes that are no longer deliverable , due to paired leaf structure with finite leaf resolution . more specifically , this occurs when a single leaf track intersects with multiple open apertures . referring now to the figures , fig1 a - 1 b show a schematic drawing of an mlc system 100 , where multiple leafs 102 are configured to provide at least one aperture 104 that is an optimization - based leaf sequencing methodology that outputs a deliverable leaf configuration that best approximates the ideal pattern . fig1 a shows an ideal aperture 104 is generated by translating a deliverable planned aperture by a fraction of the width of a leaf 102 . the single leaf track 106 in fig1 a is enlarged in fig1 b , which intersects two open apertures 104 . there exists no placement of the leaf 102 that could exactly realize this pattern . in fact , with the motion perpendicular to direction of the leaf 102 being a fraction of the width of the leaf 102 , no exact placement of the leaf 102 exists for any of the leaves 102 intersecting ideal aperture 104 . another challenge for tracking - based adaptive radiotherapy is the differential motion between tumor target and critical structures . the majority of existing studies for tracking based treatment adaptation are based on the assumption that the complete region of interest ( roi ) undergoes similar motion , so the relative anatomical configuration is maintained throughout treatment . the feasibility of this assumption very much depends on the site , where it is more valid for prostate but is questionable for treating thoracic tumors , which may move towards the spinal cord with respiration . therefore , it is desirable to have a leaf adaptation method that automatically accounts for the potential varying structural characteristics of the roi . this property is embedded naturally in the optimization aspect of the current invention . the current invention addresses the leaf sequencing problem described above in the presence of motion . according to one aspect , a plan aperture f and an estimated anatomical motion t are collapsed onto the bev following the methodology described above . the ideal motion - compensated aperture is given by composing the plan aperture with the collapsed bev motion g = f · t . according to the invention , this map is represented with a binary function over the roi : ω →{ 0 , 1 }, so that where x =( x , y ) denotes the beam element location in the bev . since leaf sequencing is of interest to approximate the desired beam pattern g , it suffices to consider the roi in the 2 - dimensional bev coordinate . without loss of generality , x - coordinate is aligned with the leaf tracking direction . let δ be the leaf resolution along y - direction and the complete aperture is covered by the range of n leaves , starting from y = 0 . the problem is restated as : finding the best n pairs of leading and trailing locations that delivers an aperture that is closest to the ideal beam pattern given by g . the leaf positions are parameterized as { α i l , α i t } where the subindex i = 1 , 2 , . . . , n indexes the leaf pair and the superscripts l and t indicate the leading and trailing leaf respectively . to rigorously define an optimization objective , the “ dose ” discrepancy between a deliverable aperture corresponding to { α i l , α i t } i = 1 n the desired beam pattern g are qualified . such a discrepancy is characterized as the sum of underdose and overdose cost . a pair of unitary underdose and overdose costs λu ( x ), λo ( x ) are associated with each voxel location , based on its tissue type and radio - sensitivity . if x belongs to tumor region , then the local underdose cost λu ( x ) should be high and the local overdose cost λo ( x ) should be low . conversely , for radiosensitive healthy tissues that should be prevented from radiation , λu ( x ) should be low and λo ( x ) high . a tumor voxel desired to be irradiated ( g ( x )= 1 ) but blocked by the delivered mlc pattern contributes an underdose cost λu ( x ) to the overall discrepancy ; conversely , a healthy tissue voxel desired to be shielded ( g ( x )= 0 ) but exposed by the delivered mlc pattern contributes an overdose cost λo ( x ) to the overall discrepancy . fig2 shows a schematic of the leaf fitting setup 200 . assume the leaf tracks are of widths δ , then the underdose cost for leaf track i is given by : φ i , u =∫ x : xε [ l , α i l )∪( α i t , r ], yε [( i − 1 ) δ , iδ λ u ( x ) g ( x ); φ i , o =∫ x : xε ( α i t , α i t ), yε [( i − 1 ) δ , iδ λ o ( x )( 1 − g ( x ); to reveal the dependence of φi , o and φi , u on the parameters { α i l , α i t }, the indicator function i is invoked : φ i , u =∫ x : yε [( i − 1 ) δ , iδ ) λ u ( x ) g ( x )[ i ( α i l − x )+ i ( x − α i t )]; φ i , o =∫ x : yε [( i − 1 ) δ , iδ ) λ o ( x )( 1 − g ( x ) i ( x − α i l )( α i t − x ). the objective is to find { α i l , α i t } to minimize the overall objective : for simplicity , the leaf velocity condition is ignored in the introduction of basic formulation , where this condition can be incorporated by imposing constraints on the optimization problem . in the absence of any additional constraint , the summation form of the objective function enables decoupled optimization for each leaf pair , i . e ., it suffices to minimize from here , a specific leaf track is studied and all integrations are restricted to this range . note that φ i , u =∫ x : yε [( i − 1 ) δ , iδ ) λ u ( x ) g ( x )[ i ( α i l − x )+ i ( x − α i t )]; φ i , o =∫ x : yε [( i − 1 ) δ , iδ ) λ o ( x )( 1 − g ( x ) i ( x − α i l )( α i t − x ). indicate that the integrand depends on the y coordinate via λ and g , which is independent of the parameters { α i l , α i t }. this observation allows one to first integrate along the y - direction , and reduces the problem to a 1 - dimensional optimization . more specifically , for each leaf track i , one can define the corresponding 1d function c i , u ( x )=∫ ( i − 1 ) δ iδ λ u ( x ) g ( x ) dy c i , o ( x )=∫ ( i − 1 ) δ iδ λ o ( x )( 1 − g ( x ) dy . φ u , i =∫ c i , u ( x )[( i ( α i l − x )+ i ( x − α i t )] dx φ o , i =∫ c i , o ( x ) i ( x − α i l ) i ( α i t − x ). it can be shown with simple arithmetic manipulation that minimizing φ i is equivalent to minimizing ψ i =∫ α i l α i t [− c i , u ( x )+ c i , o ( x )] dx . then the first order necessary condition for optimality is given by in addition , φ i needs to be locally convex at the optimal { α i l , α i t }. fortunately , the leading and trailing leaf positions are only related by the constraint that ( α i l & lt ; α i t ), and otherwise decoupled . this implies a diagonal hessian matrix when φ i is twice differentiable , and the positive - definiteness of the hessian reduces to the positiveness of the diagonal elements these analyses induce some observations for the behavior of the 1d function c i which are interpreted as the competing strength of local underdose and overdose cost . these observations include : both α i l and α i t fall on the zero - crossings of c i . c i moves upwards at α i l , indicating that underdose cost starts to dominate overdose at the leading leaf position . this is expected as the transition from the normal tissue region to the target region occurs . c i moves downwards at α i t , indicating that overdose cost starts to dominate underdose at the trailing leaf position . this marks the transition from the target region to the normal tissue region along the leaf track . a general observation from combining the above is that tumors with large local underdose cost drive the aperture open to ensure its coverage , and normal tissue regions with high overdose cost shall be shielded with the leaves . a similar perturbation principle applies to cases when c is nondifferentiable , and yields the following results : where − and + indicate a small perturbation in the negative and positive directions respectively . the zero - crossing conditions are implied by the continuity of the function c and thus dropped for simplicity . a semi - exhaustive algorithm for general inhomogeneous cost is presented in algorithm 1 below : compute id functions c i , u , c i , o ( 4 ) and c i = c i , u − c i , o . find set c i l = { x : i ( c ( x + δ )) i (− c ( x − δ )) = 1 }. find set c i t = { x : i ( c ( x + δ )) i (− c ( x − δ )) = 1 }. initialize { circumflex over ( α )} i l = 0 , { circumflex over ( α )} i t = 0 ; { circumflex over ( φ )} i = φ i ( α i l , α i t ). for α i t ∈ c i t and α i t & gt ; α i l do { tilde over ( φ )} i = φ i ( α i l , α i t ). { circumflex over ( α )} i l = α i l , { circumflex over ( α )} i t = α i t ; { circumflex over ( φ )} i = { tilde over ( φ )} i {{ circumflex over ( α )} i l , { circumflex over ( α )} i t } i = 1 n provides optimal leaf positions . as a special case , homogeneous unitary underdose and overdose cost may be assigned across the roi . this occurs when insufficient structural information can be used for a localized assignment . the homogeneous assumption , λu ( x )= λu and λo ( x )= λo , can be used to further reduce the complexity of the general algorithm by pulling the constants out of the integrations , resulting in algorithm 2 below : compute 1d functions l i ( x ) = ∫ ( i − 1 ) δ iδ g ( x ) dy . initialize { circumflex over ( α )} i l = 0 , { circumflex over ( α )} i t = 0 ; { circumflex over ( φ )} i = φ i ( α i l , α i t ). for α i t ∈ c i and α i t & gt ; α i l do { tilde over ( φ )} i = φ i ( α i l , α i t ). { circumflex over ( α )} i l = α i l , { circumflex over ( α )} i t = α i t ; { circumflex over ( φ )} i = { tilde over ( φ )} i {{ circumflex over ( α )} i l , { circumflex over ( α )} i t } i = 1 n provides optimal leaf positions . to demonstrate the behavior of the optimization method according to the current invention , two illustrative examples are presented , one that demonstrates the effect of inhomogeneous underdose and overdose cost on leaf sequencing ; and another presents the adaptation of an imrt plan when the roi undergoes rotational motion . in this first example , the behavior of the leaf sequencing method is demonstrated in the presence of differential motion between tumor target and surrounding critical structures . an anatomy having a spherical tumor target and an arc - shaped critical structure is simulated . a reference plan is generated when the tumor target is relatively far from the critical structure . inhomogeneous underdose and overdose unitary cost is assigned according to the discussion above , with a high overdose cost assigned to the critical structure . during the simulated treatment process , when the tumour target approaches the critical structure , both the reference plan and the monitored tumour target motion are streamlined into the leaf sequencing algorithm . at each time instant , the ideal aperture is generated as the composition of the initial plan with the target motion . fig3 a - 3 d show snapshots of the evolution of a simulated anatomy 300 having a tumor 302 , and automatically generated leaf patterns 304 for a case with a high critical structure 306 overdose cost . this example mimics the differential motion between lung tumors and the adjacent spinal cord . rotations exceeding 45 degrees for lung tumors and 30 degrees for prostate tumors severely compromise dose delivery . when imrt treatment is adapted to roi rotations of such magnitude , the composite ideal aperture is highly likely to be nonconvex along certain leaf tracks , making the beam pattern undeliverable and necessitates a tradeoff between tumor underdose and normal tissue exposure . to illustrate this scenario , assume the only input to the tracking system is the planned imrt aperture and global rotational information , which can be obtained from electromagnetic tracking or real - time imaging . fig4 a - 4 b shows the original imrt plan aperture 400 and an ideal aperture shape 402 corresponding to 90 degree rotation , where the choice of 90 degree rotation angle is merely for the convenience of visualization . since the rotated aperture 402 shape cannot be delivered by the mlc , various underdose / overdose tradeoff results in different aperture patterns that are deliverable . the parameter κ = λo /( λo + λu ) describes such a tradeoff . as the unitary underdose cost increases relative to the overdose cost , the optimal aperture pattern tends to be more tolerant towards overdosing the normal regions to ensure target coverage . as shown , fig4 c - 4 e are the optimal deliverable apertures with corresponding κ parameter , and fig4 f - 4 h are the optimal deliverable aperture overlays with the ideal rotated apertures . further shown are the corresponding overdose 404 and underdose 406 regions . the optimization principles of the current invention provide a systematic method to understand and make explicit decisions about the tradeoffs between tumor underdose and normal tissue overdose , when the ideal beam pattern is undeliverable . when the ideal pattern is deliverable , the solution to the optimization problem coincides with it regardless of the specific assignment of tradeoff . the objective function value corresponding to the optimal solution indicates the minimal amount of delivery discrepancy using the mlc . therefore , this value can be used to determine whether to pause the treatment beam to trade efficiency for higher dose conformality . by the same token , the optimization principle of the current invention can be naturally extended to incorporate other levels of tradeoff and result in a benign hybrid optimization problem . additional physical considerations such as limited leaf velocity can be naturally incorporated into the invention by modifying the optimization setup with proper constraints . in principle , the underdose / overdose unitary cost needs to be assigned based on tissue property ( tumor vs . normal tissue , parallel or serial , radiosensitivity , etc ). in practice , such information is often known approximately . despite this uncertainty , assigning inhomogeneous underdose and overdose unitary costs guides the sequencing algorithm towards a leaf configuration that offers improved tumor coverage and normal tissue protection . accumulative dose discrepancy may also be incorporated by assigning a higher underdose unitary cost to voxels that have received lower dose than desired up to the time point of consideration , and conversely assigning a higher overdose unitary cost to voxels that are already overdosed . this mechanism would have a negative feedback feature to potentially prevent systematic underdose and / or overdose . the current invention includes adapting an optimized plan aperture to the instantaneous motion . this setup alleviates the burden of mlc modeling such as accounting for the tongue and grove effect , as they are implicitly incorporated in the treatment planning process . similarly , starting from a treatment plan also relieves one of the task of sequencing mlc leaves and optimizing their velocities to achieve a desired intensity modulation , and allows one to focus on investigating the adaptation of an aperture under deformation . two components contribute to the overall computation complexity of the proposed algorithm : ( 1 ) the numerical integration to yield c i ( or l i in the homogeneous cost case ) and ( 2 ) the search routine for the optimal placement . for the general inhomogeneous case , the numerical integration has a complexity proportional to the computation resolution in the bev ( nx × ny ), where nx and ny are the discretization levels along and perpendicular to the leaf track respectively . the semi - exhaustive search scheme for optimal leaf placement has a complexity of ˜ o ( n x 2 ). with the relatively thin leaves and the overdose and underdose cost to be reasonably smooth , it is often the case that ny & lt ;& lt ; nx and the overall computation is dominated by ˜ o ( n x 2 ). homogeneity of the unitary overdose / underdose cost and / or other structural assumptions ( such as local convexity of the aperture ), when utilized wisely , may further reduce the computation complexity . in summary , the current invention is a new optimization - based leaf adaptation methodology that explicitly penalizes underdose / overdose error . this method is generally applicable to all types of geometrical and topological changes of the anatomy , as well as various plan types . the present invention has now been described in accordance with several exemplary embodiments , which are intended to be illustrative in all aspects , rather than restrictive . thus , the present invention is capable of many variations in detailed implementation , which may be derived from the description contained herein by a person of ordinary skill in the art . for example it is applicable when the initial plan is optimized with respect to a mlc geometry set that is different from the delivery mlc , ( e . g ., superresolution plan or conventional plan to be delivered with a finer mlc ). tongue and groove effect as well as delivery leakage can be naturally incorporated via substituting the indicator functions described above to more specific leaf geometry descriptors . all such variations are considered to be within the scope and spirit of the present invention as defined by the following claims and their legal equivalents .
a method of multileaf collimator leaf positioning in tracking - based adaptive radiotherapy is provided . the method includes determining a radiotherapy beam pattern by transforming a treatment beam plan into radiotherapy beam coordinates , determining a dose discrepancy between the radiotherapy beam pattern and a deliverable mlc aperture , where the dose discrepancy includes a sum of an overdose cost and an underdose cost to a treatment volume , and minimizing the dose discrepancy , where the dose discrepancy minimization provides a determined deliverable mlc aperture for the radiotherapy beam .