Nasopharyngeal carcinoma patient neck radiotherapy method based on image processing

By constructing a set of interference contours and an artifact exclusion region map, high-density artifacts are isolated and tumor boundary generation is controlled, thus solving the problem of false tumor contour expansion and improving the accuracy and safety of target area delineation for nasopharyngeal carcinoma patients undergoing neck radiotherapy.

CN122006149APending Publication Date: 2026-05-12JIANGSU CANCER HOSPITAL
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
JIANGSU CANCER HOSPITAL
Filing Date
2026-04-10
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

In current techniques for cervical radiotherapy in nasopharyngeal carcinoma patients, improper removal of high-density artifacts such as metal crowns can lead to the formation of false tumor outlines, expand the irradiation range, and cause damage to normal tissues.

Method used

By constructing a set of interference contours and an artifact exclusion region map, high-density artifacts are isolated, tumor boundary generation is controlled, and false expansion is suppressed by combining adjacent slice comparison and regression mechanisms.

Benefits of technology

Improve the accuracy of target delineation, reduce the risk of normal tissue dose exposure, and enhance the safety of radiotherapy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122006149A_ABST
    Figure CN122006149A_ABST
Patent Text Reader

Abstract

The invention discloses a nasopharyngeal carcinoma patient neck radiotherapy method based on image processing, and relates to the technical field of medical image processing, and the method comprises the following steps: collecting an original neck image containing metal interference, drawing a gray abrupt change distribution diagram around a high-density abnormal region, extracting the trend of continuous stripes according to the gray abrupt change distribution diagram, and carrying out the radiotherapy of the neck of a nasopharyngeal carcinoma patient. And forming an interference contour set. According to the method, the interference contour set and the artifact exclusion region graph are constructed, the space limitation range is established in advance, high-density artifacts are prevented from participating in tumor boundary generation, and the target region sketching accuracy is improved; meanwhile, an external expansion stop and rollback control mechanism is introduced into contour smoothing and adjacent section comparison, false external expansion in the three-dimensional direction is inhibited, the risk that normal tissue is irradiated is reduced, and radiotherapy safety and boundary stability are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of medical image processing technology, specifically to a method for cervical radiotherapy in nasopharyngeal carcinoma patients based on image processing. Background Technology

[0002] Image-processing-based neck radiotherapy for nasopharyngeal carcinoma patients refers to the process of acquiring imaging data of the patient's neck, such as tomographic images from CT scans, MRI examinations, or PET-CT examinations, during the radiotherapy of the neck region of nasopharyngeal carcinoma patients. Then, image processing techniques such as image segmentation, registration, enhancement, and boundary recognition are used to accurately identify and locate the primary tumor lesion, the extent of cervical lymph node invasion, and surrounding important organs. Based on this, the radiotherapy target area, dose distribution, and irradiation path are determined. This ensures that the tumor tissue receives a sufficient radiation dose while minimizing radiation damage to normal tissues such as the spinal cord, parotid gland, and larynx, achieving an individualized neck radiotherapy method that uses medical imaging data as the basis for decision-making and aims for precise control.

[0003] The existing technology has the following shortcomings: In existing technologies, during the image artifact removal process before radiotherapy in the neck of nasopharyngeal carcinoma patients, if the artifact removal parameters are set improperly or the boundary discrimination rules are not refined enough, residual high-density artifacts can easily be misidentified as tumor edges. These artifacts are then automatically extended during subsequent contour smoothing and continuity filling, resulting in a false tumor contour that exceeds the actual lesion area. This false contour directly participates in the delineation of the radiotherapy target area and dose distribution calculation, causing the irradiation range to invisibly expand into the surrounding normal neck muscles. This can easily lead to muscle fibrosis and functional limitations, and in severe cases, irreversible functional damage such as swallowing difficulties, posing a significant clinical safety hazard.

[0004] The information disclosed in the background section is only intended to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention

[0005] The purpose of this invention is to provide an image processing-based method for cervical radiotherapy in nasopharyngeal carcinoma patients, in order to solve the problems mentioned in the background art.

[0006] To achieve the above objectives, the present invention provides the following technical solution: a method for cervical radiotherapy in nasopharyngeal carcinoma patients based on image processing, comprising the following steps: Acquire raw images of the neck containing metallic interference, draw a gray-scale abrupt change distribution map around the high-density abnormal area, extract the direction of continuous stripes based on the gray-scale abrupt change distribution map, and form an interference contour set; By continuously tracking along the direction of continuous stripes in the original neck image using the interference contour set, the radially spreading artifact regions are separated, and an artifact exclusion region map is generated. The artifact exclusion region map is then overlaid onto the original neck image to form a boundary restriction range. Outside the boundary restriction range, gray-scale decreasing screening is performed on high-density areas to preserve the closed and intact lesion edges with stable gray-scale distribution, forming a restricted tumor boundary map; Contour smoothing is performed around the restricted tumor boundary map. During the contour smoothing process, the spatial coordinates of each outward-expanding pixel are compared. When the outward-expanding pixel is within the coverage area of ​​the artifact exclusion region map, the outward expansion operation in the current direction is stopped, forming a controlled tumor contour result. By comparing adjacent slices based on the controlled tumor contour results, when a sudden outward jump occurs in the controlled tumor contour results, the controlled tumor contour results are reverted to the corresponding range of the restricted tumor boundary map, thus completing the continuous suppression of false outward expansion.

