CN-121639533-B - Real-time correction method based on EPID image, correction effect analysis method and system
Abstract
The invention discloses a real-time correction method, a correction effect analysis method and a correction effect analysis system based on an EPID image, which relate to the technical field of radiotherapy quality assurance and comprise the following steps of automatically screening dose images to obtain accumulated dose images; and defining a target rectangle according to the nominal portal parameters input by a user, and mapping the distorted quadrangle to the target rectangle by adopting a perspective transformation matrix to finish image correction. The method has high instantaneity, is compatible with FLASH radiotherapy, does not need any manual intervention in the whole process, can correct the in-plane rotation and the X/Y axis inclination of the EPID at the same time, and overcomes the defects of low automation degree, manual intervention, incapability of automatically correcting perspective distortion and serious analysis precision of the existing EPID scheme.
Inventors
- XIAO YAO
- WU TIANJIE
- ZHAN WEI
- WU ZHONGHUA
- LIU XIANHONG
Assignees
- 中玖闪光医疗科技有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260204
Claims (11)
- 1. A real-time correction method based on EPID images, comprising: automatically screening the dose images to obtain accumulated dose images; Positioning four corner points of the EPID image distortion field of the electronic portal image equipment based on the accumulated dose image to obtain a distortion quadrangle, wherein the positioning of the four corner points of the EPID image distortion field of the electronic portal image equipment comprises the following steps: Extracting a half-shadow region ROI in the accumulated dose image; Locating a distorted portal boundary for the penumbra region ROI; performing straight line fitting and angular point calculation on the distorted portal boundary to obtain a portal edge and four angular points; the locating distorted portal boundaries for the penumbra region ROI includes: step A1, extracting A1D section based on the penumbra region ROI to obtain section data, wherein the step specifically comprises the following steps: the method comprises the steps of sectioning a half-shadow region ROI along a horizontal direction/a vertical direction, traversing each row/each column covered by the half-shadow region, obtaining 1D pixel value data, and constructing a 1D profile data point set based on the 1D pixel value data, wherein the profile data point set is a position-gray level set, the position is taken as a horizontal axis, the gray level is taken as a vertical axis, and drawing to obtain an S-shaped curve; a2, fitting the section data to a fitting function by adopting a nonlinear least square method : ; Wherein, the Is the position index value in the profile data, Are parameters that need to be fitted to each other, In order to be a background value, In order to achieve a dose amplitude, Is of penumbra width Namely, the abscissa corresponding to the center point of the S-shaped curve; step A3, calculating by fitting all rows/columns of the 1D section Parameters, get Generating a sub-pixel point cloud set of four edges ; The method for carrying out straight line fitting and angular point resolving on the distorted portal boundary to obtain a portal edge and four angular points comprises the following steps: Step B1, for each edge point cloud, respectively executing the following steps: step B11, randomly selecting two points from the point cloud, and calculating a straight line model; step B12, traversing all points in the point cloud, calculating algebraic distance from the points to the straight line, and if the distance is smaller than a preset threshold value Marked as interior points; Step B13, repeating the step B11 to the step B12 for set times, and reserving the linear model with the largest number of interior points as an optimal coarse model; step B14, extracting all internal points corresponding to the optimal coarse model, and performing linear regression by using a least square method to obtain a final high-precision linear equation; Step B2, solving four fitting high-precision linear equations simultaneously to obtain sub-pixel coordinates of four intersection points Simultaneously calculating four side lengths; And defining a target rectangle according to the nominal portal parameters input by the user, and realizing the mapping from the distorted quadrangle to the target rectangle by adopting a perspective transformation matrix to finish image correction.
- 2. The EPID image based real time correction method according to claim 1, wherein the extracting of the half-shadow ROI in the accumulated dose image comprises: Traversing the accumulated dose image, searching for global maximum pixel values ; According to the global maximum pixel value And penumbra region ROI definition, calculating a first isodose line threshold And a second isodose line threshold : ; ; Wherein, the Is the average value of the image edge area; according to the first isodose line threshold And a second isodose line threshold Binarizing the accumulated dose image to obtain a binarized image, removing isolated noise points from the binarized image, extracting all closed contours, reserving the connected domain contour with the largest area, and respectively obtaining inner contour lines And an outer contour line ; Inner contour line And an outer contour line The surrounding annular region is the penumbra region ROI.
- 3. The EPID image-based real-time correction method according to claim 1, wherein the step A3 specifically comprises: traversing each row/column covered by the penumbra region ROI; Extracting the pixel gray value sequence of the row/column in the penumbra region ROI to construct a 1D profile data point set Wherein Is the position index of a point in the sequence of gray values, Is the gray value at the corresponding position index in the gray value sequence, Is the corresponding row/column coordinate; Defining a loss function : Wherein Is a position sequence calculated according to a fitting function in the optimization process Gray value results at; Setting an optimization target as Loss convergence; setting parameters Is set to an initial value of (1); performing nonlinear least square fitting and iterative optimization Four parameters up to When the difference between the pixel data and the actual pixel data is minimized, namely the Loss value is smaller than a set threshold value or the set maximum iteration number is reached, stopping optimizing; Parameters after convergence Namely, the abscissa corresponding to the center point of the S-shaped curve; repeating the above process for all rows/columns to generate four-edge sub-pixel point cloud sets 。
- 4. The EPID image based real-time correction method according to claim 1, wherein the defining a target rectangle according to the nominal portal parameter inputted by the user, and mapping the distorted quadrangle to the target rectangle using a perspective transformation matrix, and performing image correction comprises: Determining vertex coordinates of the target rectangle according to the nominal field physical width, the nominal field physical height and the pixel millimeter coefficient input by a user; determining perspective transformation matrix according to vertex coordinates of target rectangle and vertex coordinates of distorted rectangle ; Traversing pixel coordinates in a target image using a matrix Is the inverse of the matrix of (a) Mapping the coordinates of the target image back to the source image; The pixels of the source image are weighted averaged using a cubic convolution kernel W (d) to generate a corrected dose image.
- 5. The EPID image based real time correction method according to claim 4, wherein the perspective transformation matrix The method comprises the following steps: ; Wherein, the For affine components, for correcting image rotation due to collimator rotation or EPID in-plane rotation, and overall scaling due to source-image distance deviation; For the translational component, correcting the translational deviation of the X-axis and Y-axis of the center of the field relative to the imaging center; for perspective components, for correcting keystone distortion due to EPID detector planes not perpendicular to the beam central axis; Is a normalized parameter.
- 6. A correction effect analysis method based on an EPID image, comprising obtaining a corrected image using the EPID image-based real-time correction method according to any one of claims 1 to 5, calculating symmetry based on the corrected image, and calculating confidence based on a difference between a distorted quadrangle and the corrected image.
- 7. The EPID image based correction effect analysis method according to claim 6, wherein the calculating symmetry based on the corrected image includes: Extracting a horizontal dose distribution curve and a vertical dose distribution curve along a horizontal central axis and a vertical central axis respectively on the corrected image; respectively calculating horizontal symmetry and vertical symmetry in the width range of the radiation field n 3: The horizontal symmetry is the maximum value of the absolute value of the ratio of the difference between symmetrical pixel points on the horizontal dose distribution curve to the maximum value on the horizontal dose distribution curve; Vertical symmetry is the maximum of the absolute values of the ratio of the difference between symmetrical pixels on the vertical dose distribution curve to the maximum on the vertical dose distribution curve; wherein n3 is a percentage.
- 8. The EPID image based correction effect analysis method according to claim 6, wherein the calculating of the confidence based on the difference between the distorted quadrangle and the corrected image includes: calculating Y-axis inclination distortion factors according to the upper side length of the distorted quadrangle and the lower side length of the distorted quadrangle; calculating an X-axis inclination distortion factor according to the left side length of the distorted quadrangle and the right side length of the distorted quadrangle; the dimensional fidelity is calculated from the side length of the distorted quadrilateral, the nominal pixel width and the nominal pixel height of the corrected image.
- 9. The EPID image based correction effect analysis method according to claim 6, further comprising visually displaying the symmetry calculation result and the confidence calculation result and generating a report.
- 10. A system for implementing the EPID image based real time correction method as claimed in claim 1, comprising: A user input module configured for a user to input nominal portal parameters; A dose image screening module configured to automatically screen the dose images to obtain an accumulated dose image; the portal distortion parameter calculation module is configured to locate four corner points of the EPID image distortion portal of the electronic portal imaging equipment based on the accumulated dose image to obtain a distortion quadrangle; And the perspective transformation correction module is configured to define a target rectangle according to the nominal portal parameter input by the user, and adopts a perspective transformation matrix to realize the mapping from the distorted quadrangle to the target rectangle so as to finish image correction.
- 11. The system of claim 10, further comprising: an analysis and confidence calculation module configured to calculate symmetry based on the corrected image and calculate confidence based on a distorted quadrilateral and a difference of the corrected image; And the visualization and reporting module is configured to visually display the symmetry calculation result and the confidence calculation result and generate a report.
Description
Real-time correction method based on EPID image, correction effect analysis method and system Technical Field The invention relates to the technical field of radiotherapy quality assurance, in particular to a real-time correction method based on an EPID image, a correction effect analysis method and a correction effect analysis system. Background In radiation therapy (e.g., using a medical linac), the Symmetry of the field (Symmetry) is a key quality control (QA) indicator to ensure that the radiation dose is delivered accurately to the target area of the patient. The conventional QA method relies mainly on two techniques, film (Film) or Water tank (Water Phantom) scanning. Wherein: film QA procedure a technician first places a special radiochromic film (Radiochromic Film) in a mold body to perform radiation exposure. After exposure, the film typically undergoes multiple steps, such as scanning, scaling, etc., and the overall process is time consuming. Water tank QA procedure this is the "gold standard" for dose measurement. The method uses a die body (water tank) filled with water, and the die body is driven by a three-dimensional mechanical arm through a detector (such as an ionization chamber) to slowly move in the water, and the dose distribution is scanned point by point and measured. Both of the above-mentioned conventional schemes have serious technical drawbacks: Time consuming and complicated processes, namely, the film method and the water tank method involve complex operation and long waiting or scanning, and real-time feedback cannot be achieved. The method cannot be compatible with FLASH radiotherapy, and the FLASH radiotherapy (ultra-high dose rate) has the characteristic of extremely short beam-out time (usually less than 1 second). The mechanical arm of the water tank does not complete the scanning at all, and the chemical reaction of the film also makes it impossible to provide real-time QA. Therefore, none of the conventional QA methods is suitable for FLASH radiotherapy. Although the prior art attempts to use EPID (Electronic Portal IMAGING DEVICE, EPID, electronic portal imaging device, real-time imaging component integrated on linac) for QA, there are: manual intervention is needed, and a technician is often required to manually frame and select a region of the field to be analyzed such as the ROI (Region of Interest ) on software during analysis. The existing software can only (or needs to manually) correct the rotation in the image plane caused by the slight rotation of the frame or the EPID, and is limited to the image distortion caused by the rotation of the EPID in the plane, namely, the rectangular field becomes a 'rotated rectangle', and the opposite sides of the rectangular field are still parallel. More seriously, they are completely incapable of automatically correcting the tilt in the X-axis or Y-axis direction due to the EPID detector plane mounting non-perpendicular to the beam central axis. This tilt results in perspective distortion (PERSPECTIVE DISTORTION), i.e., a perfect rectangular field is projected as a trapezoid on the EPID. Analysis of symmetry on this basis can introduce significant geometric errors. Also, existing EPID schemes lack verification and confidence feedback that existing systems are a "black box". They analyze the acquired images "blindly" and the system may (on the basis of error correction) draw a false positive conclusion of "pass" even if the user is sitting severely tilted, or if the collimator is mechanically malfunctioning, resulting in a field size error. They do not provide the user with any quantitative indicator as to whether the analysis is reliable. Disclosure of Invention The invention aims to provide a real-time correction method, a correction effect analysis method and a system based on an EPID image, which are used for solving the problems that a traditional QA method in the prior art is long in time consumption and complex in operation and cannot be applied to a FLASH radiotherapy scene, and the problems that the existing EPID analysis software is low in automation degree, needs manual intervention and cannot automatically correct perspective distortion to cause serious deficiency in analysis precision. And further solves the problem that the EPID scheme in the prior art lacks verification and confidence feedback and cannot quantitatively analyze whether the analysis is reliable or not. The invention solves the problems by the following technical proposal: A real-time correction method based on EPID images, comprising: automatically screening the dose images to obtain accumulated dose images; positioning four corner points of the EPID image distortion field of the electronic field imaging equipment based on the accumulated dose image to obtain a distortion quadrangle; And defining a target rectangle according to the nominal portal parameters input by the user, and realizing the mapping from the distorted quadrangle to the target rect