A method for precise localization of radiotherapy lesions

By generating the current virtual respiratory state and constructing a structurally stable weighted graph, combined with local structural representation, the precise localization of radiotherapy lesions under complex respiratory conditions was achieved, solving the problem of localization deviation in existing technologies and improving localization accuracy and stability.

CN122141148BActive Publication Date: 2026-07-17NANJING FIRST HOSPITAL

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NANJING FIRST HOSPITAL
Filing Date
2026-05-08
Publication Date
2026-07-17

AI Technical Summary

Technical Problem

Existing methods for lesion localization in radiotherapy are prone to localization errors when respiratory rhythm changes and image quality is unstable, especially in the treatment of thoracic and upper abdominal tumors, where there is a lack of effective means of precise localization that combines external respiratory signals with local structures.

Method used

By acquiring 4D images from the planning period, current location images, and external respiratory signal sequences, the current virtual respiratory state is generated, and a state reference set and structural stability weight map are constructed. Trajectory consistency matching and location correction of lesion candidate regions are performed in combination with local structural representation. Trajectory consistency location results are generated by using the joint discrimination of external respiratory signals and internal structures.

Benefits of technology

It improves the accuracy and stability of radiotherapy lesion localization, reduces the impact of respiratory baseline drift and deformation, and enhances localization adaptability under complex respiratory conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122141148B_ABST
    Figure CN122141148B_ABST
Patent Text Reader

Abstract

This application relates to the field of medical image processing technology and discloses a method for precise localization of radiotherapy lesions. The method acquires 4D images during the planning period, the current localization image, an external respiratory signal sequence acquired synchronously with the current localization image, and positioning correction results. It performs time window characterization processing on the external respiratory signal sequence to generate the current respiratory virtual state. In the 4D images during the planning period, it constructs a state reference set corresponding to each respiratory state around the planned lesion area and forms a structural stability weight map. In the current localization image, it determines the lesion candidate area, extracts local structural characterization, and performs state matching with the state reference set under the constraint of the structural stability weight map. It outputs the structural consistency result and local displacement corresponding to each respiratory state. Then, it jointly judges the current respiratory virtual state and the structural consistency result to form a trajectory consistency score, and obtains the trajectory consistency localization result and localization confidence.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of medical image processing technology, and in particular to a method for precise localization of radiotherapy lesions. Background Technology

[0002] In radiotherapy for thoracic tumors, liver tumors, and upper abdominal lesions, the accuracy of pre-treatment localization directly affects the setting of the irradiation range and the protection of normal tissues. Since these lesions usually shift periodically with respiratory movements, 4D imaging, CBCT, projection images, and surface respiratory monitoring are commonly used in clinical practice to assist in localization. Among existing technologies, one approach mainly infers the current respiratory state of the lesion based on the phase label, peak and valley positions, or gating intervals of external respiratory signals. Another approach mainly relies on the image matching results between the current localization image and the planning reference image to determine the lesion location. These approaches can achieve certain results when the respiratory rhythm is relatively stable and the image boundaries are relatively clear, and they are quite common in practical applications. For example, in the context of conventional lung radiotherapy localization, determining the end of inspiration or expiration through surface respiratory band signals and then verifying the location using the current CBCT image has become a relatively mature processing path.

[0003] However, real-world treatment scenarios are often far more complex than ideal. Patients' respiratory amplitude, baseline, and inspiratory and expiratory rhythms frequently change between the planning period and the day of treatment, and before and after treatment. Even when surface respiratory signals appear similar, internal lesions may not be in the same location. Furthermore, CBCT images are susceptible to scattering artifacts, localized low contrast, and respiratory blurring. Relying solely on a single respiratory phase label or image matching result can easily lead to localization errors. For example, a patient may breathe deeply and rhythmically during the planning scan, but before treatment, tension or changes in posture may cause shallower breathing accompanied by slight baseline drift. Even if the surface respiratory signal still falls within the original phase interval, the true correspondence of the local structures around the lesion may have shifted. For example, when the lesion is near the diaphragm, pleura, or areas with complex vascular patterns, the local boundary shows significant differences under different respiratory states. If all local structures are treated equally, low-stability areas and noise areas may interfere with the final localization judgment. It can be seen that the existing technology still lacks a precise method for radiotherapy lesion localization that can both use external respiratory signals to provide current state constraints and combine local stable anatomical structures to complete internal consistency verification, and make limited corrections when the results are not reliable enough. Summary of the Invention

[0004] This application proposes a method for precise localization of radiotherapy lesions to address the problems mentioned in the background art.

[0005] To achieve the above objectives, this application adopts the following technical solution: a method for precise localization of radiotherapy lesions, comprising the following steps:

[0006] S1: Acquire the 4D image during the planning period, the current positioning image, the external respiratory signal sequence acquired synchronously with the current positioning image, and the positioning correction results. Perform time window characterization processing on the external respiratory signal sequence near the current positioning time to generate the current respiratory virtual state.

[0007] S2, In the 4D images during the planning period, the planned lesion area is determined, and a state reference set corresponding to each respiratory state is constructed around the planned lesion area. A structural stability weight map is formed based on the cross-state stability of local structures under each respiratory state.

[0008] S3. Based on the positioning correction results and the corresponding position of the planned lesion area in the current positioning image, determine the candidate lesion area, extract the local structural representation of the candidate lesion area, and perform state matching with the state reference set under the constraint of the structural stability weight map, and output the structural consistency results and local displacements corresponding to each respiratory state.

[0009] S4. Perform joint discrimination between the structural consistency results corresponding to each breathing state and the current virtual breathing state. Assign trajectory consistency scores to each breathing state according to the degree of fit between the current dimensionless baseline offset and the corresponding state interval of each breathing state, and the degree of fit between the current breathing direction and the corresponding direction identifier of each breathing state. Organize the trajectory consistency scores corresponding to each breathing state into a trajectory consistency score sequence.

[0010] The respiratory states are sorted according to the trajectory consistency score sequence. The respiratory state with the highest score is selected as the target respiratory state. The local displacement corresponding to the target respiratory state is used to correct the position of the lesion candidate area to obtain the trajectory consistency localization result. Then, the localization confidence is generated based on the difference between the optimal trajectory consistency score and the second-best trajectory consistency score. When the localization confidence is lower than the confidence threshold, the respiratory state corresponding to the current virtual respiratory state and its adjacent respiratory states before and after it are determined as the state neighborhood. Rematch correction is initiated in the state neighborhood to update the trajectory consistency localization result and the localization confidence.