[0007] Preferably, the steps for forming the interference contour set are as follows: The original neck image is analyzed pixel by pixel grayscale. All pixels are traversed in row and column order. The grayscale difference between each pixel and its eight adjacent pixels is calculated. Pixels with grayscale differences exceeding the preset gradient threshold are marked as grayscale abrupt change points. All grayscale abrupt change points are summarized to generate a grayscale abrupt change distribution map. Spatial clustering analysis is performed on gray-level abrupt change points in the gray-level abrupt change distribution map to form gray-level abrupt change clustering regions. Gray-level abrupt change points with consistent directions are extracted from each gray-level abrupt change clustering region and extended. Extended trajectories with directional angles smaller than a set angle range are integrated to form a set of continuous stripe directions. The continuous stripe direction set is mapped onto the original neck image. Stripe extension bands are established along the continuous stripe direction to form stripe extension regions. Spatial merging and connectivity processing is performed on the stripe extension regions to enclose and form interference contour regions. Boundary correction and region integration are performed on the interference contour regions to form a set of interference contours covering high-density anomaly regions.

[0008] Preferably, the steps for generating the artifact exclusion region map and forming the boundary constraint range are as follows: The interference contour set is mapped onto the original neck image, the coordinates of the boundary pixels of each contour unit are extracted, and the process is advanced point by point along the direction of continuous stripes. A continuous tracking path set is formed based on the gray-level difference and the direction of gray-level change. The set of continuous tracking paths is grouped according to the starting contour unit. Continuous tracking paths that are angularly adjacent and whose spatial interval is within a set pixel distance range are merged to form an initial set of artifact diffusion regions. Boundary scanning and connectivity processing are performed on the initial set of artifact diffusion regions to enclose and form an artifact exclusion region map. The artifact exclusion region map is overlaid onto the original neck image, and the pixels inside the artifact exclusion region map are marked to construct the boundary constraint range.

[0009] Preferably, the steps for forming a restricted tumor boundary map are as follows: The boundary limit range is expressed in the form of pixel markers. The gray value is read point by point outside the boundary limit range. The gray level is divided according to the decreasing order of gray value and spatial connectivity processing is performed to form a set of candidate high-density regions. The stability of grayscale distribution of the candidate high-density region set is determined, grayscale change paths are constructed along the horizontal, vertical and diagonal directions, and candidate high-density regions with continuous grayscale decrease are retained to form an initial lesion edge candidate set. The initial lesion edge candidate set is processed for closure integrity, the boundary pixels are extracted and connected to form a closed path, the inside of the closed path is filled and the gray-level inverse distribution pixels are corrected; Regions that meet the conditions of complete closure and stable gray-scale distribution are integrated and expressed to form a restricted tumor boundary map.

[0010] Preferably, when determining the grayscale distribution stability of the candidate high-density region set, each candidate high-density region is continuously read along the grayscale change path from the center to the boundary. When there are pixels with reverse distribution along the grayscale change path, the corresponding region is removed, and the boundary pixels of the remaining region are reconnected and corrected to limit the restricted tumor boundary map to only include regions with continuously decreasing grayscale and closed boundaries.

[0011] Preferably, the steps for forming the controlled tumor contour result are as follows: Read the boundary pixel coordinates of the restricted tumor boundary map point by point, and arrange the boundary pixels into a continuous closed boundary point sequence according to spatial order; Curvature analysis is performed on each boundary pixel in the boundary point sequence, and new pixels are inserted to transform the polyline shape into a continuous curve shape, ensuring that the grayscale value corresponds to the restricted tumor boundary. Figure 1 To; The smoothed boundary set is expanded outward, advancing along the boundary normal direction, and the entry into the artifact exclusion region map is compared in real time. When an overlap is encountered, the expansion stops, and the last pixel that has not entered the artifact exclusion region map is retained. The updated boundary set is subjected to connectivity adjustment, new boundary pixels are inserted, and concave or convex boundary segments are corrected to ensure that the smoothed boundary curve is spatially continuous, ultimately forming a controlled tumor contour result.

[0012] Preferably, during the outward expansion process, when the boundary pixels advance along the normal direction, a spatial comparison of the artifact exclusion region map is performed simultaneously. The advancement is terminated when the advancement path spatially coincides with the boundary of the artifact exclusion region map, and the corresponding boundary pixels are limited to the range of the restricted tumor boundary map.

[0013] Preferably, the steps for comparing adjacent slices before and after and then rolling back are as follows: All slices are numbered according to the acquisition order. The controlled tumor contour results and restricted tumor boundary map of each numbered slice are expressed in a unified spatial coordinate system. Target slices are selected and spatial correspondence with the previous and next numbered slices is established. Area statistics and boundary displacement analysis are performed on the controlled tumor contour results of the target slice to identify boundary pixels whose spatial distance exceeds the set pixel displacement threshold and form a set of sudden outward jump regions; Replace the boundary pixel coordinates in the set of sudden out-of-boundary regions with the boundary pixel coordinates within the corresponding range of the restricted tumor boundary map, update the boundary pixel set and perform connectivity processing; The updated controlled tumor contour results were spatially compared with adjacent slices again, and area statistics and boundary displacement analysis were repeated to achieve continuous suppression of false expansion.

