Method, system, device and medium for processing medical images

By using medical image processing methods, image thresholding and graph cutting algorithms are employed to automatically segment vertebral segments, solving the problems of time-consuming manual segmentation and large differences in results in existing technologies. This achieves efficient and accurate vertebral segmentation and image navigation, assisting in surgical planning.

CN116228720BActive Publication Date: 2026-07-24SHANGHAI ELECTRICGROUP CORP
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANGHAI ELECTRICGROUP CORP
Filing Date
2023-03-08
Publication Date
2026-07-24

AI Technical Summary

Technical Problem

In existing technologies, vertebral segmentation in spinal surgery relies on manual operation by doctors, which is time-consuming and results in large variations. Furthermore, machine learning-based methods are highly complex and have poor interpretability.

Method used

By employing medical image processing methods, this method acquires the labeling information of benchmark spinal images and utilizes image thresholding, morphological operations, and Boolean operations, combined with neighborhood iteration algorithms and maximum flow minimum cut algorithms, to automatically segment vertebral images, achieving high-precision segmentation without human intervention.

Benefits of technology

It achieves efficient and accurate segmental imaging, reduces the burden on doctors, provides reliable image navigation, and assists in surgical planning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116228720B_ABST
    Figure CN116228720B_ABST
Patent Text Reader

Abstract

The application discloses a medical image processing method, system, device and medium. The application is applied to a spine medical image, and the processing method comprises the following steps: acquiring mark information of a target vertebra in a reference spine medical image; based on the mark information, a first target vertebra image is segmented from the reference spine medical image; wherein the first target vertebra image comprises a first target vertebra region and a first adjacent vertebra region; effective pixels in the first target vertebra region and the first adjacent vertebra region are screened, and the effective pixels are used for representing boundaries of the first target vertebra region and the first adjacent vertebra region; and based on the effective pixels, a target vertebra image corresponding to a target vertebra is constructed. Through the algorithm idea of the pixel screening graph cut operation, the image threshold operation, the morphological operation and the Boolean operation are integrated, the target is quickly initialized and positioned by using simple marking, an automatic segmentation process without manual intervention is realized, and the speed and the universality of the image segmentation are greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, and in particular to a method, system, device and medium for processing medical images. Background Technology

[0002] Anterior cervical controlled anterior fusion (ACAF) is a spinal surgery procedure indicated for conditions including ossification of the posterior longitudinal ligament of the cervical spine and cervical spinal stenosis. This surgery targets the complex of ossified vertebral bodies, ligaments, and dura mater in the cervical spine. Through precise positioning, transection, and movement of this complex, it improves upon the traditional method of destroying the complex by utilizing it. Based on the novel concept of anterior displacement of ossified material, it achieves spinal canal anatomy and reshaping, thus realizing direct decompression of the anterior cervical spine.

[0003] The key to ACAF surgery is the localization, dissection, and repositioning of the vertebral body (the complex of ossifications, ligaments, and dura mater). Preoperatively, surgeons need to take CT scans of the patient's cervical spine to design a suitable surgical plan. Surgeons can utilize intraoperative imaging, surgical navigation systems, and surgical robotic systems to execute the plan and complete the procedure. During the surgery, surgeons typically need to segment and reconstruct the cervical vertebrae, help locate the affected vertebra, and plan the location and direction of the osteotomy.

[0004] Current methods require doctors to manually segment each vertebral segment, and the accuracy of the segmentation results depends heavily on the doctor's experience and skill level. This process is time-consuming and labor-intensive, placing a significant burden on doctors. Existing machine learning-based recognition models are highly complex, require large amounts of labeled datasets, and suffer from poor interpretability and limitations due to the significant differences in image representation between diseased and normal vertebral segments. Summary of the Invention

[0005] The technical problem to be solved by the present invention is to overcome the shortcomings of the prior art in which the segmentation of vertebrae requires manual operation by doctors, which is time-consuming and has large differences in results, and to provide a method, system, device and medium for processing medical images.

[0006] The present invention solves the above-mentioned technical problems through the following technical solution:

[0007] The first aspect provides a method for processing medical images, applied to spinal medical images, the processing method comprising:

[0008] Obtain the labeling information of the target vertebral segment from the baseline spinal medical images;

[0009] The first target vertebral segment image is segmented from the baseline spinal medical image based on the labeled information;

[0010] The first target vertebral segment image includes a first target vertebral segment region and a first adjacent vertebral segment region;

[0011] Filter the effective pixels in the first target vertebral segment region and the first adjacent vertebral segment region, wherein the effective pixels are used to characterize the boundary between the first target vertebral segment region and the first adjacent vertebral segment region;

[0012] Based on the effective pixels, an image of the target vertebral segment corresponding to the target vertebral segment is constructed.

[0013] Preferably, the step of filtering effective pixels in the target vertebral segment image and the adjacent vertebral segment images includes:

[0014] The first target vertebral segment image is segmented based on a preset threshold to obtain a first computational mask;

[0015] The effective pixels of the first target vertebral segment image are obtained by processing the first computational mask using a neighborhood iterative algorithm.