[0011] In the trajectory consistency score generation stage, the formula is as follows: ; Indicates an index for any respiratory state; Indicates the first A consistent score is given for each breathing state corresponding to the trajectory. Indicates the first The structural consistency results corresponding to each respiratory state are used to characterize the candidate lesion region in the current localization image and the first respiratory state. The degree of structural fit between local reference structural images corresponding to each breathing state; Represents the natural exponential function; This indicates the current dimensionless baseline offset; Indicates the first The reference dimensionless baseline offset of each respiratory state corresponding to the state interval; This indicates the baseline offset matching bandwidth, and Greater than 0; Indicates the reward coefficient for consistent breathing direction; This indicates the direction consistency indicator, when the current breathing direction is consistent with the first... When the directional indicators corresponding to each breathing state are consistent Take 1, when the current breathing direction is the same as the first... When the directional indicators corresponding to different breathing states are inconsistent Take 0.

[0012] Furthermore, the specific operation of the time window representation processing is as follows: around the current positioning time, a continuous respiratory fluctuation segment is extracted from the external respiratory signal sequence as the current time window, and the external respiratory signal sequence within the current time window is subjected to de-peaking and smoothing.

[0013] Baseline information and amplitude range information are extracted. The offset of the respiratory signal value corresponding to the current positioning time relative to the baseline information is converted into percentile normalization according to the amplitude range information to obtain the current dimensionless baseline offset. Then, the baseline information, amplitude range information and the current dimensionless baseline offset are organized into a respiratory state description vector.

[0014] Furthermore, the specific operation for generating the current virtual breathing state is as follows: extract the trend of breathing signal changes near the current positioning time within the current time window, and determine the current breathing direction based on the first-order difference sign;

[0015] When the current positioning time is in the breathing transition zone, the breathing direction corresponding to the previous stable time is called as the current breathing direction. Then, the breathing state description vector and the current breathing direction are mapped together to the corresponding state interval in the planning breathing state division rule to obtain the current breathing virtual state.

[0016] Furthermore, the specific operation for forming the state reference set is as follows: in the planning period 4D images, the planned lesion area is determined, and local reference structure images covering the transition area of ​​the lesion boundary and the surrounding stable anatomical structure area are cut around the planned lesion area.

[0017] Organize corresponding local reference structure images according to each respiratory state to form a state reference set;

[0018] When the current localization image is a CBCT reconstructed image, voxel resampling is performed on the local reference structure images in the state reference set. When the current localization image is a projection image, digital reprojection is performed on the local reference structure images in the state reference set, so that the state reference set and the current localization image are in the same observation field.

[0019] Furthermore, the specific operation for forming the structural stability weight map is as follows: perform local gradient alignment, edge continuity comparison and texture fluctuation suppression processing on the local reference structural images corresponding to adjacent breathing states in the state reference set, extract local structural regions that maintain continuous stability across states, organize the stability of local structural regions into a local structural stability sequence, and then assign weights to each image position according to the local structural stability sequence to form a structural stability weight map.

[0020] Furthermore, the specific operation of determining the candidate lesion region and constructing the local structural representation is as follows: based on the positioning correction results, the planned lesion region is mapped onto the current positioning image to determine the candidate lesion region;

[0021] In the candidate lesion region, the structural tensor orientation consistency extraction method is used to obtain local texture stability features, and the scale normalized gradient boundary response extraction method is used to obtain local boundary response features. Then, the local texture stability features and local boundary response features are fused into a local structural representation.

[0022] Furthermore, the specific operation to obtain the structural consistency results and local displacements corresponding to each respiratory state is as follows: within the local search range established around the center of the lesion candidate region, a weighted constraint is applied to the local structural representation using the structural stability weight map, and local matching is performed with the local reference structural images corresponding to each respiratory state in the state reference set.

[0023] The optimal matching result under each respiratory state is determined as the corresponding structural consistency result, and the positional offset of the optimal matching position relative to the center of the lesion candidate region is determined as the corresponding local displacement.

[0024] When the current positioning image is a projection image, the positional offset in the projection plane is converted into an equivalent local displacement in the patient coordinate system according to the imaging geometry parameters.

[0025] Furthermore, the specific operations for performing rematch correction and updating the localization output are as follows: around the position of the trajectory consistency localization result before rematch correction, a new local search range is established in the state neighborhood, and local matching is performed again on the local reference structure image corresponding to each breathing state in the state neighborhood. The structural consistency result and local displacement corresponding to each breathing state in the state neighborhood are updated. Then, the trajectory consistency score sequence is regenerated, the target breathing state is re-determined, and the trajectory consistency localization result and localization confidence are updated according to the updated local displacement.

[0026] The beneficial effects of this invention are as follows:

[0027] This invention constructs a virtual respiratory state around the current positioning time, transforming the current dimensionless baseline offset and current breathing direction in the external respiratory signal sequence into state constraint information that can be directly used for positioning discrimination. This reduces the interference of respiratory baseline drift and inspiratory / expiratory hysteresis on the positioning results. Simultaneously, a state reference set is constructed centered on the planned lesion region, forming a structural stability weight map. This ensures that subsequent state matching prioritizes stable local structural regions across respiratory states, which helps suppress the influence of respiratory deformation-sensitive regions, low-stability boundary regions, and noise regions on structural consistency results. Furthermore, the current virtual respiratory state is jointly discriminated against with the structural consistency results corresponding to each respiratory state to generate a trajectory consistency score. Positioning confidence is formed based on the discriminative power of the trajectory consistency score. When positioning confidence is insufficient, re-matching correction is performed only within the state neighborhood. This improves the stability and reliability of trajectory consistency positioning results while maintaining the continuity of respiratory state constraints. Therefore, this invention enables more precise identification of lesion locations in pre-radiotherapy positioning scenarios, improving positioning accuracy, reducing the risk of mismatches, and enhancing adaptability under complex respiratory conditions. Attached Figure Description

[0028] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort:

[0029] Figure 1 This is a flowchart of the method of the present invention;

[0030] Figure 2 This is the S3 flowchart of the present invention. Detailed Implementation

[0031] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0032] Example

[0033] like Figure 1 and Figure 2 As shown, this invention discloses a method for precise localization of radiotherapy lesions, including the following specific steps:

[0034] In one embodiment, S1 is used to generate the current virtual respiratory state. This step acquires the planning period 4D image, the current positioning image, the external respiratory signal sequence acquired synchronously with the current positioning image, and the positioning correction result. The planning period 4D image is used to provide a reference basis for the subsequent respiratory state. The current positioning image corresponds to the internal anatomical observation results at the current time before treatment. The external respiratory signal sequence is used to characterize the respiratory drive changes near the current positioning time. The positioning correction result is acquired and retained synchronously in this step and used to determine the lesion candidate area in subsequent steps.

[0035] Here, the external respiratory signal sequence only serves as a state constraint and does not directly participate in lesion location regression. The reason for this is that although there is a correlation between surface respiratory drive and internal lesion movement, the two do not have a strict one-to-one correspondence. Once there is respiratory baseline drift, inspiratory and expiratory retardation, or asynchronous movement between the surface and internal parts of the body, relying solely on surface signals to directly regress to the lesion location can easily introduce systematic bias. In this implementation, the external respiratory signal sequence is first converted into the current virtual respiratory state, and then used in conjunction with internal image structural evidence in subsequent steps. This allows the surface state constraint and internal structure verification to be assigned to their respective appropriate processing positions.