[0014] The technical effects and advantages provided by the present invention in the above technical solution are as follows: This invention constructs a set of interfering contours in the original neck image and forms an artifact exclusion region map. By establishing a spatial limitation range before the tumor boundary is generated, high-density artifacts are isolated at the structural level, preventing them from participating in the subsequent gray-scale reduction screening and contour smoothing process. This blocks the path of artifact residues transforming into the tumor boundary, so that the final tumor contour can truly reflect the lesion range, improve the spatial accuracy of target area delineation, and provide a stable and reliable boundary basis for radiotherapy dose distribution calculation.

[0015] This invention introduces artifact exclusion region map corresponding to the outward expansion stop control during the contour smoothing stage, and combines it with the before-and-after comparison and regression mechanism between adjacent slices to continuously suppress the controlled tumor contour results in three dimensions. This allows abnormal sudden outward jumps to return to the corresponding range of the restricted tumor boundary map in a timely manner, preventing false outward expansion from accumulating and expanding between slices. This reduces the probability of non-target tissues entering the irradiation range, reduces the dose exposure risk to normal neck tissues, and enhances the safety control capability during radiotherapy. Attached Figure Description

[0016] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this invention. For those skilled in the art, other drawings can be obtained based on these drawings.

[0017] Figure 1 This is a flowchart of the method for cervical radiotherapy in nasopharyngeal carcinoma patients based on image processing, according to the present invention.

[0018] Figure 2 This is a mind map of the image processing-based neck radiotherapy method for nasopharyngeal carcinoma patients according to the present invention. Detailed Implementation

[0019] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, they are provided so that the description of this disclosure will be more complete and fully convey the concept of the exemplary embodiments to those skilled in the art.

[0020] This invention provides, for example Figure 1 The image-processing-based neck radiotherapy method for nasopharyngeal carcinoma patients shown includes the following steps: Acquire raw images of the neck containing metallic interference, draw a gray-scale abrupt change distribution map around the high-density abnormal area, extract the direction of continuous stripes based on the gray-scale abrupt change distribution map, and form an interference contour set; The specific steps for analyzing grayscale abrupt changes and extracting continuous stripe patterns in metallic interference regions of the original neck image are as follows: The original neck image is subjected to pixel-by-pixel grayscale analysis. The entire image is traversed in row and column order, and the grayscale value of each pixel is extracted and its spatial position in two-dimensional coordinates is recorded. Centered on the current pixel, eight adjacent pixels in eight directions are selected: above, below, left, right, upper left diagonal, upper right diagonal, lower left diagonal, and lower right diagonal. The grayscale difference between the current pixel and the adjacent pixels in these eight directions is calculated and stored according to their corresponding directions, forming a grayscale difference set centered on the current pixel. When the grayscale difference exceeds a preset gradient threshold, the current pixel is marked as a grayscale abrupt change point, and the direction of the abrupt change is recorded. After grayscale difference processing is completed for all pixels, all grayscale abrupt change points are summarized according to their spatial positions to generate a grayscale abrupt change distribution map covering the entire original neck image. In the grayscale abrupt change distribution map, each grayscale abrupt change point contains spatial coordinates and corresponding abrupt change direction information, thus providing basic data for subsequent high-density anomaly area localization.

[0021] After the gray-scale mutation distribution map is formed, spatial clustering analysis is performed on the gray-scale mutation points. Gray-scale mutation points with adjacent distances within a set pixel range are grouped into the same cluster unit, forming multiple gray-scale mutation cluster regions. For each gray-scale mutation cluster region, the distribution of gray-scale mutation directions within the region is statistically analyzed. Gray-scale mutation points with consistent directions are arranged according to spatial connection methods to form a continuous directional path. The continuous directional path is extended by searching for continuous gray-scale mutation points point by point along the mutation direction from the starting point of the path until the gray-scale difference is lower than the preset gradient threshold, and the complete extension trajectory is recorded. Multiple extension trajectories formed in the same gray-scale mutation cluster region are screened for directional consistency. Extension trajectories with directional angles smaller than a set angle range are integrated to form a continuous stripe direction sequence. After processing all gray-scale mutation cluster regions, a set of continuous stripe directions covering all high-density abnormal areas in the original neck image is obtained. Each continuous stripe direction includes the starting coordinates, ending coordinates, and direction vector data.

[0022] After obtaining the set of continuous stripe directions, the set of continuous stripe directions is mapped back to the original neck image. Each continuous stripe direction is tracked point by point along its direction vector. Stripe extension bands are established on both sides of the stripe center line according to a fixed pixel width range. Gray values ​​are read point by point within the stripe extension bands, and the correspondence with the gray value change direction of the stripe center line is calculated. When the gray value change direction is consistent with the stripe direction, the pixel is included in the effective range of the stripe extension band. When the gray value change direction deviates from the stripe direction, the extension in that direction is stopped. Through the above processing, a complete stripe extension region is formed on both sides of each continuous stripe direction. Then, all stripe extension regions are spatially merged. Stripe extension regions that overlap in space are merged, and the connectivity of the merged region boundary is processed to remove isolated pixels and form a continuous closed boundary line. The stripe extension region is completely enclosed by the closed boundary line to obtain the interference contour region corresponding to the metal interference diffusion range.