[0016] Preferably, the step of constructing the target vertebral segment image based on the effective pixels includes:

[0017] Generate corresponding reference nodes based on the effective pixels;

[0018] A first terminal node and a second terminal node are generated in the first target vertebral segment region and the first adjacent vertebral segment region, respectively.

[0019] Wherein, the first terminal node is represented as a source point in the first target vertebral segment region, and the second terminal node is represented as a sink point in the first adjacent vertebral segment region;

[0020] Terminal edges are formed by connecting the reference node with the first terminal node and the second terminal node, and adjacent edges are generated by connecting adjacent reference nodes.

[0021] Set the weights corresponding to the terminal edge and the adjacent edge;

[0022] The maximum flow minimum cut algorithm is used to calculate the terminal edge and the adjacent edge according to the weight to obtain the second target vertebral region constructed based on the effective pixels and the second adjacent vertebral region adjacent to the second target vertebral region;

[0023] The second target vertebral segment image is obtained based on the second target vertebral segment region, the second adjacent vertebral segment region, and the first target vertebral segment image, and the second target vertebral segment image is used as the target vertebral segment image.

[0024] Preferably, the step of processing the first target vertebral segment image using a neighborhood iterative algorithm based on the first computational mask to obtain the effective pixels includes:

[0025] Filter out the first pixel within the first computational mask;

[0026] A number of first pixels in the first target vertebral segment region and the first adjacent vertebral segment region are selected as the effective pixels, and the neighboring pixels of the effective pixels include the first pixels belonging to different regions.

[0027] Preferably, the step of constructing the target vertebral segment image corresponding to the target vertebral segment based on the effective pixels further includes:

[0028] The image of the second target vertebral segment is iteratively processed based on preset processing rules;

[0029] In response to the number of iterations reaching a set threshold, the updated image of the target vertebral segment corresponding to the target vertebral segment is obtained;

[0030] The segmentation accuracy of the boundary of the target vertebral segment in the target vertebral segment image is higher than that of the boundary of the target vertebral segment in the second target vertebral segment image.

[0031] Preferably, the step of iteratively processing the second target vertebral segment image based on preset processing rules includes:

[0032] The third target vertebral segment image is obtained by resegmenting the baseline spinal medical image based on the second target vertebral segment image;

[0033] The binarized data of the target vertebral segment is obtained by performing Boolean summation on the second target vertebral segment region and the second adjacent vertebral segment region.

[0034] The binarized data is sequentially subjected to closing operation, hole filling operation and dilation operation to obtain the second computational mask;

[0035] Update the second target vertebral segment region and the second adjacent vertebral segment region to obtain the corresponding third target vertebral segment region and the third adjacent vertebral segment region;

[0036] The image of the fourth target vertebra is obtained by calculating the second computational mask, the third target vertebral region, and the third adjacent vertebral region based on the maximum flow minimum cut algorithm;

[0037] The image of the fourth target vertebral segment is used as the target vertebral segment image.

[0038] Preferably, the processing method further includes:

[0039] Acquire the target vertebral segment images corresponding to each target vertebral segment in the baseline spinal medical images;

[0040] All the target vertebral segment images are pieced together according to a set sorting method to reconstruct the target spinal image corresponding to the spine included in the baseline spinal medical image.

[0041] The second aspect provides a medical image processing system for spinal medical imaging, the processing system including an acquisition module, a segmentation module, a filtering module and a construction module;

[0042] The acquisition module is used to acquire the marking information of the target vertebral segment in the benchmark spinal medical image;

[0043] The segmentation module is used to segment the first target vertebral segment image from the reference spinal medical image based on the labeling information;

[0044] The first target vertebral segment image includes a first target vertebral segment region and a first adjacent vertebral segment region;

[0045] The filtering module is used to filter valid pixels in the first target vertebral segment region and the first adjacent vertebral segment region, wherein the valid pixels are used to characterize the boundary between the first target vertebral segment region and the first adjacent vertebral segment region.

[0046] The construction module is used to construct the target vertebral segment image corresponding to the target vertebral segment based on the effective pixels.

[0047] A third aspect provides an electronic device, including a memory, a processor, and a computer program stored in the memory and for running on the processor, characterized in that the processor executes the computer program to implement the medical image processing method described above.

[0048] A fourth aspect provides a computer storage medium having a computer program stored thereon, characterized in that the computer program, when executed by a processor, implements the medical image processing method described above.

[0049] Based on common knowledge in the field, the above-mentioned preferred conditions can be combined arbitrarily to obtain various preferred embodiments of the present invention.

[0050] The significant advantages of this invention are as follows: It employs a pixel-based composite image cut operation (also known as image segmentation) algorithm, integrating image thresholding, morphological operations, and Boolean operations. This allows for rapid initialization and localization of segmentation targets using simple markers, achieving an automated segmentation process without human intervention. The algorithm allows for free specification of the target location and number of targets, offering greater freedom and scalability. Furthermore, it utilizes an independent segmentation task allocation model for each target, ensuring that each task is independent and unaffected by others, and is compatible with parallel thread processing, greatly improving the segmentation speed and versatility of medical images. High-precision vertebral segment images enable the reconstruction and restoration of corresponding spinal images, reducing the workload for surgeons during surgery and providing reliable and accurate image navigation to assist surgeons in efficiently completing surgical plans. Attached Figure Description