[0036] When establishing the current time window around the current positioning time, the current time window is a continuous respiratory fluctuation segment extracted from the external respiratory signal sequence, centered on the current positioning time. The current time window preferably covers two complete respiratory cycles. When the respiratory rhythm fluctuates slightly, it can be extended to cover one to three complete respiratory cycles. This setting is based on reality: if the time window is too short, the baseline information and amplitude range information are easily affected by single respiratory fluctuations, resulting in instability of the current dimensionless baseline offset; if the time window is too long, the respiratory state at an earlier time will be introduced into the state judgment at the current positioning time, reducing the sensitivity to respiratory drive changes near the current positioning time. For adult chest and abdominal radiotherapy positioning scenarios, the common respiratory cycle is usually in the range of 2s to 6s. Therefore, the duration of the current time window is preferably controlled between 4s and 12s, and more preferably between 6s and 10s. This range can cover the complete respiratory fluctuations without significantly weakening the real-time performance of the pre-positioning state judgment.

[0037] After the current time window is established, peak removal and smoothing are performed on the external respiratory signal sequence within the current time window. Specifically, any one of median filtering, moving average filtering, or low-order low-pass filtering can be used. Peak removal is used to remove short-term jitter of the body surface sensor, occasional contact interference, and isolated abnormal peaks. Smoothing is used to reduce high-frequency noise, making subsequent baseline information extraction and respiratory direction determination more stable. It should be noted that the original dimension of the external respiratory signal sequence may be displacement, pixel displacement, or sensor voltage value. The above peak removal and smoothing will not change its original dimension. Its output is still a respiratory signal sequence with the same dimension as the original signal. Therefore, if it is to be used for state discrimination between different treatment days or different devices, dimensionless processing must be performed further.

[0038] In the dimensionless processing section, percentile normalization is preferably used to convert the external respiratory signal sequence to obtain the current dimensionless baseline offset. Specifically, within the current time window, baseline information and amplitude range information are extracted from the external respiratory signal sequence after peak removal and smoothing. The baseline information is preferably the median value of the signal within the current time window, and the amplitude range information is preferably the difference between the 95th percentile and the 5th percentile. Using the median value as the baseline information can reduce the pulling effect of a few outliers on the baseline position. Using the difference between the 95th percentile and the 5th percentile to represent the amplitude range information can avoid being too sensitive to isolated abnormal peaks and valleys when directly using the maximum and minimum values. Based on the above baseline information and amplitude range information, the offset of the respiratory signal value corresponding to the current positioning time relative to the baseline information is converted by percentile normalization to obtain the current dimensionless baseline offset.

[0039] After this conversion, the external respiratory signal, which originally had the dimensions of displacement, voltage, or pixel displacement, is converted into a dimensionless state quantity. Only after this conversion is completed can the degree of respiratory offset at the current positioning time be used as a state input under a unified scale to participate in the generation of the current virtual respiratory state. In other words, the current dimensionless baseline offset is not the original external respiratory signal value itself, but the result of normalizing the original external respiratory signal value after the baseline information and amplitude interval information within the current time window.

[0040] After obtaining the current dimensionless baseline offset, the baseline information, amplitude range information, and the current dimensionless baseline offset are organized into a respiratory state description vector. The purpose of setting the respiratory state description vector is to organize the state information required for the subsequent generation of the current respiratory virtual state into a unified input structure. After this processing, the surface respiratory drive changes near the current positioning time no longer participate in the state judgment in the form of scattered signal points, but participate in the subsequent mapping process as structured state information with clear physical meaning. This helps to reduce the impact of single sampling point jitter or short-term local fluctuations on the state judgment.

[0041] The current breathing direction is determined using a first-order differential sign determination method. The purpose is to determine whether the breathing signal near the current positioning time is in the inspiratory or expiratory branch. In practice, short sampling segments can be selected before and after the current positioning time, and the changing trends of the external breathing signal sequence can be compared differentially. If the difference result is positive, the current breathing direction is determined to be inspiratory; if the difference result is negative, the current breathing direction is determined to be expiratory. Considering that the rate of change of the breathing signal near the end of inspiration and the end of expiration is low, directly relying on the difference result of a single sampling point can easily cause directional jitter. Therefore, when the current positioning time is in the breathing transition zone, the previous stable time is used. The corresponding breathing direction is used as the current breathing direction. The determination of the breathing transition zone can be completed by the average change amplitude in a short period of time near the current positioning time. Preferably, the average change amplitude is lower than 2% to 5% of the amplitude range information as the transition zone determination condition. This range fits the actual characteristics of the breathing waveform: when the determination threshold is lower than 2%, equipment noise and slight disturbances may still cause the direction to frequently reverse; when the determination threshold is higher than 5%, the breathing trend that has entered the real inhalation or exhalation stage may be over-classified into the transition zone, reducing the resolution of the direction determination. By introducing the current breathing direction, it is possible to distinguish state points with similar amplitudes but in different inhalation and exhalation branches.

[0042] Based on the obtained respiratory state description vector and current respiratory direction, the current virtual respiratory state is generated according to the planned respiratory state division rules. These rules are preferably pre-formed during the planned 4D image construction phase and include at least: segmented intervals of the complete respiratory process in the normalized state space, and the corresponding directional identifiers for each segmented interval. The number of respiratory states is preferably set to 8 to 10. If the number of states is less than 8, the discrete precision between adjacent states is insufficient, making it difficult to fully distinguish subtle differences in the respiratory process within the planned 4D image. If the number of states is greater than 10, the stability of image samples under a single state and the robustness of subsequent matching are prone to decrease. After mapping the respiratory state description vector and the current respiratory direction to the corresponding state interval in the respiratory state division rule during the planning period, the current virtual respiratory state can be obtained. The "virtual" here emphasizes that the state is not directly measured from the location of the internal lesion, but is the state constraint result obtained by the external respiratory signal sequence near the current positioning time after time window characterization processing. Since this result introduces the current dimensionless baseline offset and the current respiratory direction at the same time, it can reflect the surface respiratory drive characteristics near the current positioning time more accurately than the method of using only phase labels or fixed gating intervals. It is especially adaptable when dealing with respiratory baseline drift, inspiratory and expiratory lag and irregular breathing.

[0043] S1 involves generating a virtual respiratory state that can be used for subsequent joint discrimination by coordinating the current time window, the current dimensionless baseline offset, the current breathing direction, and the planning period breathing state division rules. In existing processing methods, it is common to directly use the phase label, peak and valley positions, or fixed gating thresholds of external respiratory signals to characterize the respiratory state. This method is effective when the respiratory rhythm is stable, but it is prone to problems such as inconsistency between the surface state and the internal lesion state when baseline drift and inspiratory and expiratory lag exist. This implementation does not directly use the external respiratory signal sequence for lesion location calculation, but first converts it into a virtual respiratory state, and then uses it in conjunction with local image structural evidence in subsequent steps. After this processing, the surface signal is responsible for providing the current state constraint, and the internal image is responsible for providing the structural verification result. The two jointly support the generation of trajectory consistency positioning results in subsequent steps, so as to more effectively solve the problem of inconsistency between the surface respiratory monitoring results and the actual movement state of the internal lesion in the existing technology, which leads to positioning deviation.