[0023] The interference contour region undergoes boundary refinement processing. Statistical analysis is performed on the grayscale values ​​of pixels within the interference contour region, calculating the mean grayscale value and grayscale fluctuation range for each region. The grayscale fluctuation range is compared with the consistency of the stripe direction, and boundary pixels with directional deviations are corrected to ensure that the boundary of the interference contour region is consistent with the direction of the continuous stripes. Subsequently, the interference contour regions are numbered, and spatially adjacent regions with consistent stripe directions are merged into the same interference contour unit. After integrating all interference contour units, a final interference contour set is formed. The interference contour set completely covers the grayscale abrupt distribution area formed around the high-density abnormal region and is expressed with the direction of continuous stripes as the core feature, thus providing a clear spatial positioning basis for the subsequent boundary separation process.

[0024] By continuously tracking along the direction of continuous stripes in the original neck image using the interference contour set, the radially spreading artifact regions are separated, and an artifact exclusion region map is generated. The artifact exclusion region map is then overlaid onto the original neck image to form a boundary restriction range. After the spatial range of the metallic interference has been accurately determined by the interference profile set, the radially spreading artifact regions are continuously tracked, spatially separated, and their boundary constraints are constructed. The specific implementation steps are as follows: The interference contour set is completely mapped onto the pixel coordinate plane of the original neck image, so that each contour unit in the interference contour set corresponds to a specific pixel region in the original neck image. For each contour unit, the coordinates of its boundary pixel point are extracted, and the direction vector information corresponding to the continuous stripe direction set is read. This direction vector information is used as the tracking direction. Starting from the boundary pixel point of the contour unit, the tracking is advanced point by point along the direction corresponding to the continuous stripe direction. At each pixel position advanced, the gray value of the current pixel is read, and the gray value difference between the current pixel and the previous pixel and the direction of gray value change are calculated. When the gray value change direction is consistent with the direction of the continuous stripe direction and the gray value difference is within the preset difference range, the current pixel is included in the tracking path set, and the tracking continues to advance in the same direction. When the gray value change direction deviates from the direction of the continuous stripe direction, the advancement in that direction is stopped. By performing the above point-by-point advancement process on the boundary pixel point of each contour unit, multiple continuous tracking path sets radiating outward from the interference contour set are formed.

[0025] After obtaining the set of continuous tracking paths, each continuous tracking path is grouped according to its starting contour unit, and the extension angle and extension termination coordinate of each path are recorded in the spatial coordinate system. Multiple continuous tracking paths belonging to the same contour unit are sorted by angle, and paths with adjacent angles and spatial intervals within a set pixel distance range are merged to form a fan-shaped distribution area. During the merging process, the pixel gaps between paths are filled, and the pixels between paths are included in the same radial area. When the spatial interval between paths exceeds the set pixel distance range, the paths are kept independent. Through the above grouping and merging processes, the pixel area radiating outward around each interference contour unit forms a complete coverage area, resulting in the initial artifact diffusion area set. The initial artifact diffusion area set completely expresses the spatial morphology of radial diffusion from the interference contour set.

[0026] After the initial artifact diffusion region set is formed, the boundary of the region set is refined. The outer boundary pixels of the initial artifact diffusion region set are scanned point by point. The gray-level change trend and gray-level change direction of each outer boundary pixel are read and compared with the direction of the corresponding continuous stripes. When the gray-level change direction is consistent with the direction of the continuous stripes, the boundary pixel is retained. When the gray-level change direction changes, the region expansion in that direction is stopped. Then, the retained boundary pixels are spatially connected to form a continuous boundary line. The continuous boundary line is closed to ensure that the boundary line forms a complete closed contour in spatial coordinates. Pixels are filled inside the closed contour to generate a continuous and complete artifact removal region map, so that the artifact removal region map covers all radial pixel areas that diffuse outward from the interference contour set and forms an uninterrupted coverage range in space.

[0027] The resulting artifact exclusion region map is overlaid onto the original neck image, and all pixels within the artifact exclusion region map are uniformly marked, forming an independent spatial constraint layer in the original neck image. During subsequent boundary analysis processing of the original neck image, the contour extension operation stops when it approaches the boundary of the marked region, and the contour is prohibited from entering the marked region. Through the above overlay and marking processes, a fixed spatial correspondence is formed between the artifact exclusion region map and the original neck image, thereby constructing a boundary constraint range in the original neck image and achieving complete separation and spatial isolation of the radial diffusion artifact region.