[0051] Figure 1 This is a first flowchart of the medical image processing method according to Embodiment 1 of the present invention;

[0052] Figure 2 This is a second flowchart of the medical image processing method according to Embodiment 1 of the present invention;

[0053] Figure 3 This is a third flowchart of the medical image processing method according to Embodiment 1 of the present invention;

[0054] Figure 4 This is the fourth flowchart of the medical image processing method according to Embodiment 1 of the present invention;

[0055] Figure 5 This is the fifth flowchart of the medical image processing method according to Embodiment 1 of the present invention;

[0056] Figure 6 This is a first example diagram of the medical image processing method according to Embodiment 1 of the present invention;

[0057] Figure 7 This is a second example diagram of the medical image processing method according to Embodiment 1 of the present invention;

[0058] Figure 8 This is a third example diagram of the medical image processing method according to Embodiment 1 of the present invention;

[0059] Figure 9 This is a fourth example diagram of the medical image processing method according to Embodiment 1 of the present invention;

[0060] Figure 10 This is a schematic diagram of the modules of the medical image processing system according to Embodiment 2 of the present invention;

[0061] Figure 11 This is a schematic diagram of the hardware structure of the electronic device according to Embodiment 3 of the present invention. Detailed Implementation

[0062] The present invention will be further illustrated by way of embodiments below, but the present invention is not limited to the scope of the embodiments described herein.

[0063] In the description of this invention, it should be understood that the terms "center," "longitudinal," "lateral," "length," "width," "thickness," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," "outer," "clockwise," and "counterclockwise," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this invention.

[0064] Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first," "second," or "third" may explicitly or implicitly include one or more of that feature. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.

[0065] Example 1

[0066] This embodiment provides a method for processing medical images, such as... Figure 1 As shown, the processing method, applied to spinal medical imaging, includes:

[0067] S101. Obtain the marking information of the target vertebral segment in the baseline spinal medical image;

[0068] S102. Based on the labeled information, segment the first target vertebral segment image from the baseline spinal medical image;

[0069] The first target vertebral segment image includes a first target vertebral segment region and a first adjacent vertebral segment region;

[0070] S103. Filter the effective pixels in the first target vertebral segment region and the first adjacent vertebral segment region, wherein the effective pixels are used to characterize the boundary between the first target vertebral segment region and the first adjacent vertebral segment region.

[0071] S104. Based on the effective pixels, construct the target vertebral segment image corresponding to the target vertebral segment.

[0072] As a feasible approach, such as Figure 2 As shown, step S103 includes:

[0073] S1031. The first target vertebral segment image is segmented based on a preset threshold to obtain a first computational mask;

[0074] S1032. The neighborhood iterative algorithm is used to process the first computational mask to obtain the effective pixels of the first target vertebral segment image.

[0075] As one feasible approach, taking cervical spine CT images as an example, marking information is placed on the target vertebrae in the cervical spine CT image to be segmented. The marking information corresponds one-to-one with the target vertebrae to be segmented. The marking information is formed using methods including but not limited to lasso, pen, fill, and / or automatic generation. The marking information includes or covers the pixels of the corresponding target vertebrae, but does not include the pixels of adjacent vertebrae outside the target vertebrae. The marked portion may partially extend beyond the corresponding target vertebrae, but does not include completely adjacent vertebrae.

[0076] As a feasible approach, preprocessing is performed on the cervical spine CT images to be segmented, including threshold segmentation, segmented cropping imagery, and segmentation task planning. Threshold segmentation involves setting a threshold for binarizing the CT images based on actual needs, roughly extracting bone tissue as an initial mask for segmentation. Segmented cropping imagery involves cropping each target vertebra in the CT image according to the labeled information. The cropped result for each target vertebra includes the corresponding target vertebra and adjacent vertebrae, preparing for further image processing. Segmentation task planning involves assigning corresponding labeled information to each target annotation and making the annotation processes for each target independent, preparing for subsequent parallel tasks.

[0077] As an feasible approach, the segmented target vertebral segment image is cropped using a preset threshold as the first calculation mask. The preset threshold can be a grayscale threshold. Based on the labeling information, the corresponding target vertebral segment region and adjacent vertebral segment regions are obtained. The effective pixels of the boundary regions of the target vertebral segment region and adjacent vertebral segment regions are filtered, and the corresponding target vertebral segment image is constructed based on the effective pixels.

[0078] As one possible approach, step S1032 includes:

[0079] Filter out the first pixel within the first computational mask;

[0080] Select a number of effective pixels of the first pixel in the first target vertebral segment region and the first adjacent vertebral segment region, wherein the neighboring pixels of the effective pixels include the first pixels belonging to different regions.