[0044] To ensure the reliability of the output results in this step, it is also necessary to provide processing constraints for abnormal scenarios. When the amplitude of the external respiratory signal sequence within the current time window is significantly insufficient and the baseline information and amplitude range information cannot be stably extracted, it is preferable to re-acquire the external respiratory signal sequence or extend the current time window. When the length of the missing continuous signal within the current time window exceeds 10% of the total length of the current time window, it is preferable to determine that the current external respiratory signal sequence does not meet the state generation conditions and trigger re-acquisition. For short-term coughing, swallowing, and sudden disturbances on the body surface, peak removal and smoothing can usually eliminate their effects. If the disturbance persists, it is preferable to re-acquire the current positioning image and the external respiratory signal sequence to ensure that the current virtual respiratory state output by S1 matches the real respiratory drive state near the current positioning time.

[0045] In one embodiment, S2 receives the planning period 4D image and the current positioning image, and determines the planned lesion area in the planning period 4D image. The planned lesion area can directly call the lesion delineation result that has been completed and confirmed by the doctor during the radiotherapy planning stage. If the delineation result is based on the reference respiratory state image of the planning CT or the planning period 4D image, the delineation result is mapped to the corresponding respiratory state image of the planning period 4D image using a registration method. The registration and mapping here are supporting prior art. Their function is to stably place the planned lesion area into the coordinate system of the planning period 4D image, providing a spatial reference for the subsequent extraction of local reference structure images.

[0046] After the planned lesion area is determined, local reference structural images corresponding to each respiratory state are extracted around the planned lesion area to form a state reference set. The extraction range of the local reference structural images is not limited to the lesion itself, but also covers the transition area of ​​the lesion boundary and the surrounding stable anatomical structure area. There is a clear reason for this: if subsequent state matching relies solely on the lesion itself, it is easily affected by local deformation of the lesion, low-contrast boundaries, and noise. Including stable vascular textures, bronchial interfaces, pleural interfaces, or soft tissue boundaries near the lesion boundary can provide more stable local structural anchors for subsequent matching. In the case of chest and upper abdominal radiotherapy, the outward expansion range of the local reference structural images can be set to extend 8mm to 20mm outward from the outer edge of the planned lesion area, of which 10mm to 15mm is more suitable for most localization images. When the expansion range is less than 8mm, there are not enough stable structures in the local reference structural images that can be anchored; when the expansion range is greater than 20mm, large-scale unstable tissue movements caused by respiration are more likely to be mixed in, which will interfere with subsequent state matching.

[0047] After the local reference structure images are extracted, the local reference structure images corresponding to each breathing state are organized in order of state index according to the planning breathing state division rules to form a state reference set. The state reference set is a group of reference images that have been bound to the correspondence between local reference structure images of breathing states. The direct effect of this organization is that after S1 outputs the current virtual breathing state, S3 and S4 can directly call the corresponding local reference structure images according to the breathing state index without having to rebuild the mapping relationship between state and image again. The whole process chain is more compact and the data connection is clearer.

[0048] After the state reference set is formed, the inconsistency in the observation domain between the planned 4D image and the current localization image needs to be addressed. If the current localization image is a CBCT reconstructed image, voxel resampling is performed on the local reference structure image in the state reference set to convert the local reference structure image to a volumetric data observation domain consistent with the current localization image. Voxel resampling can be implemented using medical image resampling methods, such as trilinear interpolation or B-spline interpolation. The input to this process is the local reference structure image in the planned 4D image, and the output is a state reference image that is consistent with the current localization image in terms of voxel size, image orientation, and local cropping range. The data obtained after resampling is still volumetric data, and there is no situation where a two-dimensional image is directly converted into a three-dimensional image. For radiotherapy localization scenarios, the voxel size after resampling can be set to 1.0 mm to 2.5 mm. If the current localization image itself already has a fixed voxel size, resampling can be performed directly according to the voxel size of the current localization image. This range is close to the common CBCT reconstruction resolution in clinical practice: if the size is too large, it will weaken the local boundary and texture representation; if the size is too small, it will significantly increase noise and computational burden.

[0049] If the current positioning image is a projected image, then digital reprojection processing is performed on the local reference structure image in the state reference set to obtain the state reference projected image corresponding to each breathing state. Digital reprojection can be completed using the existing ray integration method. Its input is the local reference structure image in volume data form and the imaging geometric parameters. The imaging geometric parameters are provided by the current positioning image acquisition device and include at least the projection direction, source detector geometry, and detector pixel spacing. After this processing, the local reference structure image, which was originally in the volume data observation domain, is converted into a state reference projected image in the projection observation domain. Only then can it be compared with the current positioning image in the same observation domain. The conversion relationship here is that the volume data is converted into a projected image through digital reprojection. There is no logical jump between directly comparing three-dimensional volume data and two-dimensional projected images. Resampling and digital reprojection only serve to unify the observation domain in this step.

[0050] After unifying the observation domain, a structural stability weight map is formed. In existing radiotherapy localization processing, the common practice is to bring the local reference structural image into the subsequent matching with equal weight, or to select only a single respiratory state image as the reference template. These methods are somewhat usable when the respiratory rhythm is stable and the image contrast is high. However, once there is obvious respiratory deformation around the lesion, or the local boundary fluctuates greatly under different respiratory states, equal weight matching will amplify both unstable and stable structures, making the state matching susceptible to interference from local unstable regions. This implementation first identifies local structural regions that remain stable across adjacent respiratory states within the state reference set, and then converts the identification results into a structural stability weight map for use in subsequent state matching.

[0051] The identification of stable local structural regions across adjacent breathing states is accomplished using a local gradient stability analysis method. Specifically, the analysis object is the local reference structural image corresponding to adjacent breathing states in the state reference set. Gradient intensity change information and edge direction continuity information are extracted within the same image location or the same local neighborhood. Then, local gradient alignment is performed on this information to reduce the impact of slight positional drift on stability judgment. Next, edge continuity comparison is performed to determine whether the local boundary persists in adjacent breathing states and maintains basically consistent directional features. Simultaneously, texture fluctuation suppression processing is combined to eliminate interference from noise-amplified areas and areas with significant breathing deformation. After this processing, if a local region exhibits characteristics of small gradient changes, good edge continuity, and weak texture fluctuations across adjacent breathing states, then this region is identified as a stable local structural region across adjacent breathing states.