[0028] Outside the boundary restriction range, gray-scale decreasing screening is performed on high-density areas to preserve the closed and intact lesion edges with stable gray-scale distribution, forming a restricted tumor boundary map; Based on the established boundary constraints and the clearly defined area covered by the artifact exclusion map, high-density areas outside the boundary constraints are screened using decreasing grayscale levels to construct a restricted tumor boundary map. The specific implementation steps are as follows: Within the spatial coordinate plane of the original neck image, the boundary restriction range is fixedly expressed in the form of pixel labels. All pixels within the boundary restriction range are assigned a restriction label, and all pixels outside the boundary restriction range are assigned a candidate label. Then, grayscale values ​​are read point by point from all candidate labeled pixels, and the grayscale values ​​are sorted hierarchically from maximum to minimum, dividing the grayscale values ​​into multiple consecutive grayscale levels. Each grayscale level corresponds to a specific grayscale interval. Starting from the highest grayscale level, the corresponding pixel is located in the spatial coordinates, and spatially adjacent pixels are connected. A first high-density candidate region is formed. Then, the process proceeds to the next gray level, and each pixel in the corresponding gray level is checked to see if it has a spatial adjacency with the first high-density candidate region. If a spatial adjacency exists, the pixel is merged into the first high-density candidate region. If no spatial adjacency exists, a new high-density candidate region is formed. This process is repeated layer by layer in descending order of gray level until all gray levels have been processed, thus forming a set of candidate high-density regions that expands layer by layer from the center outward. Each candidate high-density region contains continuous spatial coordinate information and corresponding gray level information.

[0029] After the candidate high-density region set is formed, the gray-level distribution stability is determined within each candidate high-density region. An arbitrary pixel is selected as the starting point within each candidate high-density region, and the gray-level values ​​of adjacent pixels are read point by point along the horizontal, vertical, and two diagonal directions to construct a gray-level change path within the region. The gray-level difference in the gray-level change path is recorded point by point to determine whether the gray-level value continuously decreases from the center outwards. If a gray-level value increases in the opposite direction or a gray-level difference jumps in a certain gray-level change path, the pixel position is recorded as an anomaly, and the candidate high-density region containing the anomaly is marked as a gray-level unstable region. Candidate high-density regions without anomalies are marked as gray-level stable regions. After completing the gray-level distribution stability determination for all candidate high-density regions, only the gray-level stable regions are retained to form the initial lesion edge candidate set, ensuring a consistent correspondence between the gray-level decreasing screening results and the spatial connectivity structure.

[0030] After the initial candidate set of lesion edges is formed, the closure integrity processing is performed on each gray-level stable region. All boundary pixels of the gray-level stable region are extracted in spatial coordinates, sorted in a clockwise direction, and connected sequentially to form a boundary curve. During the boundary curve formation process, if there is a gap between two boundary pixels, candidate pixels of the same gray level are searched within the gap range to supplement the connection, so that the boundary curve forms a continuous closed path in space. After the closed path is formed, all pixels inside the closed path are filled to form a closed region. Then, the gray levels inside the closed region are traversed again to confirm that the gray values ​​inside the region decrease gradually from the center to the boundary. Pixels with reverse gray-level distribution are removed, and the corresponding boundary curves are re-corrected to ensure that the closed region maintains a consistent gray-level decrease. Through the above processing, it is ensured that the retained region simultaneously meets the two conditions of closure integrity and gray-level stable distribution.

[0031] All regions that meet the conditions of complete closure and stable gray-level distribution are uniformly represented in the original neck image space. The boundary curves of each region are integrated to form a restricted tumor boundary map. During the integration process, spatially adjacent closed regions with the same gray-level decreasing trend are merged to form a continuous overall boundary structure. Non-adjacent regions are expressed independently, and the boundary pixel coordinates and gray-level distribution information of each region are recorded separately. The final restricted tumor boundary map only covers the closed, complete lesion edge region with stable gray-level distribution outside the boundary restriction range. This allows the restricted tumor boundary map to exclude the area affected by artifacts in spatial expression and to reflect continuous decreasing characteristics in gray-level expression, providing a controlled boundary basis for subsequent contour smoothing processing.

[0032] Contour smoothing is performed around the restricted tumor boundary map. During the contour smoothing process, the spatial coordinates of each outward-expanding pixel are compared. When the outward-expanding pixel is within the coverage area of ​​the artifact exclusion region map, the outward expansion operation in the current direction is stopped, forming a controlled tumor contour result. Given that the restricted tumor boundary map clearly expresses the lesion's closed boundary and the artifact exclusion area map covers the original neck image and forms a boundary restriction range, the restricted tumor boundary map undergoes constrained contour smoothing. The specific implementation steps are as follows: Within the spatial coordinate system of the original neck image, the coordinates of all boundary pixels of the restricted tumor boundary map are read point by point, and the boundary pixels are rearranged into a continuous closed sequence of boundary points according to spatial order. For each boundary pixel in the boundary point sequence, the spatial coordinates of its preceding and following pixels are extracted, and the curvature state of the current boundary pixel is determined by comparing the turning angles between three consecutive pixels. When an acute angle or abrupt change in the polygonal line occurs between three consecutive pixels, a new boundary pixel is inserted between the current boundary pixel and its adjacent boundary pixels at a fixed pixel interval, transforming the originally polygonal boundary segment into a continuous curve. During the insertion of the new boundary pixel, the gray value of the pixel position in the original neck image is read simultaneously, ensuring that the gray value is consistent with the gray-level decrease direction inside the restricted tumor boundary map. This achieves boundary continuity processing while maintaining the continuity of gray-level distribution, forming the first round of smoothed boundary set.