[0081] As an feasible approach, based on the actual graph cut operation requirements, the CT image of the target vertebral segment is converted into the corresponding node flow map. The first screening is performed according to the first computational mask, retaining a number of first pixels within the first computational mask. The first pixels are then screened a second time using a neighborhood iteration algorithm with six connectivity (including six directions: up, down, left, right, front, and back), and all remaining first pixels are taken as valid pixels.

[0082] As an feasible approach, the target vertebral region in the first target vertebral image is used as the computational foreground, and adjacent vertebral segments are used as the computational background. In practice, the corresponding computational foreground and computational background can be set according to the requirements. In the second filtering process, if the current first pixel belongs to the foreground and all the first pixels of its neighboring pixels belong to the computational foreground, then the current first pixel can be excluded; similarly, if the current first pixel belongs to the background and all the first pixels of its neighboring pixels belong to the computational background, then the current first pixel can be excluded.

[0083] By filtering valid pixels, the transformation and calculation process in image cutting can be effectively simplified, the computation time can be reduced, and the efficiency of the entire image cutting process can be improved.

[0084] As a feasible approach, such as Figure 3 As shown, step S104 includes:

[0085] S1041. Generate a corresponding reference node based on the effective pixels;

[0086] S1042. Generate a first terminal node and a second terminal node in the first target vertebral segment region and the first adjacent vertebral segment region, respectively.

[0087] Wherein, the first terminal node is represented as a source point in the first target vertebral segment region, and the second terminal node is represented as a sink point in the first adjacent vertebral segment region;

[0088] S1043. Terminal edges are formed based on the connection between the reference node and the first terminal node and the second terminal node, and adjacent edges are generated based on the connection between adjacent reference nodes.

[0089] S1044. Set the weights corresponding to the terminal edge and the adjacent edge;

[0090] S1045. The maximum flow minimum cut algorithm is used to process the terminal edge and the adjacent edge according to the weight to obtain the second target vertebral region constructed based on the effective pixels and the second adjacent vertebral region adjacent to the second target vertebral region.

[0091] S1046. Obtain the second target vertebral segment image based on the second target vertebral segment region, the second adjacent vertebral segment region, and the first target vertebral segment image, and use the second target vertebral segment image as the target vertebral segment image.

[0092] As one feasible approach, after obtaining the effective pixels, the next step is to construct nodes, and then construct edges from these nodes. The node construction process includes setting the source and sink points as terminal nodes based on the corresponding computed foreground and background, and generating corresponding reference nodes based on the effective pixels. The final result is a node graph containing two terminal nodes and several reference nodes. The edge construction process involves connecting all reference nodes to the source and sink points to form terminal edges, and connecting several reference nodes to adjacent reference nodes to form adjacent edges. As a preferred approach, considering the bidirectional nature of adjacent edges, to avoid repeatedly generating adjacent edges, a three-way connection (including center to right, center to back, and center to top) generation method is used during the adjacent edge generation process.

[0093] As an feasible approach, the weights of the terminal edge and adjacent edge are set. The weights can be replaced with traffic or penalties based on actual needs. Based on the constructed baseline node, terminal node, terminal edge and adjacent edge, a node traffic graph is generated by assigning reasonable weights, traffic or penalties to each terminal edge and adjacent edge, which serves as the basis for graph cut operation.

[0094] As an feasible approach, the penalty assigned to a terminal edge represents the penalty for the corresponding node itself being marked as foreground or background, and is denoted as the region term R, representing the penalty for the region corresponding to that node. The penalty assigned to an adjacent edge represents the penalty for both the corresponding node and its adjacent nodes being marked as foreground or background, and is denoted as the boundary term B, representing the penalty for the boundary of the region where that node is located. For the completed node flow graph, if the graph cut result is A, then the total penalty calculation formula for A is:

[0095] E(A)=λR(A)+B(A)

[0096] Where E(A) is the total penalty (total energy) of the graph cut result A, λ is the region term coefficient, representing the proportion of the region term that needs to be considered when calculating the total penalty, and R(A) is the overall region term, calculated using the following formula:

[0097]

[0098] Where P is the set of nodes (pixels), p is any node (pixel), and R p (A p ) represents the region (penalty) item corresponding to node p, calculated using the following formula:

[0099] R p (A p )=-lnP(Ip |A)

[0100] Where P(I) p |A) is the likelihood probability that node p belongs to graph cut result A, I p Let R be the pixel value corresponding to node p. Generally speaking, the higher the probability that node p belongs to graph cut result A (corresponding label), the higher R is. p (A p The smaller the value of B(A), the smaller the penalty. B(A) is the overall boundary term, and its calculation formula is:

[0101]

[0102] Where N is the set of edges (adjacent pixel pairs), p and q are a pair of adjacent nodes, and B {p,q} The boundary (penalty) term for adjacent nodes p and q is calculated using the following formula:

[0103]

[0104] Among them, I p I is the pixel value corresponding to node p. q Let σ be the pixel value corresponding to node q. 2 This represents the variance of the corresponding Gaussian distribution. Generally, the higher the similarity between node p and node q, the better B... {p,q} The larger (the greater the penalty), the greater δ(A) p A q ) represents the boundary penalty term coefficient, and its calculation formula is:

[0105]

[0106] When nodes p and q are set to the same value, the coefficient of the boundary penalty term is set to 0, and the corresponding boundary penalty term is no longer calculated.

[0107] As an feasible approach, based on the constructed node flow graph, the set of edges with the lowest total penalty (energy) is determined by using the maximum flow minimum cut method, considering the weights, flows, or penalties of all edges in the graph. The corresponding edges in the node flow graph are then disconnected, resulting in some nodes connected to the source node to form a new foreground, and others connected to the sink node to form a new background. This new foreground or background is used to characterize the reconstructed target vertebral region or adjacent vertebral regions in the target vertebral image. The target vertebral images corresponding to each vertebra are saved for further processing.

[0108] As one possible approach, step S104 further includes:

[0109] S1047. The second target vertebral segment image is iteratively processed based on preset processing rules;

[0110] S1048. In response to the number of iterations reaching a set threshold, the updated image of the target vertebral segment corresponding to the target vertebral segment is obtained.

[0111] The accuracy of the target vertebral segment image is higher than that of the second target vertebral segment image.

[0112] As a feasible approach, a threshold for setting the number of iterations can be adjusted according to the actual needs of the output target vertebral segment image. In order to simplify the graph cutting process and maximize graph cutting efficiency, the target vertebral segment image can be finely updated with only one iteration.

[0113] As a feasible approach, such as Figure 4 As shown, step S1047 includes:

[0114] S10471. Based on the second target vertebral segment image, the benchmark spinal medical image is re-segmented to obtain a third target vertebral segment image;

[0115] S10472. Perform Boolean summation on the second target vertebral segment region and the second adjacent vertebral segment region to obtain the binarized data of the target vertebral segment;

[0116] S10473. Perform closing operation, hole filling operation and dilation operation on the binarized data in sequence to obtain the second computational mask;

[0117] S10474. Update the second target vertebral segment region and the second adjacent vertebral segment region to obtain the corresponding third target vertebral segment region and the third adjacent vertebral segment region.

[0118] S10475. Calculate the second computational mask, the third target vertebral region, and the third adjacent vertebral region based on the maximum flow minimum cut algorithm to obtain the fourth target vertebral image;

[0119] S10476. The fourth target vertebral segment image is used as the target vertebral segment image.

[0120] As one feasible approach, after obtaining the second computational mask, the foreground or background corresponding to the target vertebral segment region and adjacent vertebral segment regions are recalculated. Specifically, based on the target vertebral segment result obtained from the second target vertebral segment image and adjacent vertebral segments, erosion operation, (maximum) connected component extraction operation, and hole filling operation are performed sequentially. Based on the results of the operations, Boolean summation is performed to obtain a more accurate computational foreground and background, forming an updated target vertebral segment image. The updated target vertebral segment images corresponding to each target vertebral segment are saved for subsequent further iterative updates or as target vertebral segment image output.

[0121] As a feasible approach, such as Figure 5As shown, the processing method further includes:

[0122] S105. Obtain the target vertebral segment images corresponding to each target vertebral segment in the baseline spinal medical image;

[0123] S106. All the target vertebral segment images are pieced together according to a set sorting method to reconstruct the target spinal image corresponding to the spine included in the baseline spinal medical image.

[0124] As one feasible approach, the target vertebral segment images corresponding to each independently segmented target vertebral segment are sequentially copied to the benchmark spinal medical image or reconstructed based on the benchmark medical image according to the corresponding marking information in the benchmark spinal medical image, thus obtaining the target spinal image.

[0125] The working principle of the medical image processing method in this embodiment is illustrated below with examples:

[0126] Use such as Figure 6 The CT image of the cervical spine to be segmented shown has a pixel size of 0.32*0.32mm, a slice thickness of 0.5mm, a spatial resolution of 512*512*311, and a scanning range covering the entire cervical spine and part of the thoracic spine.

[0127] The segmentation target in this example is the cervical spine, such as... Figure 6 As shown, the target vertebral segment 1 is marked on any two-dimensional slice of the cervical spine CT image to be segmented. In this example, coronal slices are used.

[0128] The cervical spine CT images to be segmented were preprocessed, and grayscale thresholding was performed. An initial calculation mask was extracted based on a threshold range of 226 to 3071. The cervical spine CT images to be segmented were then cropped into segments using a 160*160*60mm window centered on the location marker of the target vertebra 1.

[0129] Then, multi-threaded parallel tasks are enabled to sequentially plan each segmentation target vertebra 1 for steps S103 to S104.

[0130] Performing the coarse segmentation process in steps S1041 to S1046 yields the following results: Figure 7 The coarse segmentation result of the target vertebra 1 is shown;

[0131] Performing steps S10471 to S10476 of the fine segmentation process yields the following results: Figure 8 The fine segmentation result of the target vertebra 1 is shown;

[0132] Based on the requirements, step S1048 is selected to obtain the target vertebral segment image.