[0052] To enable the above analysis results to be directly used in subsequent matching, this implementation organizes the stability of each image location into a local structural stability sequence. The local structural stability sequence records the degree of stability of each location between adjacent breathing states after unfolding along the spatial location of the local reference structural image. The local structural stability sequence itself is still a dimensionless stability description result, which comes from the comprehensive discrimination of gradient change, edge continuity and texture fluctuation, and has not yet been directly used for subsequent matching. Next, the local structural stability sequence is converted into a weight distribution result in the interval of 0 to 1 using a normalization method, and then the weight distribution result is mapped back to the corresponding image location to form a structural stability weight map. That is to say, the structural stability weight map is a dimensionless weight map obtained by normalizing the local structural stability sequence. Only after this normalization conversion is completed can the structural stability weight map be used as the input for the local structural representation weighted constraint in the subsequent S3.

[0053] Regarding parameter settings, to ensure that the structural stability weight map is both effective in filtering and not excessively sparse, the criteria for local gradient stability analysis need to closely match the actual quality of the radiotherapy localization images. For CBCT reconstructed images, the rate of change of local gradient between adjacent respiratory states can be controlled within the range of 15% to 30%, and the deviation of the dominant edge direction can be controlled within the range of 10° to 25°. Locations that meet these two conditions are considered stable candidate regions. For projection images, due to the stronger projection superposition effect and more obvious local contrast fluctuations, the rate of change of local gradient can be relaxed to 20% to 35%, and the deviation of the dominant edge direction can be relaxed to 15° to 30°. If the criteria are too strict, the number of stable local structural regions available for matching will decrease significantly, the structural stability weight map will be too sparse, and subsequent state matching will easily lose sufficient image support. If the criteria are too lenient, a large number of regions with significant respiratory deformation and noise will be retained, and the filtering effect of the structural stability weight map will be weakened. Controlling the parameters within the above range is more consistent with the performance of chest and abdominal radiotherapy localization images in actual respiratory changes.

[0054] After the structural stability weight map is formed, the local reference structure images in the state reference set and the corresponding structural stability weight map together constitute the reference basis of S3. The technical effect of this processing is that the judgment of which local structures are suitable as breathing state matching anchors is moved to S2. In S3, the system no longer performs whole-block equal weight matching on the local structure representation. Instead, under the constraint of the structural stability weight map, it prioritizes the use of local structure regions that remain stable across adjacent breathing states to participate in state matching. Compared with the existing method of equal weight comparison of whole local images, this implementation can more effectively suppress the interference of breathing deformation sensitive areas, low stability boundaries and noise areas on the matching results, thereby improving the response capability of subsequent structural consistency results to differences in real breathing states.

[0055] If the local reference structure image corresponding to a particular breathing state in the state reference set has obvious artifacts, local missing parts, or interlayer breaks, image inpainting or artifact suppression can be used for preprocessing. If the preprocessing still fails to meet the basic conditions for local gradient stability analysis, the local reference structure image corresponding to that breathing state is marked as a low-reliability state, and its participation priority is reduced in subsequent state matching. For the projection image path, if the imaging geometric parameters required for digital reprojection are incomplete, it is not advisable to directly form a state reference projection image. Instead, the imaging geometric parameters should be supplemented first before the transformation is performed. Through these abnormal branch constraints, incomplete reference images or incorrect observation domain transformation results can be prevented from continuing to be passed to subsequent steps.

[0056] In summary, this step constructs a state reference set corresponding to each respiratory state with the planned lesion area as the center, unifies the observation domain using voxel resampling or digital reprojection, and then identifies local structural regions that remain stable across adjacent respiratory states through local gradient stability analysis, forming a structural stability weight map. In this way, what S3 receives is no longer an ordinary image template, but a state reference system with local stability constraints. With the help of this state reference system, subsequent state matching can take truly stable local anatomical structures as the main basis, thus providing a more reliable intermediate foundation for the generation of trajectory consistency localization results.

[0057] In one embodiment, S3 takes the state reference set and structural stability weight map output by S2, and combines them with the current positioning image, the positioning correction results, and the corresponding position of the planned lesion region in the current positioning image to complete the determination of lesion candidate regions, the construction of local structural representation, the matching of respiratory states, and the output of structural consistency results and local displacement. The purpose of S3 is to convert the local structural observation in the current positioning image into comparable and sortable matching results under each respiratory state within a unified observation domain, providing an input basis for the generation of trajectory consistency scores and the determination of target respiratory states in S4.

[0058] The determination of the lesion candidate region starts with the positioning correction results. In practice, the planned lesion region is mapped onto the current positioning image according to the positioning correction results to obtain the corresponding position of the planned lesion region in the current positioning image. Then, the lesion candidate region is established around the corresponding position. The positioning correction results here can directly call the position correction results generated in the pre-treatment positioning process. Since the positioning correction has eliminated the translation and rotation errors of the main body, S3 no longer performs a large-scale global search, but processes the residual local deviation caused by respiratory drive within the lesion candidate region. For radiotherapy positioning scenarios in the chest and upper abdomen, the outer range of the lesion candidate region relative to the planned lesion region can be set to 5mm to 12mm, of which 6mm to 10mm is more suitable for most clinical positioning images. If the outer range is too small, the residual respiratory displacement may fall outside the lesion candidate region; if the outer range is too large, too many irrelevant anatomical structures will enter, and subsequent matching will easily be pulled by the background region.

[0059] After the candidate lesion region is determined, local texture stability features and local boundary response features are extracted within the region, and the two types of features are organized into a local structural representation. The local texture stability features are preferably obtained by the structural tensor orientation consistency extraction method, and the local boundary response features are preferably obtained by the scale-normalized gradient boundary response extraction method. The reason for retaining both texture and boundary information is that not all structures around the lesion express respiratory state changes in the same way: lung texture, blood vessel orientation, and strip-shaped soft tissue structures are more suitable for being represented by texture stability features, while lesion boundaries, pleural interfaces, and local organ contour transitions are more suitable for being represented by boundary response features. If only one type of feature is used, the subsequent state matching will reflect local structural changes in a simplistic way. After fusing local texture stability features and local boundary response features into a local structural representation, the candidate lesion region in the current localization image no longer participates in the comparison in the form of the original grayscale block, but participates in the subsequent state matching with the structural description results containing texture orientation information and boundary transition information. The input and output of the local structural representation are at the image structure description level, without introducing new displacement or new state quantities, so there is no problem of dimension jump.

[0060] After the local structure is characterized, local matching is performed with the local reference structure images corresponding to each respiratory state in the state reference set within the local search range established around the center of the lesion candidate region. The local search range is preferably set according to the physical displacement range in the patient coordinate system. For scenarios where the current positioning image is a CBCT reconstructed image, the local search range can be set to 3mm to 8mm in the anterior-posterior, left-right, and head-to-toe directions, with 4mm to 6mm being more suitable as a commonly used setting. The basis for this setting is that after positioning correction, the remaining positional deviation usually mainly comes from differences in respiratory state and local deformation, and the amplitude generally will not reach the level of global repositioning. When the search range is less than 3mm, the residual displacement may not be completely covered; when the search range is greater than 8mm, the local search will approach the global search, the computational burden will increase significantly, and it is easy to introduce more local structures that are unrelated to the lesion state.