[0033] After completing the first round of boundary continuation processing, an outward expansion process is performed on the smoothed boundary set. Starting from each boundary pixel, the process moves outward by a fixed pixel distance along the boundary normal direction. During this process, the coordinates of the expanded pixels are recorded point by point, and the coordinates of each pixel are compared in real time to see if they fall within the coverage area of ​​the artifact exclusion region map. When an expanded pixel does not fall within the coverage area of ​​the artifact exclusion region map, the pixel is added to a new boundary set, and the process continues to move to the next pixel in the same direction. When an expanded pixel falls within the coverage area of ​​the artifact exclusion region map or spatially overlaps with a boundary pixel of the artifact exclusion region map, the outward expansion process in that direction is immediately stopped, and the last pixel that did not fall within the coverage area of ​​the artifact exclusion region map before stopping is taken as the final boundary point in that direction. Through the above point-by-point outward expansion and point-by-point judgment processing, the contour smoothing process is always spatially constrained by the corresponding position of the artifact exclusion region map.

[0034] After completing the outward expansion operation constrained by the artifact exclusion region map, the updated boundary set undergoes overall connectivity trimming. Multiple boundary segments formed due to the cessation of outward expansion are rearranged in spatial order. Intervals between adjacent boundary segments are connected point-by-point, with new boundary pixels inserted during the connection process. It is ensured that the newly added boundary pixels are outside the coverage area of ​​the artifact exclusion region map, and the corresponding grayscale values ​​are read to confirm that they maintain consistency with the grayscale decreasing direction within the restricted tumor boundary map. Subsequently, the curvature of the updated complete boundary curve is adjusted again, and boundary segments with local concavity or convexity are trimmed point-by-point to ensure a continuous and smooth boundary curve in space. All trimming operations use the corresponding position in the artifact exclusion region map as an insurmountable spatial constraint, thus ensuring that the smoothing process does not enter the coverage area of ​​the artifact exclusion region map.

[0035] After multiple rounds of outward expansion and connectivity trimming, the final boundary curve is uniformly expressed, and the coordinates of all boundary pixels are integrated into a controlled tumor contour result. During the integration process, the spatial relationship between each boundary pixel and the artifact exclusion region map is confirmed point by point to ensure that all boundary pixels are outside the coverage area of ​​the artifact exclusion region map, and that the gray values ​​corresponding to the boundary pixels maintain the same decreasing trend as the gray values ​​inside the restricted tumor boundary map. By using the restricted tumor boundary map as the initial boundary basis, and using the corresponding position of the artifact exclusion region map as the spatial condition for stopping outward expansion during the contour smoothing process, a controlled tumor contour result that has both a continuous and smooth shape and strictly avoids the artifact region is finally formed, thereby achieving a controlled expression of tumor boundary outward expansion at the spatial level.

[0036] The controlled tumor contour results are compared with adjacent slices. When the controlled tumor contour results suddenly jump outward, the controlled tumor contour results are rolled back to the corresponding range of the restricted tumor boundary map to continuously suppress false expansion. Based on the fact that controlled tumor contour results have been generated for all slices and each slice retains the corresponding restricted tumor boundary map, in order to avoid discontinuous expansion in the three-dimensional direction, the controlled tumor contour results between adjacent slices are compared slice by slice, and a rollback control is performed when a sudden outward jump occurs. The specific implementation steps are as follows: All slices were sequentially numbered according to the acquisition order of the original neck images. The controlled tumor contour and restricted tumor boundary map corresponding to each numbered slice were expressed in a unified spatial coordinate system. The current numbered slice was selected as the target slice, and the controlled tumor contour results of the previous and next numbered slices were read. All boundary pixel coordinates of the controlled tumor contour results of the target slice were extracted point by point in the spatial coordinate plane. For each boundary pixel coordinate, a corresponding coordinate neighborhood was established in the controlled tumor contour results of the previous and next numbered slices. The neighborhood was extended outward by a fixed pixel distance from the current pixel coordinate. The existence of a corresponding boundary pixel point was searched within the neighborhood, and the matching results were recorded, thereby constructing a spatially continuous correspondence between the target slice and adjacent slices.

[0037] After establishing the spatial continuity correspondence, a joint analysis of area and displacement is performed on the controlled tumor contour results of the target slice. The overall boundary area of ​​the controlled tumor contour results of the target slice is calculated, and the overall boundary area of ​​the previous and next numbered slices is calculated separately. When the overall boundary area of ​​the target slice exceeds a set proportion range of the difference between the areas of the previous and next numbered slices, the boundary displacement detection process begins. During the boundary displacement detection process, the spatial distance between the boundary pixel coordinates of each target slice and the corresponding boundary pixel coordinates of adjacent slices is calculated point by point. When the spatial distance of a boundary pixel coordinate exceeds a set pixel displacement threshold, the pixel is marked as an abnormal displacement point. All abnormal displacement points are spatially clustered, and spatially adjacent abnormal displacement points are merged into sudden outward jump regions, thus forming a set of sudden outward jump regions in the target slice.