[0133] Finally, based on the target vertebral segment images of each vertebral segment, steps S105 and S106 are performed to obtain the results shown in the attached figure. Figure 9 The three-dimensional reconstruction results of the segmented target vertebral segment.

[0134] The medical image processing method provided in this embodiment employs a pixel-filtering composite image cut operation algorithm, integrating image thresholding, morphological operations, and Boolean operations. It utilizes simple markers to quickly initialize and locate segmentation targets, achieving an automated segmentation process without human intervention. The method allows for free specification of the target location and number of targets to be segmented, offering greater freedom and scalability. Furthermore, it uses an independent segmentation task allocation mode for each target, ensuring that each task is independent and does not affect others, and is compatible with parallel thread processing, greatly improving the speed and versatility of image segmentation. High-precision vertebral segment images enable the reconstruction and restoration of corresponding spinal images, reducing the burden on surgeons during surgery and providing reliable and accurate image navigation to assist surgeons in efficiently completing surgical plans.

[0135] Example 2

[0136] This embodiment provides a medical image processing system 200, such as... Figure 10 As shown, the processing system, applied to spinal medical imaging, includes an acquisition module 201, a segmentation module 202, a filtering module 203, and a construction module 204.

[0137] The acquisition module 201 is used to acquire the marking information of the target vertebral segment in the benchmark spinal medical image;

[0138] The segmentation module 202 is used to segment the first target vertebral segment image from the reference spinal medical image based on the marking information;

[0139] The first target vertebral segment image includes a first target vertebral segment region and a first adjacent vertebral segment region;

[0140] The filtering module 203 is used to filter valid pixels in the first target vertebral segment region and the first adjacent vertebral segment region, wherein the valid pixels are used to characterize the boundary between the first target vertebral segment region and the first adjacent vertebral segment region.

[0141] The construction module 204 is used to construct a target vertebral segment image corresponding to the target vertebral segment based on the effective pixels.

[0142] As one possible approach, the filtering module 203 is also used to segment the first target vertebral segment image based on a preset threshold to obtain a first computational mask;

[0143] The effective pixels of the first target vertebral segment image are obtained by processing the first computational mask using a neighborhood iterative algorithm.

[0144] In one possible implementation, the construction module 204 includes a node generation unit, an edge construction unit, a weight setting unit, and a processing unit;

[0145] The node generation unit is used to generate a corresponding reference node based on the effective pixels; and to generate a first terminal node and a second terminal node in the first target vertebral segment region and the first adjacent vertebral segment region, respectively; wherein, the first terminal node is represented as a source point in the first target vertebral segment region, and the second terminal node is represented as a sink point in the first adjacent vertebral segment region;

[0146] The edge generation unit is used to generate terminal edges based on the connection between the reference node and the first terminal node and the second terminal node, and to generate adjacent edges based on the connection between adjacent reference nodes.

[0147] The weight setting unit is used to set the weights corresponding to the terminal edge and the adjacent edge;

[0148] The processing unit is configured to use the maximum flow minimum cut algorithm to process the terminal edge and the adjacent edge according to the weight, so as to obtain a second target vertebral region constructed based on the effective pixels and a second adjacent vertebral region adjacent to the second target vertebral region; to obtain a second target vertebral image based on the second target vertebral region, the second adjacent vertebral region and the first target vertebral image, and to use the second target vertebral image as the target vertebral image.

[0149] In one possible implementation, the filtering module 203 is further configured to filter out the first pixel within the first computational mask; select a number of valid pixels of the first pixel in the first target vertebral region and the first adjacent vertebral region, wherein the neighboring pixels of the valid pixels include the first pixels belonging to different regions.

[0150] As one possible implementation, the building module further includes an update unit 205;

[0151] The updating unit 205 is used to iteratively process the second target vertebral segment image based on preset processing rules; in response to the number of iterations reaching a set threshold, the updated target vertebral segment image is obtained; wherein the accuracy of the target vertebral segment image is higher than that of the second target vertebral segment image.

[0152] As one possible approach, the segmentation module 202 is also used to re-segment the baseline spinal medical image based on the second target vertebral segment image to obtain a third target vertebral segment image;

[0153] The filtering module 203 is further configured to perform Boolean summation on the second target vertebral segment region and the second adjacent vertebral segment region to obtain the binarized data of the target vertebral segment; and to perform closing operation, hole filling operation and dilation operation on the binarized data in sequence to obtain the second computational mask;

[0154] The updating unit is also used to update the second target vertebral segment region and the second adjacent vertebral segment region to obtain the corresponding third target vertebral segment region and the third adjacent vertebral segment region;

[0155] The processing unit is further configured to calculate the second computational mask, the third target vertebral region, and the third adjacent vertebral region based on the maximum flow minimum cut algorithm to obtain a fourth target vertebral image; and to use the fourth target vertebral image as the target vertebral image.

[0156] As one possible implementation, the processing system also includes a reconstruction module 206;

[0157] The reconstruction module 206 is used to piece together all the target vertebral segment images according to a set sorting method to reconstruct the target spinal image corresponding to the spine included in the baseline spinal medical image.