[0061] For paths where the current localized image is a projected image, the local search range can first be established within the projection plane, and then converted into the equivalent physical range in the patient coordinate system using imaging geometric parameters and detector pixel spacing. At this point, the original unit of displacement in the projection plane is pixels, which cannot be directly used as input for subsequent lesion position correction. Only after the conversion is completed using the imaging geometric conversion method, and the equivalent local displacement in the patient coordinate system is obtained, can we continue to enter S4. In other words, the positional offset in the projection plane is only an intermediate amount, and the equivalent local displacement is the effective displacement amount generated by the subsequent trajectory-consistent localization result. This conversion relationship is clear in this step, and there is no situation where pixel displacement directly jumps to physical displacement.

[0062] Local matching is performed under the constraints of a structural stability weight map, which is formed by S2. Its function is to increase the contribution of stable local structural regions across adjacent breathing states during matching, while reducing the influence of breathing deformation-sensitive regions, low-stability boundaries, and noise regions. In practice, within the local search range, higher matching priority can be assigned to texture and boundary information corresponding to high-weight positions in the local structural representation, and lower matching priority to low-weight positions. The direct effect of this arrangement is that the dominant basis for state matching is no longer the average similarity of the entire region, but rather it is more driven by local anchoring structures that are stable across states. A common practice in existing processing is to bring the entire candidate region into template matching or similarity comparison, where all positions in the entire region have approximately the same importance. This implementation explicitly introduces information about which positions are more suitable for state discrimination into the matching process through the structural stability weight map, thereby truly transferring the stable structure screening results formed by S2 to S3.

[0063] After matching each breathing state is completed, structural consistency results and local displacements need to be output for each breathing state. The structural consistency results represent the degree of fit between the local structural representation of the lesion candidate region in the current localization image and the local reference structural image corresponding to the breathing state.

[0064] Local displacement represents the positional offset of the optimal matching position relative to the center of the lesion candidate region under this respiratory state. The reason for emphasizing the output of each respiratory state is that S4 is to combine the current respiratory virtual state with the structural consistency results corresponding to each respiratory state to generate a trajectory consistency score. If S3 only outputs a global optimal matching result, S4 will not be able to complete the joint discrimination of each state. Therefore, this step must retain the multi-state parallel output structure so that each respiratory state has a corresponding structural consistency result and local displacement.

[0065] In terms of result selection, for each respiratory state, the optimal matching position is selected within the local search range, and the matching result corresponding to the position is determined as the structural consistency result of the respiratory state. At the same time, the positional offset of the position relative to the center of the lesion candidate area is determined as the local displacement of the respiratory state.

[0066] The "optimal" here refers to the position where the matching degree between the local structural representation and the local reference structural image is the highest under the current respiratory state reference conditions. For the volume data path, this position offset directly corresponds to the local displacement in the patient coordinate system; for the projection path, this position offset needs to be converted into an equivalent local displacement by imaging geometric parameters and detector pixel spacing before it can participate in subsequent processing.

[0067] S3 involves constructing a local structural representation around the candidate lesion region and performing local matching on the state reference set for each breathing state under the constraint of the structural stability weight map. It outputs the structural consistency results and local displacements corresponding to each breathing state. Compared with the scheme of directly using a single template comparison, equal weight matching of the whole image, or only outputting a single optimal displacement, this implementation has already organized the current image observation into a matching result set organized by breathing state before entering S4. In this way, the generation of subsequent trajectory consistency scores no longer depends on the single image similarity peak, but is based on the multi-state correspondence from the current virtual breathing state to the structural consistency result and then to the local displacement. It is more suitable for handling localization scenarios where breathing baseline drift, inspiratory and expiratory lag, and local deformation coexist.

[0068] When large-area metallic artifacts, severe scattering streaks, or local occlusion exist within the lesion candidate region, making it impossible to stably extract local texture stability features and local boundary response features, the outer boundary of the lesion candidate region can be narrowed, the lesion candidate region can be redefined, and the local structural representation can be extracted again. If multiple locations within the local search range yield close optimal matching results, the structural consistency results and local displacements corresponding to these candidate locations can be retained for subsequent S4 to continue filtering in conjunction with the current virtual respiratory state. This branch processing helps prevent S3 from prematurely fixing a single location when the image quality deteriorates, thereby directly passing unstable results to S4.

[0069] In one embodiment, S4 receives the current virtual respiratory state output by S1, and the structural consistency results and local displacements corresponding to each respiratory state output by S3. It then completes the generation of trajectory consistency scores, determination of the target respiratory state, output of trajectory consistency positioning results, calculation of positioning credibility, and correction of state neighborhood rematching under low credibility conditions. The problem that S4 solves is that selecting the optimal state solely based on image matching results can easily lead to the selection of candidate results that are close in the image but have unreasonable states when there are local structural repetitions, similar boundaries, or respiratory baseline drift. Determining the respiratory state solely based on the external respiratory signal sequence can easily lead to mistaking the surface respiratory drive for the actual movement state of internal lesions. Therefore, this embodiment incorporates the state constraints provided by the current virtual respiratory state and the image evidence provided by the structural consistency results output by S3 into the same discriminative framework to generate a trajectory consistency score, and outputs the trajectory consistency positioning results and positioning credibility accordingly.

[0070] For ease of explanation, the set of respiratory states is denoted as... The index of any respiratory state is denoted as S3 has already output the structural consistency result for each breathing state, denoted as... This quantity is dimensionless and is used to characterize the candidate lesion region in the current localization image compared to the first... Each breathing state corresponds to the structural fit between local reference structural images. S1 has already output the current dimensionless baseline offset, denoted as... At the same time, the current breathing direction is determined. The breathing state division rules during the planning period have already given the corresponding state interval and reference breathing direction for each breathing state. Therefore, it can be determined from the first... Extract the reference dimensionless baseline offset from the state interval corresponding to each breathing state, denoted as . This quantity is preferably obtained using the center value of the corresponding state interval. This process can be completed using the interval center extraction method, because... Since they are all in the same normalized state space, there is no problem of dimension inconsistency when comparing the differences between them later. If the original external respiratory signal value is directly compared with the reference state quantity, the differences in device range and individual respiratory amplitude will be mixed in, and the state constraint will be unstable. Therefore, this step only calls the dimensionless state quantity that has been converted by S1.

[0071] In the trajectory consistency score generation stage, the formula is as follows:

[0072] ;

[0073] ;

[0074] in, Indicates the first A consistent score is given for each breathing state corresponding to the trajectory. Indicates the baseline offset matching bandwidth; Indicates the reward coefficient for consistent breathing direction; This indicates the direction of respiration consistency, showing the current breathing direction relative to the first... The value is 1 if the reference breathing direction corresponding to each breathing state is consistent, otherwise it is 0. The index representing the respiratory state with the highest trajectory consistency score; The respiratory state index with the second-highest trajectory consistency score; Indicates the reliability of the location; This represents the stability constant.

