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.