[0158] It should be noted that the implementation principle of the medical image processing system in this embodiment is the same as that of the medical image processing method in Embodiment 1, so it will not be described again here.

[0159] The medical image processing system provided in this embodiment employs a pixel-based composite image cut algorithm, integrating image thresholding, morphological operations, and Boolean operations. It utilizes simple markers to quickly initialize and locate segmentation targets, achieving an automated segmentation process without human intervention. The system allows for free specification of the target location and number of targets to be segmented, offering greater freedom and scalability. Furthermore, it uses an independent segmentation task allocation mode for each target, ensuring that each task is independent and unaffected by others, and is compatible with parallel thread processing, greatly improving the speed and versatility of image segmentation. High-precision vertebral segment images enable the reconstruction and restoration of corresponding spinal images, reducing the burden on surgeons during surgery and providing reliable and accurate image navigation to assist surgeons in efficiently completing surgical plans.

[0160] Example 3

[0161] like Figure 11 The diagram shown is a structural schematic of an electronic device provided in Embodiment 3 of the present invention. It includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the medical image processing method of Embodiment 1 described above. Figure 11 The electronic device 30 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of the present invention.

[0162] The electronic device 30 may be in the form of a general-purpose computing device, such as a server device. The components of the electronic device 30 may include, but are not limited to: at least one processor 31, at least one memory 32, and a bus 33 connecting different system components (including memory 32 and processor 31).

[0163] Bus 33 includes a data bus, an address bus, and a control bus.

[0164] The memory 32 may include volatile memory, such as random access memory (RAM) 321 and / or cache memory 322, and may further include read-only memory (ROM) 323.

[0165] The memory 32 may also include a program / utility 325 having a set (at least one) of program modules 324, including but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of these examples may include an implementation of a network environment.

[0166] The processor 31 executes various functional applications and data processing by running computer programs stored in the memory 32, such as the medical image processing method of Embodiment 1 of the present invention.

[0167] Electronic device 30 can also communicate with one or more external devices 34 (e.g., keyboard, pointing device, etc.). This communication can be performed via input / output (I / O) interface 35. Furthermore, the model-generated device 30 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public network, such as the Internet) via network adapter 36. As shown, network adapter 36 communicates with other modules of the model-generated device 30 via bus 33. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with the model-generated device 30, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID (disk array) systems, tape drives, and data backup storage systems.

[0168] It should be noted that although several units / modules or sub-units / modules of the electronic device have been mentioned in the detailed description above, this division is merely exemplary and not mandatory. In fact, according to embodiments of the present invention, the features and functions of two or more units / modules described above can be embodied in one unit / module. Conversely, the features and functions of one unit / module described above can be further divided and embodied by multiple units / modules.

[0169] Example 4

[0170] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the medical image processing method of Embodiment 1.

[0171] The readable storage medium may be more specifically adopted, including but not limited to: portable disk, hard disk, random access memory, read-only memory, erasable programmable read-only memory, optical storage device, magnetic storage device, or any suitable combination thereof.

[0172] In a possible implementation, the present invention can also be implemented as a program product comprising program code that, when the program product is run on a terminal device, causes the terminal device to execute the medical image processing method of Embodiment 1.

[0173] The program code for executing the present invention can be written in any combination of one or more programming languages. The program code can be executed entirely on the user device, partially on the user device, as a standalone software package, partially on the user device and partially on a remote device, or entirely on a remote device.

[0174] While specific embodiments of the present invention have been described above, those skilled in the art should understand that these are merely illustrative examples, and the scope of protection of the present invention is defined by the appended claims. Those skilled in the art can make various changes or modifications to these embodiments without departing from the principles and essence of the present invention, but all such changes and modifications fall within the scope of protection of the present invention.

Claims

1. A method for processing medical images, characterized in that, The processing method, applied to spinal medical imaging, includes: Obtain the labeling information of the target vertebral segment from the baseline spinal medical images; The first target vertebral segment image is segmented from the baseline spinal medical image based on the labeled information; The first target vertebral segment image includes a first target vertebral segment region and a first adjacent vertebral segment region; Filter the effective pixels in the first target vertebral segment region and the first adjacent vertebral segment region, wherein the effective pixels are used to characterize the boundary between the first target vertebral segment region and the first adjacent vertebral segment region; Based on the effective pixels, an image of the target vertebral segment corresponding to the target vertebral segment is constructed; The step of constructing the target vertebral segment image based on the effective pixels includes: Generate corresponding reference nodes based on the effective pixels; A first terminal node and a second terminal node are generated in the first target vertebral segment region and the first adjacent vertebral segment region, respectively. Wherein, the first terminal node is represented as a source point in the first target vertebral segment region, and the second terminal node is represented as a sink point in the first adjacent vertebral segment region; Terminal edges are formed by connecting the reference node with the first terminal node and the second terminal node, and adjacent edges are generated by connecting adjacent reference nodes. Set the weights corresponding to the terminal edge and the adjacent edge; The maximum flow minimum cut algorithm is used to process the terminal edge and the adjacent edge according to the weight to obtain the second target vertebral region constructed based on the effective pixels and the second adjacent vertebral region adjacent to the second target vertebral region; The second target vertebral segment image is obtained based on the second target vertebral segment region, the second adjacent vertebral segment region, and the first target vertebral segment image, and the second target vertebral segment image is used as the target vertebral segment image; The step of filtering valid pixels in the target vertebral segment image and the adjacent vertebral segment images includes: The first target vertebral segment image is segmented based on a preset threshold to obtain a first computational mask; The effective pixels of the first target vertebral segment image are obtained by processing the first computational mask using a neighborhood iterative algorithm.