[0075] The system provides structural evidence from the image. The exponential decay term describes the proximity between the current dimensionless baseline offset and the reference dimensionless baseline offset. As the difference between the two increases, this term decays continuously, thereby suppressing candidate results where the states do not match but the images are coincidentally close. The direction consistency reward term is used to strengthen the priority of states when the inspiratory or expiratory directions are consistent, avoiding confusion of inspiratory and respiratory branches at the same baseline offset level. The three parts are combined in a multiplicative coupling manner, which means that if any part is obviously invalid, the trajectory consistency score will be suppressed. After this processing, the image evidence, baseline offset constraint, and respiratory direction constraint work together within the same quantitative framework. The determination of the target respiratory state will be based on multi-source consistency rather than a single indicator.

[0076] Regarding parameter settings, The attenuation width used to control the baseline offset difference on the trajectory consistency score, if If the value is too small, slight normal breathing fluctuations will be amplified as a state mismatch; if If the value is too large, the effect of the baseline offset difference on state differentiation will be significantly weakened, especially for the state space of S1 after percentile normalization. The preferred setting is 0.08 to 0.20, with 0.10 to 0.15 being more suitable for most chest and abdominal radiotherapy positioning scenarios. This range is close to the actual respiratory baseline drift level: below 0.08, the state discrimination will be too sensitive to normal fluctuations; above 0.20, the state constraint will become sluggish.

[0077] This value is used to control the enhancement intensity when breathing direction is consistent. If this value is too low, the effect of directional constraint is not obvious; if this value is too high, directional consistency will excessively amplify the structural consistency result. This needs to be considered in conjunction with the actual impact of respiratory lag on localization. The preferred setting is 0.05 to 0.30, with 0.10 to 0.20 being more suitable as commonly used values.

[0078] To ensure the stability of the denominator, it is preferably set to 0.001 to 0.01, because It is a dimensionless score component. Also set to a dimensionless constant, thus It retains its dimensionless property.

[0079] After all trajectory consistency scores are generated, the respiratory state with the highest trajectory consistency score is selected as the target respiratory state, and the local displacement corresponding to the target respiratory state is called to correct the position of the lesion candidate area, thus obtaining the trajectory consistency localization result.

[0080] It is important to clarify that the local displacement involved in the position correction must already be an effective displacement in the patient coordinate system. If the current positioning image is a CBCT reconstructed image, the local displacement output by S3 is already in the patient coordinate system and can be directly used for correction. If the current positioning image is a projection image, S3 has already used the imaging geometry conversion method to convert the position offset in the projection plane into an equivalent local displacement in the patient coordinate system. This step still uses the displacement in a uniform dimension.

[0081] Location reliability is represented by the discriminant between the optimal trajectory consistency score and the second-best trajectory consistency score, specifically using the formula above. ,when When the value is high, it indicates that the optimal breathing state has a significant advantage over the suboptimal breathing state, and the trajectory consistency localization results are relatively stable; when When the value is low, it indicates that multiple breathing states may provide similar interpretations of the current image observation, and the current best result is still ambiguous. This confidence definition method is better than directly using a single similarity peak because it considers two layers of information: how good the best state is and how much the second-best state differs from it. It is more suitable for handling fuzzy discrimination problems when there is local structural repetition, adjacent states, or similar local textures.

[0082] The localization confidence threshold is used to determine whether to initiate rematch correction within the state neighborhood. This threshold is preferably set to 0.08 to 0.25, with 0.10 to 0.18 being more suitable for most chest and abdominal radiotherapy localization scenarios. If the threshold is too low, a large number of results with insufficient discrimination will be directly accepted; if the threshold is too high, unnecessary rematch correction will be triggered frequently, increasing the computational burden. The state neighborhood consists of the respiratory state corresponding to the current respiratory virtual state and its adjacent respiratory states before and after it. This constraint method is adopted because respiratory states have continuous evolution characteristics in time. If the current respiratory virtual state has local deviations, it is most likely to fall into the range of adjacent states. If it directly reverts to all respiratory states to search again, the state constraints will be overly relaxed, introducing more irrelevant candidate states.

[0083] When the location confidence level is lower than the confidence threshold, a rematch correction is performed within the state neighborhood. The implementation method of the rematch correction can follow the local matching process in S3, but only the local search range is re-established within the state neighborhood and the structural consistency results and local displacements corresponding to each respiratory state are updated. To enhance the correction capability, the local search range within the state neighborhood can be appropriately widened based on the original local search range in S3. For CBCT reconstructed image paths, if the local search range used in S3 is 3mm to 8mm in each direction, it can be widened to 5mm to 12mm in each direction during rematch correction. For projection image paths, the local search window can be expanded proportionally in the projection plane first, and then converted into the equivalent physical range in the patient coordinate system using imaging geometry conversion. The basis for this approach is that low confidence results often mean insufficient separation between the current optimal match and adjacent states. Appropriately expanding the local search range helps to release the constraints caused by slight mismatches. If the range is widened too much, a large number of irrelevant local structures will be reintroduced, weakening the role of the state neighborhood constraint itself.

[0084] After the rematch correction is completed, the trajectory consistency score is recalculated based on the updated structural consistency results in the state neighborhood, and the target breathing state and positioning confidence are redefined. There is no need to backtrack to S1 and S2 here. The reason is clear: the current virtual breathing state generated by S1 and the state reference set and structural stability weight graph formed by S2 have formed a stable constraint basis. The uncertainty that appears now mainly comes from the insufficient differentiation of the local matching results in S3. Therefore, only the output of S3 needs to be locally corrected. This local closed-loop method ensures that the entire processing chain is clear and avoids unnecessary full-process backtracking.

[0085] S4 focuses on three key areas. First, the trajectory consistency score incorporates structural consistency results, the fit between the current dimensionless baseline offset and the reference dimensionless baseline offset, and respiratory direction consistency into the same discriminative framework. This can simultaneously suppress candidate results that are close in image but have unreasonable states, as well as candidate results that are close in state but lack sufficient image evidence.

[0086] Secondly, the reliability of the location is given by the distinguishability between the scores of the best and second-best trajectories, so that the low reliability results have clear trigger boundaries.

[0087] Third, the correction at low confidence does not fall back to a full-state, full-range search, but performs rematch correction within the state neighborhood, thereby releasing local matching ambiguities while maintaining state constraints.

[0088] When all three work together, the trajectory-consistent positioning results output by S4 have stronger consistency in respiratory status and positioning reliability.

[0089] If the overall score of the trajectory corresponding to all breathing states is low, or if the localization confidence remains below the confidence threshold after state neighborhood rematch correction, the current localization result can be marked as a low confidence result, and the current localization image can be re-acquired or a manual review process can be triggered. This can avoid outputting high-risk automatic localization results under conditions where state constraints and image evidence are insufficient.