[0038] After the set of sudden outward jump regions is formed, the controlled tumor contour result of the target slice is compared point by point with the restricted tumor boundary map corresponding to the target slice in the same spatial coordinates. For the boundary pixel coordinates belonging to the set of sudden outward jump regions, the position of the nearest boundary pixel in the restricted tumor boundary map is found, and the current boundary pixel coordinates are replaced with the boundary pixel coordinates in the corresponding restricted tumor boundary map. During the replacement process, the boundary pixel set is updated point by point, so that all pixels marked as sudden outward jump regions are back to the corresponding range of the restricted tumor boundary map. After the replacement of all abnormal displacement points is completed, the updated boundary pixel set is reordered and connected to ensure that the backed-up boundary curve remains closed and continuous, and is consistent with the gray-level decreasing direction inside the restricted tumor boundary map.

[0039] After completing one rollback process, the updated controlled tumor contour result is compared point-by-point with the controlled tumor contour results of the previous and next numbered slices, and the joint area and displacement analysis process is repeated. When there is no area difference exceeding the set ratio range and no abnormal displacement point exceeding the set pixel displacement threshold, the processing of the current target slice ends. Then, the same processing procedure is performed on the next numbered slice in sequence. By comparing adjacent slices around the controlled tumor contour result, when a sudden outward jump is detected, the process immediately rolls back to the corresponding range of the restricted tumor boundary map, thereby continuously suppressing false outward expansion in the three-dimensional direction, so that the final controlled tumor contour result maintains a continuous and consistent spatial expression among the numbered slices.

[0040] This invention constructs a set of interfering contours in the original neck image and forms an artifact exclusion region map. By establishing a spatial limitation range before the tumor boundary is generated, high-density artifacts are isolated at the structural level, preventing them from participating in the subsequent gray-scale reduction screening and contour smoothing process. This blocks the path of artifact residues transforming into the tumor boundary, so that the final tumor contour can truly reflect the lesion range, improve the spatial accuracy of target area delineation, and provide a stable and reliable boundary basis for radiotherapy dose distribution calculation.

[0041] This invention introduces artifact exclusion region map corresponding to the outward expansion stop control during the contour smoothing stage, and combines it with the before-and-after comparison and regression mechanism between adjacent slices to continuously suppress the controlled tumor contour results in three dimensions. This allows abnormal sudden outward jumps to return to the corresponding range of the restricted tumor boundary map in a timely manner, preventing false outward expansion from accumulating and expanding between slices. This reduces the probability of non-target tissues entering the irradiation range, reduces the dose exposure risk to normal neck tissues, and enhances the safety control capability during radiotherapy.

[0042] The foregoing has only described certain exemplary embodiments of the present invention by way of illustration. Undoubtedly, those skilled in the art can modify the described embodiments in various ways without departing from the spirit and scope of the present invention. Therefore, the foregoing drawings and descriptions are illustrative in nature and should not be construed as limiting the scope of protection of the claims of the present invention.

Claims

1. A method for cervical radiotherapy in nasopharyngeal carcinoma patients based on image processing, characterized in that, Includes the following steps: Acquire raw images of the neck containing metallic interference, draw a gray-scale abrupt change distribution map around the high-density abnormal area, extract the direction of continuous stripes based on the gray-scale abrupt change distribution map, and form an interference contour set; By continuously tracking along the direction of continuous stripes in the original neck image using the interference contour set, the radially spreading artifact regions are separated, and an artifact exclusion region map is generated. The artifact exclusion region map is then overlaid onto the original neck image to form a boundary restriction range. Outside the boundary restriction range, gray-scale decreasing screening is performed on high-density areas to preserve the closed and intact lesion edges with stable gray-scale distribution, forming a restricted tumor boundary map; Contour smoothing is performed around the restricted tumor boundary map. During the contour smoothing process, the spatial coordinates of each outward-expanding pixel are compared. When the outward-expanding pixel is within the coverage area of ​​the artifact exclusion region map, the outward expansion operation in the current direction is stopped, forming a controlled tumor contour result. By comparing adjacent slices based on the controlled tumor contour results, when a sudden outward jump occurs in the controlled tumor contour results, the controlled tumor contour results are reverted to the corresponding range of the restricted tumor boundary map, thus completing the continuous suppression of false outward expansion.

2. The method for cervical radiotherapy in nasopharyngeal carcinoma patients based on image processing according to claim 1, characterized in that, The steps for forming the interference contour set are as follows: The original neck image is analyzed pixel by pixel grayscale. All pixels are traversed in row and column order. The grayscale difference between each pixel and its eight adjacent pixels is calculated. Pixels with grayscale differences exceeding the preset gradient threshold are marked as grayscale abrupt change points. All grayscale abrupt change points are summarized to generate a grayscale abrupt change distribution map. Spatial clustering analysis is performed on gray-level abrupt change points in the gray-level abrupt change distribution map to form gray-level abrupt change clustering regions. Gray-level abrupt change points with consistent directions are extracted from each gray-level abrupt change clustering region and extended. Extended trajectories with directional angles smaller than a set angle range are integrated to form a set of continuous stripe directions. The continuous stripe direction set is mapped onto the original neck image. Stripe extension bands are established along the continuous stripe direction to form stripe extension regions. Spatial merging and connectivity processing is performed on the stripe extension regions to enclose and form interference contour regions. Boundary correction and region integration are performed on the interference contour regions to form a set of interference contours covering high-density anomaly regions.