2. The medical image processing method according to claim 1, characterized in that, The step of using a neighborhood iterative algorithm to process the image based on the first computational mask to obtain the effective pixels of the first target vertebral segment image includes: Filter out the first pixel within the first computational mask; A number of first pixels in the first target vertebral segment region and the first adjacent vertebral segment region are selected as the effective pixels, and the neighboring pixels of the effective pixels include the first pixels belonging to different regions.

3. The medical image processing method according to claim 1, characterized in that, The step of constructing the target vertebral segment image corresponding to the target vertebral segment based on the effective pixels further includes: The image of the second target vertebral segment is iteratively processed based on preset processing rules; In response to the number of iterations reaching a set threshold, the updated image of the target vertebral segment corresponding to the target vertebral segment is obtained; The segmentation accuracy of the boundary of the target vertebral segment in the target vertebral segment image is higher than the segmentation accuracy of the boundary of the target vertebral segment in the second target vertebral segment image.

4. The medical image processing method according to claim 3, characterized in that, The step of iteratively processing the second target vertebral segment image based on preset processing rules includes: The third target vertebral segment image is obtained by resegmenting the baseline spinal medical image based on the second target vertebral segment image; The binarized data of the target vertebral segment is obtained by performing Boolean summation on the second target vertebral segment region and the second adjacent vertebral segment region. The binarized data is sequentially subjected to closing operation, hole filling operation and dilation operation to obtain the second computational mask; Update the second target vertebral segment region and the second adjacent vertebral segment region to obtain the corresponding third target vertebral segment region and the third adjacent vertebral segment region; The fourth target vertebral segment image is obtained by calculating the second computational mask, the third target vertebral segment region, and the third adjacent vertebral segment region based on the maximum flow minimum cut algorithm; The image of the fourth target vertebral segment is used as the target vertebral segment image.

5. The method for processing medical images according to any one of claims 1 to 4, characterized in that, The processing method further includes: Acquire the target vertebral segment images corresponding to each target vertebral segment in the baseline spinal medical images; All the target vertebral segment images are pieced together according to a set sorting method to reconstruct the target spinal image corresponding to the spine included in the baseline spinal medical image.

6. A medical image processing system, characterized in that, The processing system, applied to spinal medical imaging, includes an acquisition module, a segmentation module, a filtering module, and a construction module. The acquisition module is used to acquire the marking information of the target vertebral segment in the benchmark spinal medical image; The segmentation module is used to segment the first target vertebral segment image from the reference spinal medical image based on the labeling information; The first target vertebral segment image includes a first target vertebral segment region and a first adjacent vertebral segment region; The filtering module is used to filter valid pixels in the first target vertebral segment region and the first adjacent vertebral segment region, wherein the valid pixels are used to characterize the boundary between the first target vertebral segment region and the first adjacent vertebral segment region. The construction module is used to construct a target vertebral segment image corresponding to the target vertebral segment based on the effective pixels; The construction module includes a node generation unit, an edge generation unit, a weight setting unit, and a processing unit; The node generation unit is used to generate a corresponding reference node based on the effective pixels; and to generate a first terminal node and a second terminal node in the first target vertebral segment region and the first adjacent vertebral segment region, respectively; wherein, the first terminal node is represented as a source point in the first target vertebral segment region, and the second terminal node is represented as a sink point in the first adjacent vertebral segment region; The edge generation unit is used to generate terminal edges based on the connection between the reference node and the first terminal node and the second terminal node, and to generate adjacent edges based on the connection between adjacent reference nodes. The weight setting unit is used to set the weights corresponding to the terminal edge and the adjacent edge; The processing unit is configured to use the maximum flow minimum cut algorithm to process the terminal edge and the adjacent edge according to the weight, so as to obtain a second target vertebral region constructed based on the effective pixels and a second adjacent vertebral region adjacent to the second target vertebral region; to obtain a second target vertebral image based on the second target vertebral region, the second adjacent vertebral region and the first target vertebral image, and to use the second target vertebral image as the target vertebral image; The filtering module is also used to segment the first target vertebral segment image based on a preset threshold to obtain a first computational mask; The effective pixels of the first target vertebral segment image are obtained by processing the first computational mask using a neighborhood iterative algorithm.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and for running on the processor, characterized in that, When the processor executes a computer program, it implements the medical image processing method as described in any one of claims 1 to 5.

8. A computer storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the medical image processing method as described in any one of claims 1 to 5.