[0090] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for precise localization of radiotherapy lesions, characterized in that, Includes the following steps: Acquire 4D images of the planning period, the current positioning image, the external respiratory signal sequence acquired synchronously with the current positioning image, and the positioning correction results. Perform time window characterization processing on the external respiratory signal sequence near the current positioning time to generate the current respiratory virtual state. In the 4D images during the planning period, the planned lesion area is identified. A state reference set corresponding to each respiratory state is constructed around the planned lesion area. A structural stability weight map is formed based on the cross-state stability of local structures under each respiratory state. Based on the positioning correction results and the corresponding position of the planned lesion area in the current positioning image, the candidate lesion area is determined, the local structural representation of the candidate lesion area is extracted, and the state is matched with the state reference set under the constraint of the structural stability weight map. The structural consistency results and local displacements corresponding to each respiratory state are output. The structural consistency results corresponding to each breathing state are jointly judged with the current virtual breathing state. Based on the degree of fit between the current dimensionless baseline offset and the state interval corresponding to each breathing state, and the degree of match between the current breathing direction and the direction identifier corresponding to each breathing state, a trajectory consistency score is assigned to each breathing state, and the trajectory consistency scores corresponding to each breathing state are organized into a trajectory consistency score sequence. The respiratory states are sorted according to the trajectory consistency score sequence. The respiratory state with the highest score is selected as the target respiratory state. The local displacement corresponding to the target respiratory state is used to correct the position of the lesion candidate area to obtain the trajectory consistency localization result. Then, the localization confidence is generated based on the difference between the optimal trajectory consistency score and the second-best trajectory consistency score. When the localization confidence is lower than the confidence threshold, the respiratory state corresponding to the current virtual respiratory state and its adjacent respiratory states before and after it are determined as the state neighborhood. Rematch correction is initiated in the state neighborhood to update the trajectory consistency localization result and the localization confidence. In the trajectory consistency score generation stage, the formula is as follows: ; Indicates an index for any respiratory state; Indicates the first A consistent score is given for each breathing state corresponding to the trajectory. Indicates the first The structural consistency results corresponding to each respiratory state are used to characterize the candidate lesion region in the current localization image and the first respiratory state. The degree of structural fit between local reference structural images corresponding to each breathing state; Represents the natural exponential function; The current dimensionless baseline offset represents the result of normalizing the original external respiratory signal value after passing through the baseline information and amplitude range information within the current time window. The current time window is a continuous respiratory fluctuation segment extracted from the external respiratory signal sequence with the current positioning time as the center. Indicates the first The reference dimensionless baseline offset of each respiratory state corresponding to the state interval; This indicates the baseline offset matching bandwidth, and Greater than 0; Indicates the reward coefficient for consistent breathing direction; This indicates the direction consistency indicator, when the current breathing direction is consistent with the first... When the directional indicators corresponding to each breathing state are consistent Take 1, when the current breathing direction is the same as the first... When the directional indicators corresponding to different breathing states are inconsistent Take 0.

2. The method for precise localization of radiotherapy lesions according to claim 1, characterized in that, The specific operation of time window representation processing is as follows: around the current positioning time, continuous respiratory fluctuation segments are extracted from the external respiratory signal sequence as the current time window, and peak removal and smoothing are performed on the external respiratory signal sequence within the current time window; Baseline information and amplitude range information are extracted. The offset of the respiratory signal value corresponding to the current positioning time relative to the baseline information is converted into percentile normalization according to the amplitude range information to obtain the current dimensionless baseline offset. Then, the baseline information, amplitude range information and the current dimensionless baseline offset are organized into a respiratory state description vector.

3. The method for precise localization of radiotherapy lesions according to claim 2, characterized in that, The specific operation to generate the current virtual breathing state is as follows: extract the trend of breathing signal changes near the current positioning time within the current time window, and determine the current breathing direction based on the first-order difference sign; When the current positioning time is in the breathing transition zone, the breathing direction corresponding to the previous stable time is called as the current breathing direction. Then, the breathing state description vector and the current breathing direction are mapped together to the corresponding state interval in the planning breathing state division rule to obtain the current breathing virtual state.

4. The method for precise localization of radiotherapy lesions according to claim 1, characterized in that, The specific operation for forming a state reference set is as follows: in the 4D images during the planning period, the planned lesion area is determined, and local reference structure images covering the transition area of ​​the lesion boundary and the surrounding stable anatomical structure area are cut around the planned lesion area. Organize corresponding local reference structure images according to each respiratory state to form a state reference set; When the current localization image is a CBCT reconstructed image, voxel resampling is performed on the local reference structure images in the state reference set. When the current localization image is a projection image, digital reprojection is performed on the local reference structure images in the state reference set, so that the state reference set and the current localization image are in the same observation field.

5. The method for precise localization of radiotherapy lesions according to claim 4, characterized in that, The specific operation for forming the structural stability weight map is as follows: perform local gradient alignment, edge continuity comparison and texture fluctuation suppression processing on the local reference structural images corresponding to adjacent breathing states in the state reference set, extract local structural regions that maintain continuous stability across states, organize the stability of local structural regions into a local structural stability sequence, and then assign weights to each image position according to the local structural stability sequence to form a structural stability weight map.

6. The method for precise localization of radiotherapy lesions according to claim 1, characterized in that, The specific steps for determining candidate lesion regions and constructing local structural representations are as follows: based on the positioning and correction results, the planned lesion region is mapped onto the current localization image to determine the candidate lesion region; In the candidate lesion region, the structural tensor orientation consistency extraction method is used to obtain local texture stability features, and the scale normalized gradient boundary response extraction method is used to obtain local boundary response features. Then, the local texture stability features and local boundary response features are fused into a local structural representation.

7. The method for precise localization of radiotherapy lesions according to claim 6, characterized in that, The specific operation to obtain the structural consistency results and local displacements corresponding to each respiratory state is as follows: within the local search range established around the center of the lesion candidate region, the local structural representation is subjected to weighted constraints using the structural stability weight map, and local matching is performed with the local reference structural images corresponding to each respiratory state in the state reference set. The optimal matching result under each respiratory state is determined as the corresponding structural consistency result, and the positional offset of the optimal matching position relative to the center of the lesion candidate region is determined as the corresponding local displacement. When the current positioning image is a projection image, the positional offset in the projection plane is converted into an equivalent local displacement in the patient coordinate system according to the imaging geometry parameters.

8. The method for precise localization of radiotherapy lesions according to claim 1, characterized in that, The specific operations for performing rematch correction and updating the localization output are as follows: around the position of the trajectory consistency localization result before rematch correction, a new local search range is established in the state neighborhood, and local matching is performed again on the local reference structure image corresponding to each breathing state in the state neighborhood. The structural consistency result and local displacement corresponding to each breathing state in the state neighborhood are updated. Then, the trajectory consistency score sequence is regenerated, the target breathing state is re-determined, and the trajectory consistency localization result and localization confidence are updated according to the updated local displacement.