3. The method for cervical radiotherapy in nasopharyngeal carcinoma patients based on image processing according to claim 2, characterized in that, The steps for generating an artifact exclusion region map and establishing boundary constraints are as follows: The interference contour set is mapped onto the original neck image, the coordinates of the boundary pixels of each contour unit are extracted, and the process is advanced point by point along the direction of continuous stripes. A continuous tracking path set is formed based on the gray-level difference and the direction of gray-level change. The set of continuous tracking paths is grouped according to the starting contour unit. Continuous tracking paths that are angularly adjacent and whose spatial interval is within a set pixel distance range are merged to form an initial set of artifact diffusion regions. Boundary scanning and connectivity processing are performed on the initial set of artifact diffusion regions to enclose and form an artifact exclusion region map. The artifact exclusion region map is overlaid onto the original neck image, and the pixels inside the artifact exclusion region map are marked to construct the boundary constraint range.

4. The method for cervical radiotherapy in nasopharyngeal carcinoma patients based on image processing according to claim 3, characterized in that, The steps for forming a restricted tumor boundary map are as follows: The boundary limit range is expressed in the form of pixel markers. The gray value is read point by point outside the boundary limit range. The gray level is divided according to the decreasing order of gray value and spatial connectivity processing is performed to form a set of candidate high-density regions. The stability of grayscale distribution of the candidate high-density region set is determined, and grayscale change paths are constructed along the horizontal, vertical and diagonal directions. Candidate high-density regions with continuous grayscale decrease are retained to form an initial lesion edge candidate set. The initial lesion edge candidate set is processed for closure integrity, the boundary pixels are extracted and connected to form a closed path, the inside of the closed path is filled and the gray-level inverse distribution pixels are corrected; Regions that meet the conditions of complete closure and stable gray-scale distribution are integrated and expressed to form a restricted tumor boundary map.

5. The method for cervical radiotherapy in nasopharyngeal carcinoma patients based on image processing according to claim 4, characterized in that, When determining the stability of grayscale distribution in the candidate high-density region set, each candidate high-density region is continuously read along the grayscale change path from the center to the boundary. When there are pixels with reverse distribution in the grayscale change path, the corresponding region is removed, and the boundary pixels of the remaining region are reconnected and corrected to limit the restricted tumor boundary map to only include regions with continuous grayscale decrease and closed boundaries.

6. The method for cervical radiotherapy in nasopharyngeal carcinoma patients based on image processing according to claim 4, characterized in that, The steps for generating controlled tumor profile results are as follows: Read the boundary pixel coordinates of the restricted tumor boundary map point by point, and arrange the boundary pixels into a continuous closed boundary point sequence according to spatial order; Curvature analysis is performed on each boundary pixel in the boundary point sequence. New pixels are inserted to transform the polyline shape into a continuous curve shape, ensuring that the grayscale value is consistent with the restricted tumor boundary map. The smoothed boundary set is expanded outward, advancing along the boundary normal direction, and the entry into the artifact exclusion region map is compared in real time. When an overlap is encountered, the expansion stops, and the last pixel that has not entered the artifact exclusion region map is retained. The updated boundary set is subjected to connectivity adjustment, new boundary pixels are inserted, and concave or convex boundary segments are corrected to ensure that the smoothed boundary curve is spatially continuous, ultimately forming a controlled tumor contour result.

7. The method for cervical radiotherapy in nasopharyngeal carcinoma patients based on image processing according to claim 6, characterized in that, During the outward expansion process, as the boundary pixels advance along the normal direction, a spatial comparison of the artifact exclusion region map is performed simultaneously. The advancement is terminated when the advancement path spatially coincides with the boundary of the artifact exclusion region map, and the corresponding boundary pixels are limited to the restricted tumor boundary map.

8. The method for cervical radiotherapy in nasopharyngeal carcinoma patients based on image processing according to claim 6, characterized in that, The steps for comparing adjacent slices and then rolling back control are as follows: All slices are numbered according to the acquisition order. The controlled tumor contour results and restricted tumor boundary map of each numbered slice are expressed in a unified spatial coordinate system. Target slices are selected and spatial correspondence with the previous and next numbered slices is established. Area statistics and boundary displacement analysis are performed on the controlled tumor contour results of the target slice to identify boundary pixels whose spatial distance exceeds the set pixel displacement threshold and form a set of sudden outward jump regions; Replace the boundary pixel coordinates in the set of sudden out-of-boundary regions with the boundary pixel coordinates within the corresponding range of the restricted tumor boundary map, update the boundary pixel set and perform connectivity processing; The updated controlled tumor contour results were spatially compared with adjacent slices again, and area statistics and boundary displacement analysis were repeated to achieve continuous suppression of false expansion.