Target boundary determination method, three-dimensional mask generation method and electronic equipment

By outlining preliminary boundary curves on orthogonal anatomical planes and generating a sequence of cutting planes, and combining medical imaging features to calculate the tumor boundary, the contradiction between high-precision and high-efficiency segmentation is resolved, and efficient three-dimensional tumor segmentation is achieved.

CN120635120APending Publication Date: 2025-09-12BEIJING TINAVI MEDICAL TECH
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510875383.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-27
Publication Date
2025-09-12

AI Technical Summary

Technical Problem

Existing technologies make it difficult to simultaneously achieve high-precision and high-efficiency tumor area segmentation in medical image segmentation, especially in small sample or rare tumor scenarios. The accuracy of deep learning models decreases and computing resources are consumed too high, while manual segmentation is tedious and time-consuming.

Method used

By receiving the preliminary boundary curves drawn by the user on two orthogonal anatomical planes, generating a cutting plane sequence using orthogonal cutting planes, and combining medical image features to calculate the true boundary, the dimensionality is reduced to a two-dimensional plane segmentation problem, reducing user interaction and computational complexity.

Benefits of technology

It achieves efficient acquisition of high-quality three-dimensional tumor segmentation results with two user interactions, improves segmentation efficiency and ensures accuracy, and breaks through the dependence on specific training data and computing resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120635120A_ABST
    Figure CN120635120A_ABST
Patent Text Reader

Abstract

The invention provides a target boundary determination method, a three-dimensional mask generation method and electronic equipment. According to the method, the initial boundary curves sketched only on the two orthogonal anatomical planes by the user are received, the geometric constraint effect of the orthogonal cutting planes on the space boundary control points is utilized, and the image features of the medical image are combined to carry out real boundary calculation, so that the heavy operation burden of manual segmentation layer by layer is avoided, and the real boundary calculation efficiency is improved. The dependence of a deep learning model on specific training data is broken through, the tumor boundary recognition precision is ensured, the segmentation efficiency is remarkably improved, and finally the technical effect of efficiently obtaining a high-quality three-dimensional tumor segmentation result is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of medical image processing, and in particular to a method for determining a target boundary, a method for generating a three-dimensional mask, and an electronic device. Background Art

[0002] Tumor segmentation is the process of accurately separating tumor areas from normal anatomical structures through medical image data (CT, MRI). Its core goal is to provide a three-dimensional tumor boundary quantitative model for computer-aided diagnosis and surgical robot navigation.

[0003] In the scenario of segmenting tumor areas from medical image data, there is a contradiction between high-precision tumor segmentation and high-efficiency tumor segmentation, which leads to the technical problem that existing segmentation methods are not appropriate. Summary of the Invention

[0004] The purpose of the present invention is to overcome the above-mentioned technical deficiencies and provide a method for determining target boundaries, a method for generating three-dimensional masks, and an electronic device to solve the technical problem in the related art that, in the scenario of segmenting tumor areas from medical image data, there is a contradiction between high-precision tumor segmentation and high-efficiency tumor segmentation, which in turn leads to the inadequacy of existing segmentation methods.

[0005] In order to achieve the above technical objectives, the present invention adopts the following technical solutions: In a first aspect, the present invention provides a method for determining a target boundary, comprising: receiving first curve data, second curve data, and three-dimensional medical image data; wherein the first curve data is used to indicate a preliminary boundary of an object on a first anatomical plane in the three-dimensional medical image data, and the second curve data is used to indicate a preliminary boundary of the same object on a second anatomical plane in the three-dimensional medical image data; wherein the first anatomical plane is orthogonal to the second anatomical plane; Generate N cutting planes according to the three-dimensional medical image data in a direction perpendicular to the first anatomical plane and the second anatomical plane, wherein N is a positive integer greater than or equal to one; For each cutting plane, determining intersection data of the cutting plane with the first curve data and the second curve data; wherein the intersection data is used to represent position data of the intersection of the cutting plane and the curve in space; Based on the intersection data and the three-dimensional medical image data, a real boundary of the target in the three-dimensional medical image data is determined.

[0006] In a second aspect, the present invention provides a method for generating a three-dimensional mask of an object, comprising: For three-dimensional medical image data carrying at least one target, using one of the target boundary determination methods described above to determine a true boundary of the at least one target; Based on the true boundary, a three-dimensional mask of the object is generated.

[0007] In a third aspect, the present invention provides an electronic device comprising: a memory, and one or more processors communicatively connected to the memory; the memory stores instructions executable by the one or more processors, and the instructions are executed by the one or more processors so that the one or more processors implement the above-mentioned method.

[0008] Beneficial effects: The beneficial effect of the present invention lies in effectively resolving the core contradiction in medical image segmentation between high-precision and high-efficiency tumor segmentation. This embodiment receives preliminary boundary curves drawn by the user on only two orthogonal anatomical planes, utilizes the geometric constraints of orthogonal cutting planes on spatial boundary control points, and combines the image features of the medical image to calculate the true boundary. This approach avoids the arduous manual segmentation burden of layer-by-layer segmentation while also overcoming the deep learning model's reliance on specific training data. This significantly improves segmentation efficiency while maintaining tumor boundary recognition accuracy, ultimately achieving the technical effect of efficiently obtaining high-quality three-dimensional tumor segmentation results. Specifically, step S12 receives preliminary boundary curves on two orthogonal anatomical planes (for example, a curve drawn by the doctor on the transverse and coronal planes), efficiently converting the doctor's experience into spatial constraint information with at least two user interactions. Steps S14 and S16 generate a cutting plane sequence based on the orthogonality of the two planes and calculate the intersection points, reducing the dimensionality of the three-dimensional segmentation problem to a set of two-dimensional planar segmentation subproblems, avoiding the complexity of full three-dimensional operations. Step S18 utilizes the intrinsic features of the medical image to accurately solve the real boundary in the two-dimensional plane, thereby greatly reducing the user interaction workload while ensuring accuracy (compared to fully manual three-plane delineation). BRIEF DESCRIPTION OF THE DRAWINGS

[0009] Figure 1 This is a flowchart of a method for determining a target boundary, a method for generating a three-dimensional mask, and an electronic device provided by an embodiment of the present invention; Figure 2 : is a schematic diagram of setting MPR coordinates provided by an embodiment of the present invention; wherein, Figure 2 The left picture in the figure is a schematic diagram of setting the MPR coordinates in an anatomical plane. Figure 2 The right figure in the figure is a schematic diagram of setting the MPR coordinates in another anatomical plane; Figure 3 is a schematic diagram of drawing a curve on an anatomical plane provided by an embodiment of the present invention; wherein, Figure 3The left image in the figure is a schematic diagram of a curve drawn in an anatomical plane. Figure 3 The right image in the figure is a schematic diagram of the curve drawn in another anatomical plane; Figure 4 is a schematic diagram of two orthogonal outline curves drawn by a doctor according to an embodiment of the present invention; Figure 5 is a schematic diagram of two orthogonal outline curves drawn by a doctor according to an embodiment of the present invention; wherein, Figure 5 The left figure in the figure is a schematic diagram of two non-intersecting curves. Figure 5 The right figure in is a schematic diagram of the intersection of the two curves after correction; Figure 6 is a schematic diagram of extracting a cutting plane provided by an embodiment of the present invention; wherein, Figure 6 The left picture in the figure is a schematic diagram of extracting one of the cutting planes in space. Figure 6 The right figure in the figure shows the four intersection points of the cutting plane and the two curves; Figure 7 is a schematic diagram of a cut square block area provided by an embodiment of the present invention; Figure 8 is a schematic diagram of generating a binary image provided by an embodiment of the present invention; Figure 9 is a schematic diagram of generating a heat map provided by an embodiment of the present invention; wherein, Figure 9 The left picture is a heat map based on foreground calculation. Figure 9 The right picture is a heat map based on background calculation; Figure 10 This is a heat map synthesized from two heat maps provided in an embodiment of the present invention; Figure 11 is a mask image of a tumor provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0010] In order to enable those skilled in the art to better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of this application.

[0011] In related technologies, accurate tumor region identification is crucial for successful treatment in areas such as tumor diagnosis, radiotherapy planning, and surgical treatment. With the continuous advancement of medical imaging technology, research in tumor segmentation has gradually shifted from traditional manual methods to automated and semi-automated techniques. However, achieving efficient segmentation while maintaining high segmentation accuracy remains a technical challenge that needs to be addressed.

[0012] In related technologies, tumor segmentation often relies on computer-aided diagnosis (CAD) systems, medical imaging software platforms, and deep learning algorithms. The system's operating environment is generally based on a medical imaging platform, such as 3D Slicer, which can process different types of medical images (e.g., MRI, CT, ultrasound, etc.) and provide image reconstruction, segmentation, and 3D visualization capabilities. The system architecture can include an image processing module, a segmentation algorithm module, a 3D visualization module, and a user interface. Within this environment, medical image analysis software can provide doctors with image data analysis, processing, and visualization, allowing doctors to mark, locate, and segment tumor areas through the user interface.

[0013] In the relevant art, tumor segmentation techniques can be categorized into three approaches: fully automatic, semi-automatic, and fully manual. Fully automatic segmentation methods, particularly deep learning-based models (e.g., end-to-end segmentation methods based on convolutional neural networks and Transformer models), can achieve high accuracy when processing standard datasets. However, when faced with small sample sizes, rare tumors, and tumors without contrast enhancement, segmentation accuracy drops sharply, often failing to overcome anatomical site dependency. In other words, while deep learning theoretically possesses powerful data processing capabilities, its robustness for extreme cases remains severely limited. Furthermore, deep learning models often require the pre-collection and construction of large amounts of training data, which is often time-consuming. Understandably, for small sample sizes and a small number of cases (rare tumors), sufficient labeled data is often unavailable, making segmentation model performance difficult to guarantee.

[0014] It should also be noted that for deep learning models, the segmentation model of a specific tumor cannot be migrated to the segmentation of other types of tumors. For example, a model trained for liver tumors often has low segmentation accuracy in pancreatic cancer segmentation.

[0015] Specifically, in the related art, one possible implementation provides a deep learning-based automatic 3D tumor segmentation method. This implementation utilizes a dual U-Net architecture for image segmentation, with the model consisting of two parts. The first U-Net branch primarily segments the lungs and normal liver, while the second U-Net branch segments liver tumors. The second branch utilizes a 3DConvNeXt module to enhance the feature extraction capabilities of each convolution layer, enabling better processing of mixed information from CTAP and CTHA images. Based on the inputs of these deep learning modules, low-dose CT images and enhanced CT images are processed separately to perform tumor, liver, and lung segmentation. Ultimately, these segmentation results are integrated to produce a standardized image segmentation result for the entire liver region. While this implementation may perform well for segmenting common tumors, the accuracy of the deep learning model decreases significantly in scenarios with small sample sizes or rare tumors. Furthermore, this segmentation method relies on a dedicated model for a specific region (the liver tumor segmentation model), which cannot be effectively transferred to untrained regions, resulting in low segmentation accuracy for tumors in some anatomical locations (the pancreas or lungs). More importantly, when processing complex 3D CT images, single-instance inference in the 3D U-Net model requires a significant amount of computing resources, which is unacceptable in resource-limited clinical environments. This not only increases hospital operating costs but also limits the widespread use of this method in daily clinical applications.

[0016] Specifically, in the related art, in a possible implementation scheme, a multimodal brain tumor image segmentation method based on a sparse attention mechanism is provided. In this implementation scheme, first, multimodal brain tumor data is acquired through a magnetic resonance imaging scanner, involving four different modalities: T1, T2, T1c and Flair, to extract different feature information of the tumor. In the data preprocessing stage, the image is standardized through operations such as cropping, normalization, random rotation and mirror flipping to improve image quality and enhance the generalization ability of the deep learning model. Next, the first encoder extracts specific features of each modality, which includes a convolutional layer and a MobileNetV3 reverse residual module to extract local features of each modality layer by layer. Then, the feature fusion unit combines the features of each modality, performs cross-modal feature interaction through a sparse mask attention mechanism and a Transformer model, extracts comprehensive features, and performs weighted processing according to the weight of each modality, and finally obtains the fourth feature for subsequent segmentation. Finally, the prediction unit further processes the fourth feature through the decoder, applies the multi-scale void attention mechanism and channel fusion Transformer layer, and finally generates the tumor segmentation result. It optimizes the model by calculating the first loss L1 to make the segmentation result more consistent with the true label.

[0017] It is understandable that although this implementation improves segmentation accuracy through multimodal fusion and sparse attention mechanisms, computing resource consumption and processing time remain a bottleneck. Especially when processing high-resolution MRI images, the depth and complexity of the network make the processing time longer. This is obviously a bottleneck for clinical applications that require fast feedback and high efficiency. Because the model contains multiple deep convolution and attention modules, the inference process takes a long time, which conflicts with the clinical demand for high efficiency.

[0018] Understandably, this implementation also relies on a large amount of labeled data for training, and on the integration of data from different modalities. If the training data sample size is insufficient, especially for rare cases, the model's generalization ability will be significantly reduced. The model's segmentation accuracy will also drop sharply when faced with unique cases (new tumor types, ectopic tumors) that have never been seen before.

[0019] Although the fully manual segmentation method can ensure high accuracy, its operation is cumbersome and time-consuming. In addition, during the long operation, the doctor's fatigue will affect the consistency of the segmentation results and lead to errors in the tumor boundary.

[0020] Therefore, related technologies face a contradiction between high-precision segmentation and high-efficiency segmentation. In actual clinical applications, neither fully automatic nor fully manual segmentation can simultaneously meet the requirements of accuracy and efficiency. High-precision segmentation often requires manual intervention, while high-efficiency segmentation often leads to a decrease in accuracy.

[0021] This embodiment provides a method for determining target boundaries. The method can be executed by a medical imaging workstation, which can be pre-installed with medical image processing software (e.g., 3D Slicer) to support user (e.g., physician) interaction. The method can also be executed by a medical imaging server with 3D image processing capabilities, a surgical robot system pre-installed with medical image processing software, or a cloud-based medical platform.

[0022] like Figure 1 As shown, the method may include: Step S12: Receive first curve data, second curve data, and three-dimensional medical image data; wherein the first curve data is used to indicate a preliminary boundary of a target on a first anatomical plane in the three-dimensional medical image data, and the second curve data is used to indicate a preliminary boundary of the same target on a second anatomical plane in the three-dimensional medical image data; wherein the first anatomical plane is orthogonal to the second anatomical plane.

[0023] In this embodiment, the receiving action may be represented as the current execution subject receiving the first curve data, the second curve data and the three-dimensional medical image data from other devices (eg, a storage module, a database or a medical image acquisition device, etc.).

[0024] In this embodiment, the receiving action may also be represented as the current data processing flow in the current execution subject receiving the first curve data, the second curve data and the three-dimensional medical image data from one or several previous data processing flows.

[0025] In this embodiment, the three-dimensional medical image data may be three-dimensional medical image data in a magnetic resonance imaging modality. Alternatively, the three-dimensional medical image data may be three-dimensional medical image data in a computed tomography imaging modality. Alternatively, the three-dimensional medical image data may be three-dimensional medical image data in an ultrasound imaging modality. Alternatively, the three-dimensional medical image data may be three-dimensional medical image data in a magnetic resonance angiography imaging modality. Alternatively, the three-dimensional medical image data may be three-dimensional medical image data in a cone-beam computed tomography imaging modality.

[0026] In this embodiment, the first anatomical plane and the second anatomical plane can be any two planes among the three standard orthogonal planes. For example, they can be any two planes among the transverse plane, the coronal plane, and the sagittal plane. Specifically, they can be: transverse plane + coronal plane, transverse plane + sagittal plane, or coronal plane + sagittal plane.

[0027] In this embodiment, the first and second anatomical planes may also be any two of the three non-standard orthogonal planes. For example, they may be oblique planes, i.e., inclined planes generated by rotating standard planes. They may also be adaptive planes generated based on the morphological characteristics of the target, etc.

[0028] In this embodiment, the first and second curve data may be a set of position points, which may represent a collection of spatial position data for a plurality of continuous and smooth or discrete position points on the curve (e.g., stored as an ordered sequence of three-dimensional coordinates). This collection of position data may indicate a preliminary boundary of the target on an anatomical plane. Specifically, the first and second curve data may represent a physician's preliminary boundary estimate of the target region on a specified anatomical plane (e.g., a transverse plane or a coronal plane). This preliminary boundary may cover the outer envelope of the actual tumor boundary.

[0029] In one specific and possible embodiment, a user (e.g., a doctor) may use a drawing tool in a pre-defined medical imaging software (e.g., 3D Slicer) to outline the first and second curves within an anatomical plane view. Based on the user's desktop operation (e.g., the doctor drawing within a window using a mouse), the pre-defined medical imaging software may determine the two-dimensional coordinate data for each location point on the curve, and then map the two-dimensional coordinate data into three-dimensional coordinate data to obtain the location point set.

[0030] In some embodiments, the first curve data and the second curve data may also be a parameterized curve function.

[0031] In this embodiment, the target can be a tumor in the human body (e.g., a lung tumor, a liver tumor, a breast tumor, etc.), or other normal tissue (e.g., the liver, kidney, lung, etc.). It can also be a lesion area in the human body, such as a nodule, an infected or inflamed area, etc. It can also be a bone, such as a diseased joint, a fractured area, etc.

[0032] Step S14: Generate N cutting planes in a direction perpendicular to the first anatomical plane and the second anatomical plane according to the three-dimensional medical image data; wherein N is a positive integer greater than or equal to one.

[0033] In this embodiment, the execution subject can be based on the first anatomical plane normal vector and the second anatomical plane normal vector , the normal of the cutting plane is determined by the vector cross product operation. For example, Then follow The direction of the generated plane sequence can be pre-set by the user. Specifically, the execution body can use the user's pre-set direction starting point as a reference to generate N cutting planes along the normal direction of the cutting plane within the tumor space according to the principle of equal spacing or non-equal spacing.

[0034] It's understandable that 3D medical image data carries the real-world spatial mapping of human anatomical structures, such as voxel coordinates, tissue density distribution, and spatial topology. This information provides a true spatial reference for generating cutting planes, ensuring that the generated cutting planes match the actual spatial location of the target.

[0035] In a possible and specific implementation, the execution entity may generate N cutting planes by the following method. Specifically: First, based on the three-dimensional medical image data, the spatial projection length L of the tumor along the normal of the cutting plane is calculated (which can be defined as the difference between the maximum and minimum values ​​of the normal projection coordinates of the tumor boundary point).

[0036] Then, the fixed spacing is calculated based on the number of cutting planes N set by the user: .

[0037] It is understandable that calculating the spatial projection length L of the tumor along the normal direction of the cutting plane requires traversing all boundary voxels of the tumor region and extracting their position data in the three-dimensional medical image data.

[0038] Then, a plane sequence can be generated along the cutting normal direction based on a certain point set by the user. The kth cutting plane position can be: , (k=0, 1, …, N−1), where is the minimum projection coordinate value.

[0039] Finally, the equation of a plane can also be generated: ,in, is the spatial point coordinate, As the reference point.

[0040] As can be understood, this implementation precisely calculates the spatial projection length of the tumor along the normal direction of the cutting plane, combines it with the user-defined number of cutting planes and reference points, and generates a uniformly distributed sequence of cutting planes, ensuring accurate and efficient tumor segmentation. This implementation reduces computational complexity, improves processing speed, and ensures highly accurate tumor segmentation results. Through standardized and automated operations, the risk of manual intervention and error is reduced.

[0041] In a possible specific implementation scheme, the execution entity may also generate N cutting planes by the following method. Specifically: First, preprocessing is performed on the 3D medical image data. More specifically, the 3D morphological features of the tumor can be analyzed, the surface curvature distribution can be calculated, the local density gradient of the medical image can be extracted, and heterogeneous regions within the tumor can be identified.

[0042] Then, the spatial projection length L of the tumor along the normal direction of the cutting plane is calculated (which can be defined as the difference between the maximum and minimum values ​​of the normal projection coordinates of the tumor boundary points).

[0043] Next, based on the preset adaptive spacing model, the spacing is generated, which can be: In the formula, is the reference spacing coefficient, and are sensitivity adjustment factors, is the surface curvature, is the density gradient, is the normal length of the tumor along the cutting direction.

[0044] Finally, based on the adaptive spacing, a non-uniform plane sequence is iteratively generated.

[0045] More specifically, in the above-mentioned specific embodiment, a Gaussian curvature algorithm can be used to calculate surface curvature, a Sobel operator can be used to calculate local density gradients, and a multi-threshold segmentation method can be used to identify heterogeneous regions within a tumor.

[0046] This implementation combines the preprocessing of three-dimensional medical image data with analysis of tumor morphological characteristics to accurately calculate the projection length of the tumor and generate cutting planes according to user settings. By generating a cutting plane sequence with adaptive spacing, the cutting plane position can be flexibly adjusted, especially for tumors with complex morphology and different anatomical regions, ensuring high-precision segmentation results. Using an adaptive distance model, the cutting spacing is dynamically adjusted according to the spatial structure and boundary changes of the tumor, avoiding the segmentation errors caused by fixed spacing in related methods. This implementation can accurately segment different parts of the tumor (edema, necrosis, active tumors, etc.), providing high-quality data support for subsequent three-dimensional reconstruction and clinical diagnosis, thereby improving segmentation accuracy while ensuring computational efficiency.

[0047] Step S16: for each cutting plane, determine the intersection data of the cutting plane with the first curve data and the second curve data; wherein the intersection data is used to represent the position data of the intersection of the cutting plane and the curve in space.

[0048] In this embodiment, the intersection point of each cutting plane and the curve is determined by the geometric relationship between the curve and the plane. Therefore, the execution entity can determine the intersection point data of each cutting plane and the first curve data and the second curve data based on the geometric relationship.

[0049] In this embodiment, the first curve represented by the first curve data may have two intersections with the cutting plane. It is understood that the second curve represented by the second curve data may also have two intersections with the cutting plane. It is understood that the four intersections described above are actually the intersections of the curves and the cutting plane, that is, line-plane intersections. Therefore, the intersection data may be spatial position data of the four intersections, for example, three-dimensional coordinate data.

[0050] It is understandable that, for the four intersection points of a certain cutting plane, in a sense, the four intersection points can roughly determine the boundary of the target on the cutting plane. For example, the area formed by directly connecting the four intersection points can be represented as the boundary of the target. However, it is also understandable that the boundary obtained by purely directly connecting the lines is quite different from the actual boundary of the target and may not be used for clinical needs. Therefore, in this embodiment, it is necessary to combine the image features carried by the target in the three-dimensional medical image data to accurately segment the boundary of the target.

[0051] In a possible and specific implementation, when the first curve and the second curve are discrete position points, the intersection point can be calculated using a discrete point interpolation method. Specifically, it can be: First, traverse each pair of adjacent points on the curve, and for each curve, calculate the distance between the two end points of the line segment and the cutting plane and .

[0052] Then, perform the sign difference check, if * ≤0, it means that the line segment between the two points intersects the cutting plane.

[0053] Finally, the intersection point is calculated using the linear interpolation formula.

[0054] Step S18: determining a real boundary of the target in the three-dimensional medical image data based on the intersection data and the three-dimensional medical image data.

[0055] It will be appreciated that in step S16, the execution entity has already calculated the intersection points of the cutting planes with the two curves, obtaining a dataset of intersection points for each cutting plane and curve. Each intersection point set between the cutting plane and the two curves includes four intersection points, which provide geometric constraints for the subsequent determination of the true boundary. Therefore, in this step, the target boundary can be determined and segmented in conjunction with the 3D medical image data (specifically, the image features of the target).

[0056] Specifically, in this embodiment, a preset edge segmentation algorithm may be used in combination with intersection data to extract the edge of the target from the three-dimensional medical image data.

[0057] In this embodiment, the edge segmentation algorithm may be a Canny-based edge detection algorithm.

[0058] In this embodiment, the edge segmentation algorithm may be an edge detection algorithm based on the Sobel operator.

[0059] More specifically, in this embodiment, a preset morphological operation and an edge segmentation algorithm may be combined to extract the edge of the target from the three-dimensional medical image data. The morphological operation may be dilation, erosion, opening, closing, etc.

[0060] In this embodiment, a preset image segmentation algorithm may be used in combination with the intersection data to extract the edge of the target from the three-dimensional medical image data.

[0061] In one specific and possible implementation, the four intersection points can be used as boundary control points in the edge detection process, and these boundary control points can be used as constraints for edge segmentation. The four intersection points can define the preliminary geometry and preliminary boundaries of the target area. For example, a preset edge segmentation algorithm can be run to extract preliminary edges from the cutting plane. Then, in the resulting edge area, the intersection data can be used to correct and constrain the edges.

[0062] In one specific and possible implementation, the four intersection points can be used as boundary control points in the edge detection process. Based on the boundary control points, several local image blocks can be cut, for example, rectangular image regions centered around the intersection coordinates. Edge detection is then performed on each local image block to obtain an initial edge map. These initial edge maps are then combined to obtain a complete edge map.

[0063] Specifically, in this embodiment, a preset threshold segmentation algorithm can be used in combination with intersection data to extract the edge of the target from the three-dimensional medical image data. The threshold segmentation algorithm can be a fixed threshold or an adaptive threshold.

[0064] In this embodiment, a preset machine learning or deep learning algorithm can also be used in combination with the intersection data to extract the edge of the target from the three-dimensional medical image data. Specifically, for example, a U-Net network can be used to determine the boundary of the target from the image features corresponding to the cutting plane.

[0065] It is understandable that the intersection data corresponds to the cutting plane. In other words, one cutting plane can correspond to four line-plane intersections. Therefore, when using the various algorithms mentioned above to determine the boundary of the target, the boundary of the target corresponding to each cutting plane can be determined separately. When the boundaries corresponding to all cutting planes are determined, the boundaries corresponding to all cutting planes are combined to obtain the three-dimensional boundary of the target. Specifically, it is understandable that the boundary extracted by each cutting plane through the above-mentioned algorithms (edge ​​detection, image segmentation, deep learning, etc.) is a two-dimensional representation of the target within the plane. Each cutting plane has a corresponding two-dimensional boundary. After the boundaries of all cutting planes are extracted, these two-dimensional boundaries are merged along the normal direction of the cutting plane to finally form the three-dimensional boundary of the target.

[0066] It will also be understood that in this embodiment, the intersection data can serve as boundary control points, which can be used to extract image blocks. The image blocks serve as input to the algorithm described above, and the algorithm's output is the edges of the partial objects within the image blocks. Therefore, by combining the edges of the various partial objects, the edges of the object on the corresponding cutting plane can be obtained. These boundary control points can also be used for subsequent corrections. Specifically, the algorithm's input is the cutting plane (i.e., the image information corresponding to the cutting plane), and the boundary control points are used to correct the algorithm's output.

[0067] It can also be understood that in this embodiment, the image information of the cutting plane can be extracted based on the cutting plane (position information of the cutting plane) and the three-dimensional medical image data, and the image information of the cutting plane is also the input of the above algorithm.

[0068] The beneficial effect of this embodiment lies in effectively resolving the core contradiction in medical image segmentation between high-precision and high-efficiency tumor segmentation. By receiving preliminary boundary curves drawn by the user on only two orthogonal anatomical planes, leveraging the geometric constraints of orthogonal cutting planes on spatial boundary control points, and combining them with the image features of the medical image to calculate the true boundary, this embodiment avoids the arduous manual segmentation burden of layer-by-layer segmentation while also overcoming the deep learning model's reliance on specific training data. This significantly improves segmentation efficiency while maintaining tumor boundary recognition accuracy, ultimately achieving the technical effect of efficiently obtaining high-quality three-dimensional tumor segmentation results. Specifically, step S12 receives preliminary boundary curves on two orthogonal anatomical planes (e.g., one curve drawn by the doctor on the transverse and coronal planes), efficiently converting the doctor's experience into spatial constraint information with at least two user interactions. Steps S14 and S16 generate a cutting plane sequence based on the orthogonality of the two planes and calculate the intersection points, reducing the dimensionality of the three-dimensional segmentation problem to a set of two-dimensional planar segmentation subproblems, avoiding the complexity of full three-dimensional operations. Step S18 utilizes the intrinsic features of the medical image to accurately solve the real boundary in the two-dimensional plane, thereby greatly reducing the user interaction workload while ensuring accuracy (compared to fully manual three-plane delineation).

[0069] Therefore, the dual-plane constraints combined with boundary calculation provided by this implementation fundamentally resolve the conflict between efficiency and accuracy. On the one hand, it achieves high efficiency by minimizing user operations, and on the other hand, it ensures high segmentation accuracy through boundary calculation guided by image features, breaking through the limitations of existing technologies that require large-scale training or consume computing resources.

[0070] In some embodiments, the step of receiving the first curve data and the second curve data includes: Step S122: In response to a user operation, determine a first set of position points on a first anatomical plane and a second set of position points on a second anatomical plane; wherein the user operation at least represents an operation of the user drawing a first curve on the first anatomical plane and an operation of drawing a second curve on the second anatomical plane; wherein the first set of position points is a set of position data in space for representing a plurality of continuous and smooth or discrete position points on the first curve, and the second set of position points is a set of position data in space for representing a plurality of continuous and smooth or discrete position points on the second curve; wherein the plurality of continuous position points are position points representing the preliminary boundary of the target determined by the user on the corresponding anatomical plane.

[0071] In this embodiment, the user operation at least represents an operation of the user drawing a first curve on a first anatomical plane and an operation of the user drawing a second curve on a second anatomical plane.

[0072] In this embodiment, the user operation also refers to the user's operation of outlining a first curve on a first anatomical plane and an operation of outlining a second curve on a second anatomical plane within a specific MPR coordinate axis perspective. It is understood that when the pre-set medical image processing software of the executing subject supports MPR functionality, the physician can, based on the MPR functionality of the medical image processing software, place the MPR coordinate axis on a plane, position the origin of the MPR coordinate axis on the target to locate the target, and adjust the rotation angle of the MPR coordinate axis so that the MPR coordinate axis passes through the longest axis of the target on the plane. It is understood that neither the physician's operation of placing the MPR coordinate axis nor the operation of rotating the MPR coordinate axis requires extreme precision. After placing and not adjusting the MPR coordinate axis, the physician can draw the curves on the first and second anatomical planes based on their own experience and knowledge, without requiring extreme precision.

[0073] In this embodiment, the user operation can be performed by the doctor, using the interactive function provided by the medical image processing software, by dragging the mouse to draw a first curve on the first anatomical plane and a second curve on the second anatomical plane (smooth, continuous lines). Alternatively, the user operation can be performed by clicking the mouse on multiple discrete points on the edge of the target to draw the first curve on the first anatomical plane and the second curve on the second anatomical plane (it will be understood that the curves are not continuous and smooth, but are composed of multiple off-line points or straight lines connected by discrete points).

[0074] In this embodiment, the user operation may also be performed on a touchpad or a touch screen, and the doctor may directly draw the boundary by sliding a finger or a stylus.

[0075] In this embodiment, the user operation may also be that the doctor can draw or adjust the boundary through voice commands.

[0076] As you can understand, MPR (Multi-Planar Reconstruction) is a feature in medical image processing software that allows physicians to select and view different slice planes by rotating and shifting coordinate axes. This feature allows physicians to extract 2D slices in any orientation from 3D image data, allowing them to view anatomical structures in different planes. It's understandable that adjustments to the dynamic MPR coordinate system are essentially view transformations, not modifications to the underlying image data. Specifically, there are two coordinate systems: one is the physical coordinate system, which is the fixed coordinate system specified by the DICOM standard. For example, the X-axis can be the patient's left-right direction (increasing from right to left), the Y-axis can be the patient's front-to-back direction (increasing from front to back), and the Z-axis can be the patient's head-to-foot direction (increasing from foot to head). As you can understand, this coordinate system is generated by the scanning device. Every pixel (voxel) in the image has unique physical coordinates. The reference system for the MPR coordinate axes, however, is a virtual coordinate system created by the medical image processing software (for example, 3D Slicer) to redefine the orientation of the slice planes. For example, doctors can specify a new origin (such as the center of the tumor) or rotate the MPR coordinate axis. When doctors rotate the MPR coordinate axis, they actually calculate a new rotation matrix in real time. The medical image processing software can then reconstruct three orthogonal anatomical planes (transverse, coronal, and sagittal) based on the new rotation matrix.

[0077] In this embodiment, on the one hand, the user can manually draw a curve representing the target boundary on the first anatomical plane and the second anatomical plane according to the specific medical image features. This interactive method enables the doctor to make precise adjustments based on the actual medical image features to ensure the accuracy of the boundary. On the other hand, by obtaining multiple position point sets on two orthogonal planes, these point sets can accurately describe the preliminary boundary of the target. The user can flexibly adjust the drawing path according to the image information in different planes, thereby improving the accuracy of the boundary. This embodiment allows the user to use continuous smooth position points or discrete point sets when drawing curves to adapt to the complexity and needs of different medical images. Both relatively regular target boundaries and irregular complex shapes can be effectively processed.

[0078] In some cases, it's understood that MPR (multi-planar reconstruction) allows physicians to arbitrarily rotate the virtual viewing plane by changing the orientation and origin of the MPR coordinate axes. When a physician draws multiple curves in different MPR coordinate axis rotation states, while the curves appear to be on the current plane on screen, the software internally stores the absolute coordinate values ​​of the points in the original 3D space. Subsequent rotations by the physician change the orientation of the final target coordinate system, causing previously stored curve points to no longer meet the strict coplanarity required by the algorithm in the new target coordinate system. Specifically, in one possible scenario, at the first moment, the physician adjusts the MPR coordinate axes to position A. At this point, the coordinate state is coordinate system A, and the physician has not yet drawn a curve. At the second moment, the physician draws the first curve in the XY plane of coordinate system A. It's understood that the points of the first curve are stored based on coordinate system A. At the third moment, the physician adjusts the MPR coordinate axes to position B. At this point, the coordinate state is coordinate system B, but it's also understood that the points of the first curve remain in coordinate system A. At the fourth moment, the doctor draws a second curve on the XZ plane of coordinate system B. However, at this point, the points of the second curve are stored based on coordinate system B. In other words, in this scenario, the first curve is a set of points stored in coordinate system A, while the second curve is a set of points stored in coordinate system B. Although the two curves appear to intersect on the display interface, they actually exist in two different spatial references.

[0079] In other words, adjusting the MPR dynamic coordinate system is essentially a view transformation, not a modification of the underlying image data. The physical coordinates of the curve points are decoupled from the MPR reference system. Therefore, when the physician adjusts the MPR coordinate axis orientation, the previously drawn curve may lose coplanarity in the new coordinate system.

[0080] It is also understandable that in real-world scenarios, it is often impossible to guarantee that all users are aware of the MPR (multi-planar reconstruction) features, nor is it possible to guarantee that doctors will not adjust the MPR coordinate axes (for example, accidentally touching the MPR coordinate axes causing them to rotate). Therefore, it is necessary to perform curve coplanarity verification.

[0081] To address the above-mentioned issues, in some embodiments, the user operation further represents the user's operation of outlining a first curve on a first anatomical plane and an operation of outlining a second curve on a second anatomical plane under a certain MPR coordinate axis perspective; wherein the MPR coordinate axis is the MPR coordinate axis selected by the user, and both the first and second anatomical planes have corresponding MPR coordinate axes. It is understandable that in this embodiment, the user draws the first and second curves after adjusting the MPR coordinate axis. Therefore, there is a problem in the above scenario, that is, after outlining the first curve, the user adjusts the perspective of the MPR coordinate axis (this may be due to a change in the origin, a change in the rotation angle, or the user accidentally touching the mouse, causing the MPR coordinate axis perspective to change). Therefore, the MPR coordinate axes corresponding to the first and second anatomical planes may be MPR coordinate axes under the same perspective state, or they may not be (for example, due to a doctor's accidental touch). Therefore, in this embodiment, it is necessary to implement a fool-proof design for the user, which may specifically be: The step of receiving the first curve data and the second curve data further includes: Step S124: Checking whether each position point in the first position point set and the second position point set is located on the same corresponding plane.

[0082] In this embodiment, the execution entity may verify whether each position point in the first position point set and the second position point set is located on the same corresponding plane in the following manner: First, for the first position point set and the second position point set, three position points are selected respectively; Then, a plane is generated based on the three position points, and the normal vector of the plane is recorded.

[0083] Next, for the first position point set and the second position point set respectively, fix the first two position points, start from the fourth position point, and execute a loop for all the remaining position points, so that multiple planes and normal vectors corresponding to the multiple planes can be obtained.

[0084] Finally, a check is performed: if the angle between the calculated normal vector and the original normal vector is less than a set threshold, the point is considered to be on the same plane. If the angle is greater than the threshold, the point is considered not to be on the same plane.

[0085] Step S126: When all are located on the same corresponding plane, the first curve data and the second curve data formed by the first position point set and the second position point set are used as the finally confirmed first curve data and the second curve data.

[0086] Step S128: When at least one position point is out of the corresponding anatomical plane, display instruction information; wherein the instruction information is information for instructing the user to draw corresponding curves in the first anatomical plane and the second anatomical plane corresponding to the same MPR coordinate axis perspective.

[0087] In this embodiment, the indication information can be a visual marker. Specifically, points that do not conform to the planarity can be highlighted. Specifically, on the first and second anatomical planes, points that deviate from the planarity can be highlighted using color markers (e.g., red or yellow). This helps the physician directly identify which points do not conform to the planarity requirements, allowing for timely corrections.

[0088] In this embodiment, the instruction information may be a text prompt information. That is, a warning box pops up, displaying a message similar to the following: "Some position points do not fall accurately on the plane. Please check the curve boundaries on the first anatomical plane and the second anatomical plane." or "The curve drawn on the first anatomical plane or the second anatomical plane has non-coplanar points. Please readjust the relevant points."

[0089] In this embodiment, the indication information may be a sound effect or a sound prompt.

[0090] In this embodiment, the instruction information may be an operation step guide.

[0091] This embodiment ensures the accuracy and consistency of the curve by outlining the curves of the first anatomical plane and the second anatomical plane from the perspective of the MPR coordinate axis, and by verifying whether each position point is located on the corresponding plane. First, step S124 avoids the problem of inaccurate curves caused by the deviation of the point set from the plane by verifying whether each position point of the curve is located in the plane, so as to achieve the purpose of preventing users from accidentally touching. Then, after the verification is qualified, step S126 confirms and saves the final curve data to ensure the data quality of subsequent processing. If at least one position point is detected to be out of the plane, step S128 will display clear instruction information to remind the user to correct the wrong position point, thereby effectively avoiding the accumulation of errors and subsequent calculation errors caused by the deviation of the curve from the plane. In this way, not only the accuracy of the curve outline is improved, but also the fault tolerance of the system is enhanced, the accuracy of subsequent image processing is ensured, and the reliability of medical image analysis is improved.

[0092] Understandably, the gradient magnetic field of an MRI scanner is often subject to physical limitations (e.g., nonlinear field distortion), which can prevent the physical coordinate system of the original voxels from satisfying Cartesian orthogonality, meaning that the coordinate axes are not perfectly perpendicular. Furthermore, during the scan, if the patient's position is not standard, this can lead to deviations between the anatomical coordinate system and the device coordinate system (the world coordinate system). This deviation can cause errors between the imaging data and the actual physical space, thus affecting subsequent image analysis and processing.

[0093] Therefore, to solve this problem, in some embodiments, when the three-dimensional medical image data is three-dimensional medical image data representing magnetic resonance imaging or computed tomography imaging, the step of receiving the three-dimensional medical image data includes: Step S1210: Receive three-dimensional medical image data representing magnetic resonance imaging or computed tomography imaging from an imaging device.

[0094] In this embodiment, the imaging device may be an MRI scanner.

[0095] In this embodiment, the imaging device may be a CT scanner.

[0096] Step S1212: A preset coordinate axis correction method is used for the three-dimensional medical image data, so that voxel points in the three-dimensional medical image data in the device coordinate system are in a Cartesian orthogonal space.

[0097] In this embodiment, the preset coordinate axis correction method can be an affine transformation method. That is, a matrix transformation is used to perform operations such as translation, rotation, scaling, and shearing on a three-dimensional image to ensure that the three-dimensional medical image data conforms to the requirements of a standard Cartesian coordinate system. Specifically, the direction cosine matrix of the three-dimensional medical image data is first obtained based on the DICOM tag. Then, an affine transformation matrix is ​​constructed using the image's direction cosine matrix and voxel spacing information (i.e., the resolution of pixels in physical space). This affine transformation matrix contains information about coordinate axis rotation, translation, and scaling. Finally, the original voxel coordinates are mapped to the target Cartesian coordinate system using the affine transformation matrix.

[0098] In this embodiment, the preset coordinate axis correction method can be a matrix orthogonalization method. First, the gradient matrix is ​​orthogonalized using SVD (singular value decomposition) or QR decomposition to ensure that the angles between the coordinate axes are 90 degrees. Through these methods, a new orthogonal transformation matrix is ​​obtained, which transforms the original coordinate system into a coordinate system that satisfies the orthogonal condition. The orthogonalization matrix is ​​then applied to the coordinates of each voxel, thereby mapping the data in the original non-orthogonal coordinate system to the target Cartesian coordinate system.

[0099] In this embodiment, the preset coordinate axis correction method may also include: first, obtaining voxel spacing information of the original 3D medical image data based on the DICOM tag, namely, the physical dimensions of each voxel in the X, Y, and Z directions. Then, based on a preset standard (e.g., uniform voxel size or matching the device coordinate system), the voxel spacing is adjusted to a unit size in a standard orthogonal space. Finally, using a resampling algorithm (e.g., trilinear interpolation), the original 3D medical image data is remapped to a standard voxel grid. This ensures that the voxel spacing is uniform in all directions, thereby meeting the requirements of a Cartesian coordinate system.

[0100] This implementation addresses geometric distortion caused by non-orthogonal gradient magnetic fields and patient positional deviations in MRI or CT equipment by receiving 3D medical image data from an imaging device and employing a pre-defined coordinate axis correction method to convert voxel data originally stored in the device coordinate system into Cartesian orthogonal space. This correction method ensures the geometric accuracy of the image data in 3D space, providing high-quality input data for subsequent image processing. This method not only improves the accuracy and reliability of image processing but also effectively avoids spatial errors caused by device errors and positional deviations, ensuring the precision of medical analysis and the effectiveness of clinical decision-making.

[0101] It is understandable that the first curve data and the second curve data required by this embodiment should be intersecting and nested closed curves. However, it is often difficult for users to ensure that the first curve and the second curve strictly intersect through desktop operations. Therefore, to address this issue, in some embodiments, between the steps of receiving the first curve data, the second curve data, and the three-dimensional medical image data and the step of generating N cutting planes based on the three-dimensional medical image data in a direction perpendicular to the first and second anatomical planes, the method further includes: Step S1301: Determine the intersection of the plane in which the first curve is located and the second curve; wherein the intersection includes the intersection of the first line and the plane and the intersection of the second line and the plane.

[0102] In this embodiment, the plane on which the first curve lies can be determined based on the first curve. For example, the plane on which the first curve lies can be fitted using the least squares method based on multiple points on the first curve. Then, based on the points on the second curve, the intersection of the planes on which the second curve lies with the first curve is calculated.

[0103] Step S1302: Determine whether the intersection point of the first line and the plane and the intersection point of the second line and the plane are within the first curve data.

[0104] Step S1303: When not in the first curve data, determine at least two position points from the first curve data; wherein the two position points are the two position points in the first curve that are closest to the intersection of the first line and the surface and the intersection of the second line and the surface, respectively.

[0105] In this embodiment, when not in the first curve data, two position points can also be determined from the second curve data. These two position points are the two position points in the second curve that are closest to the intersection of the first line and the surface and the intersection of the second line and the surface respectively.

[0106] Step S1304: at least two position points in the current first curve data are replaced with the intersection point of the first line and the plane and the intersection point of the second line and the plane to obtain the first curve data after curve correction.

[0107] In this embodiment, the intersection point of the first line and the surface and the intersection point of the second line and the surface may be used to replace two position points in the current second curve data to obtain the second curve data after curve correction.

[0108] This embodiment effectively addresses errors in user-drawn curves by introducing intersection calculation and curve correction steps, ensuring that the intersection and nesting relationship of two curves meet predetermined geometric constraints. By determining whether the intersection point exists within the curve data, it automatically corrects any points that do not meet the requirements, improving the accuracy of the curve data. This method not only reduces manual correction operations and eases the workload for physicians, but also enhances the reliability of subsequent operations and ensures the accuracy of cutting plane generation and tumor mask generation.

[0109] In some embodiments, the step of generating N cutting planes in a direction perpendicular to the first anatomical plane and the second anatomical plane based on the three-dimensional medical image data includes: Step S142: determining an intersection point between the first line and the second line; wherein the intersection point between the first line and the second line represents two intersection points of the first curve and the second curve in space; Step S144: With the direction perpendicular to the first anatomical plane and the second anatomical plane as the cutting plane normal, generate N cutting planes along the cutting plane normal between the intersection points of the first line and the second line according to the three-dimensional medical image data at a preset spacing.

[0110] This implementation ensures the geometric relationship and accuracy of the cutting planes and curves by precisely calculating the intersection of the first and second curves and generating multiple cutting planes based on these points. By determining the intersection of the first and second lines and generating multiple cutting planes based on these points, it ensures that the cutting planes are evenly distributed in the correct direction, improving the accuracy and consistency of tumor region segmentation.

[0111] In some embodiments, the intersection data includes position data of four intersections, where the four intersections are two intersections of any cutting plane with the first curve and two intersections of any cutting plane with the second curve. The step of determining a real boundary of the target in the three-dimensional medical image data based on the intersection data and the three-dimensional medical image data comprises: Step S182: For any cutting plane, the four intersection points of the plane are used as boundary control points, and within the cutting plane, according to the image information of the three-dimensional medical image data and a preset edge segmentation algorithm, a target boundary based on the boundary control points is generated.

[0112] In this embodiment, the intersection data can be used as boundary control points, which can be used to extract image blocks from the cutting plane. The image blocks serve as the input for the algorithm described above, and the output of the algorithm is the edges of the partial objects within the image blocks. Therefore, by combining the edges of the partial objects, the edges of the object on the corresponding cutting plane can be obtained. These boundary control points can also be used for subsequent corrections. Specifically, the algorithm takes the cutting plane as input (i.e., the image information corresponding to the cutting plane) and uses the boundary control points to correct the algorithm's output.

[0113] In this embodiment, the edge segmentation algorithm may be a threshold segmentation algorithm. For example, the threshold segmentation algorithm may include: extracting a corresponding target image block based on the boundary control points and preset size parameters; the target image block carries boundary information of the target from a certain boundary control point to another boundary control point; generating a binary image block corresponding to the target image block based on the target image block and a preset binary image generation algorithm; calculating a first distance set and a second distance set for the binary image block to obtain a heat map image block corresponding to the binary image block; wherein the first distance set is a set of minimum distance values ​​between each foreground pixel representing the target and any background pixel representing the non-target in the binary image block, and the second distance set is a set of minimum distance values ​​between each background pixel representing the non-target and any foreground pixel representing the target in the binary image block; wherein the heat map image block is obtained by superimposing the first distance set and the second distance set; and traversing the heat map image blocks corresponding to each target image block based on a preset shortest path algorithm to generate the boundary of the target.

[0114] In this embodiment, the edge segmentation algorithm may be a region growing algorithm. For example, the region growing algorithm may include: extracting a corresponding target image block based on the boundary control points and preset size parameters; the target image block carries boundary information of the target from one boundary control point to another boundary control point; and generating the boundary of the target in the target image block based on the target image block and a preset region growing algorithm. It will be appreciated that the region growing algorithm may start from one or more seed points and add similar neighboring pixels to a region according to a predetermined criterion (pixel intensity). The region is expanded until the similarity criterion is no longer met, ultimately forming a closed region.

[0115] In this embodiment, the edge segmentation algorithm may be a watershed algorithm. For example, the watershed algorithm may include: extracting a corresponding target image block based on the boundary control points and a preset size parameter; the target image block carries boundary information of the target from one boundary control point to another boundary control point; and generating the boundary of the target in the target image block based on the target image block and a preset watershed algorithm.

[0116] In this embodiment, the edge segmentation algorithm may be a Fourier transform algorithm. For example, the Fourier transform algorithm may include: extracting a corresponding target image block based on the boundary control points and preset size parameters; the target image block carries boundary information of the target from one boundary control point to another boundary control point; and generating the boundary of the target in the target image block based on the target image block and a preset Fourier transform algorithm. It is understood that the Fourier transform can convert an image from the spatial domain to the frequency domain, highlighting the frequency components in the image, thereby facilitating edge identification.

[0117] Step S184: traverse all cutting planes and combine the target boundaries of each plane into a three-dimensional target boundary.

[0118] This implementation utilizes the four intersection points of the cutting planes as boundary control points, combining them with 3D medical image data and a pre-defined edge segmentation algorithm to accurately generate the target boundary. This approach ensures that each cutting plane provides accurate boundary control information, ensuring the consistency and accuracy of the target boundary. Traversing all cutting planes and combining the target boundaries of each plane into a 3D target boundary effectively achieves high-precision 3D reconstruction of the target region, avoiding segmentation issues caused by errors or discontinuities. This process significantly improves the accuracy of tumor or other target region segmentation, ensuring the reliability of subsequent analysis and treatment planning.

[0119] In some embodiments, the step of generating a boundary based on the boundary control points according to the image information of the three-dimensional medical image data and a preset edge segmentation algorithm includes: Step S1822: extracting a corresponding target image block based on the boundary control points and preset size parameters; the target image block carries boundary information of the target from a certain boundary control point to another boundary control point.

[0120] Step S1824: Based on the target image block and a preset binary image generation algorithm, a binary image block corresponding to the target image block is generated.

[0121] In this embodiment, the binary image generation algorithm may be the Otsus automatic threshold segmentation method.

[0122] In this embodiment, the binary image generation algorithm may be a global threshold segmentation method.

[0123] In this embodiment, the binary image generation algorithm may be an adaptive threshold segmentation method.

[0124] Step S1826: For the binary image block, calculate a first distance set and a second distance set to obtain a thermal map image block corresponding to the binary image block; wherein the first distance set is a set of minimum distance values ​​between each foreground pixel representing a target and any background pixel representing a non-target in the binary image block, and the second distance set is a set of minimum distance values ​​between each background pixel representing a non-target and any foreground pixel representing a target in the binary image block; wherein the thermal map image block is obtained by superimposing the first distance set and the second distance set.

[0125] Step S1828: Based on a preset shortest path algorithm, traverse the heat map image blocks corresponding to each target image block to generate the boundary of the target.

[0126] In this embodiment, the shortest path algorithm may be a Dijkstra algorithm.

[0127] In this embodiment, the shortest path algorithm may be a dynamic programming algorithm.

[0128] In this embodiment, the shortest path algorithm may be a shortest path tree algorithm.

[0129] In one possible and specific implementation, the shortest path algorithm may include: Step S18281: Mark all pixels of the heat map image block as uncalculated, set the cumulative weight value of the starting point to the initial reference value, and set the cumulative weight values ​​of the remaining pixels to the uninitialized identification value; wherein the starting point is used to represent a certain boundary control point; Step S18282: Select the point with the smallest cumulative weight value from the currently marked points as the extension point, and calculate the new cumulative weight value of each neighboring point within the preset neighborhood of the extension point; wherein the new cumulative weight value is the sum of the cumulative weight value of the extension point and the weight value of the heat map at the corresponding neighboring point; Step S1823: For each neighborhood point, if its new cumulative weight value is less than the currently recorded cumulative weight value of the point or is in an uninitialized state, the cumulative weight value of the point is updated to the new cumulative weight value, and its path predecessor point is recorded as the current extension point; Step S1824: Mark the current extension point as processed. When a neighboring point is updated, add the updated neighboring point to the set of points to be processed. Step S1825: When the end point is marked as processed or there are no neighboring points that can be updated, the iterative process is terminated; wherein the end point is used to represent another boundary control point; Step S1826: tracing back from the end point along the recorded predecessor point to generate a path track from the starting point to the end point; wherein the path track is used to represent the boundary of the target.

[0130] It can be understood that the shortest path algorithm effectively generates the boundary of the target through a precise path search algorithm, significantly improving the accuracy and reliability of boundary positioning. By performing cumulative weight calculation and neighborhood expansion in the thermal map image block, it can intelligently select the shortest path and gradually optimize the cumulative weight value of each pixel point to accurately identify the target boundary. This method ensures the continuity and accuracy of the target boundary by gradually marking, updating and backtracking the path, especially being able to handle boundaries with weak contrast in complex images. In addition, the entire process ensures high efficiency through iterative calculations, greatly reducing computational complexity and processing time. The target boundary finally generated is not only accurate and stable, but also lays a solid foundation for subsequent image analysis and processing.

[0131] This implementation method intelligently crops local image blocks based on boundary control points, greatly reducing redundant calculations and improving processing efficiency; it generates accurate binary images through adaptive threshold segmentation, enhancing the anatomical contrast between the target and the background. The innovative use of double distance field superposition to construct a heat map provides enhanced feature response in weak boundary areas. Finally, using the heat map as a navigation, the optimal path search generates a tumor boundary with subvoxel accuracy. This method breaks through the mutually exclusive limitations of accuracy and efficiency in traditional segmentation technology, significantly improving the accuracy and efficiency of tumor segmentation, and is particularly suitable for fast and accurate tumor segmentation scenarios during surgery.

[0132] In some embodiments, the step of generating a binary image block corresponding to the target image block based on the target image block and a preset binary image generation algorithm includes: Step S18241: generating a grayscale distribution histogram having a preset number of grayscale intervals for the target image block; Step S18242: Calculate the center value of each grayscale interval, and use all interval center values ​​as a candidate threshold set; Step S18243: traverse the candidate threshold set and calculate the inter-class variance corresponding to each candidate threshold; wherein the inter-class variance is represented by dividing the pixels into low grayscale class and high grayscale class according to the candidate threshold, calculating the number weights of the two classes of pixels, and then weighting the square deviations of the average grayscale of the two classes of pixels with the average grayscale of the entire image according to their respective weights to obtain the quantized parameter of the overall distribution separation; Step S18244: Determine the candidate threshold with the largest inter-class variance as the final threshold; Step S18246: using the final threshold value to perform binarization processing on the target image block to obtain a binary image block.

[0133] The beneficial effect of this implementation is that it significantly improves the accuracy of medical image binarization processing through a dynamic adaptive threshold segmentation mechanism. Based on the grayscale histogram analysis of local image blocks, the optimal threshold for the maximum inter-class variance is intelligently determined, successfully overcoming the segmentation limitations of the traditional fixed threshold method in tumor heterogeneous areas (the junction of the necrotic core and the active edge). As a quantitative indicator, the inter-class variance ensures that the statistical separability of the target and the background reaches the mathematical optimum, so that tumor boundaries with weak contrast (for example, small CT value differences) can still be accurately separated; the fully automatic processing flow greatly improves the computational efficiency and ensures fast processing speed while ensuring subvoxel segmentation accuracy. Clinical verification shows that this implementation significantly reduces the false positive rate, while precisely controlling the boundary positioning error, providing a solid foundation for subsequent heat map generation and path search.

[0134] This embodiment provides a method for generating a three-dimensional mask of an object, including: Step S22: for the three-dimensional medical image data carrying at least one target, determine the real boundary of the at least one target using one of the target boundary determination methods in the above embodiment; Step S24: generating a three-dimensional mask of the target based on the real boundary.

[0135] In a specific embodiment, a tumor segmentation method is provided, which may include: 1. Manually adjust the coordinate axis This method is a semi-automatic method, so it first requires manual assistance. The doctor first loads the tumor image, usually CT or MR, among which MR is more common. For MR, each scan will have a different sequence of images, so the image sequence must also be selected. After the system loads the image, the doctor finds the tumor area and uses the MPR method to place the center of the coordinate axis at the approximate center of the tumor. Then, by rotating the coordinate axis, one of the axes passes through the longest axis of the tumor. The above two steps do not require the doctor to operate very accurately. Figure 2 .

[0136] 2. Tumor delineation After adjusting the coordinate axis, the doctor uses the software tool to draw two closed curves along the approximate edge of the tumor on two orthogonal planes of the coordinate axis, such as Figure 3 After completing the above two steps, the input of the algorithm is ready: two closed curves, image, and coordinate axis information.

[0137] 3. Check the point set on the curve When the algorithm is running, it must ensure that the output curve point set is a planar curve. Therefore, it is necessary to verify that each point on the curve is on a plane. Suppose there are n points on the curve, P1(x1, y1, z1) and Pn(xn, yn, zn). First, take the first three points, determine a plane, and record the normal vector of this plane as N_123. Based on the three-point plane normal, it can be obtained by the following formula, where AB and AC are two of the points. The cross product gives their direction: Fix the first two points, start from the fourth point, and loop for all the remaining points. Each normal vector N_124 to N_12n can be obtained. Compare each normal vector with the normal vector N_123. If the angle is less than 0.1 degrees, it is considered coplanar. If it is greater than 0.1 degrees, the program throws an exception.

[0138] 4. Curve correction In this embodiment, it is assumed that the two input closed curves intersect and nest with each other, such as Figure 4 However, it is difficult to ensure strict intersection when the user draws, so the curves need to be corrected so that when the two curves are close, they can be automatically repaired together.

[0139] Still, suppose there are n points on curve A, P1(x1, y1, z1)...Pn(xn, yn, zn), and m points on another curve, Q1(x1, y1, z1)...Qn(xn, yn, zn), forming a plane Q. Find the plane of curve Q, and record the two points where curve P intersects as PQ_a and PQ_b; thus, we can find the two points closest to the two points on the two curves, record them as P_a, P_b and Q_a, Q_b respectively; use the coordinates of PQ_a and PQ_b to directly replace the coordinates of P_a, P_b and Q_a, Q_b; you can refer to Figure 5 .

[0140] 5. Image cutting and smoothing The image can be reorganized and smoothed based on the rotation information of the coordinate axis and the range of the image. Gaussian filtering can be used for smoothing.

[0141] 6. Extracting the plane Along the plane perpendicular to both closed curves, start from the intersection of one end of the two closed curves and proceed to the other intersection, such as Figure 6 Left. At this point, each plane and the two curves will have 4 intersection points, such as Figure 6 Right. At this point, the problem to be solved in this implementation becomes segmenting the tumor along these four points. Simply perform the same process on all planes between the two endpoints and then combine them together.

[0142] 7. Calculation of distance heatmap For each plane, there are four points, denoted as A, B, C, and D. Now, the problem is transformed into solving the four starting points AB, BC, CD, and DA, and finding the edge of the image along the starting points.

[0143] 7.1. Cut an image block: Based on the above extraction plane and the starting point, cut a square block area with the starting point as the center. The size is 1 / 15 of the extraction plane (can be adjusted according to the image), such as Figure 7 .

[0144] 7.2. Use the self-supervised threshold method to classify pixels into two categories and obtain the threshold. The method is as follows: the image is preset into n-bin histograms. The difference under the threshold corresponding to each histogram is calculated by the following formula: in, is the number of low pixels in the binary image, is the number of high pixels in the binary image, is the low pixel average, is the average value of high pixels, x is the average value of all pixels, and N is the number of all pixels. The threshold corresponding to the maximum variance sigma is the threshold required for self-supervision.

[0145] 7.3. Apply the above threshold to the extracted image to obtain a binary image, such as Figure 8 .

[0146] 7.4. Calculate the distance heat map for the binary image, which may include: 7.4.1. For the input binary image, calculate the distance from all foreground pixels (pixel value 1) to the nearest background pixel (pixel value 0) as follows: in, The distance heat map is represented by Euclidean distance. For a foreground pixel (i, j), the minimum value of all the distances of each background pixel (k, l) is calculated, which is the distance heat map value of the foreground pixel. Figure 9 Left picture.

[0147] 7.4.2. It is understandable that at this time, the distance heat map only has the foreground factor, and the background factor is not calculated. Therefore, the foreground and background can be reversed and the distance heat map can be recalculated. The calculation method remains unchanged, such as Figure 9 Right picture.

[0148] 7.4.3. Then add the two distance heat maps above to get the total distance heat map of the extracted image, as shown in Figure 10 .

[0149] 8. Calculation method of the shortest path For the heat map calculated above, each pixel on the map is regarded as the weight of the grid map. The starting point and end point of the tumor boundary are known. The specific algorithm is as follows: 8.1. Initialize the distances from all pixels on the grid to the starting point, assuming them to be infinite, except for the starting point itself, which is 0.

[0150] 8.2. Calculate the distance X of the 8 adjacent pixels around the starting point. Note that this distance is the weight value of the distance heat map.

[0151] 8.3. Find the pixel x with the smallest distance. The formula is as follows: 8.4. Repeat the steps in 8.2 above to update the 8-adjacent distance of x (relative to the starting point). Note that if the distance has already been calculated, it does not need to be calculated again.

[0152] 8.5. Continue until the end is reached or all nodes are processed.

[0153] 9. Forming tumor segmentation mask For each extraction plane, four starting points are formed in sequence to form a circle. After the above shortest paths are obtained in sequence, the internal pixel values ​​are filled to form a tumor mask, such as Figure 11 .

[0154] 10. Forming a 3D tumor mask Repeat the above steps in the area after curve correction and combine all the extracted planes.

[0155] According to an embodiment of the present invention, an electronic device is provided. The electronic device in this embodiment may include one or more of the following components: a processor, a network interface, a memory, a non-volatile memory, and one or more application programs, wherein the one or more application programs may be stored in the non-volatile memory and configured to be executed by the one or more processors, and the one or more programs are configured to perform the method described in the aforementioned method embodiment.

[0156] According to an embodiment of the present invention, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a computer, the computer executes the method described in any one of the above embodiments.

[0157] According to an embodiment of the present invention, a computer program product comprising instructions is further provided. When the instructions are executed by a computer, the computer is caused to perform a method in any one of the above embodiments.

[0158] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in a sequence other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0159] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment will not be described in detail here.

[0160] The serial numbers of the above embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0161] In the above embodiments of the present application, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

[0162] The above is only a preferred embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A method for determining a target boundary, characterized in that: include: receiving first curve data, second curve data, and three-dimensional medical image data; wherein the first curve data is used to indicate a preliminary boundary of an object on a first anatomical plane in the three-dimensional medical image data, and the second curve data is used to indicate a preliminary boundary of the same object on a second anatomical plane in the three-dimensional medical image data; wherein the first anatomical plane is orthogonal to the second anatomical plane; Generate N cutting planes according to the three-dimensional medical image data in a direction perpendicular to the first anatomical plane and the second anatomical plane, wherein N is a positive integer greater than or equal to one; For each cutting plane, determining intersection data of the cutting plane with the first curve data and the second curve data; wherein the intersection data is used to represent position data of the intersection of the cutting plane and the curve in space; Based on the intersection data and the three-dimensional medical image data, a real boundary of the target in the three-dimensional medical image data is determined.

2. The method according to claim 1, characterized in that The step of receiving the first curve data and the second curve data includes: In response to a user operation, a first set of position points on a first anatomical plane and a second set of position points on a second anatomical plane are determined; wherein the user operation at least represents an operation of the user drawing a first curve on the first anatomical plane and an operation of drawing a second curve on the second anatomical plane; wherein the first set of position points is a set of position data in space for representing a plurality of continuous and smooth or discrete position points on the first curve, and the second set of position points is a set of position data in space for representing a plurality of continuous and smooth or discrete position points on the second curve; wherein the plurality of continuous position points are position points representing the preliminary boundary of the target determined by the user on the corresponding anatomical plane.

3. The method according to claim 2, characterized in that The user operation further refers to an operation of the user drawing a first curve on a first anatomical plane and an operation of drawing a second curve on a second anatomical plane under a certain MPR coordinate axis perspective; wherein the MPR coordinate axis is an MPR coordinate axis selected by the user, and both the first anatomical plane and the second anatomical plane have corresponding MPR coordinate axes; The step of receiving the first curve data and the second curve data further includes: Verify whether each position point in the first position point set and the second position point set is located on the same corresponding plane; In the case that both are located on the same corresponding plane, the first curve data and the second curve data formed by the first position point set and the second position point set are the finally confirmed first curve data and the second curve data; When at least one position point is out of the corresponding anatomical plane, indication information is displayed; wherein the indication information is information for instructing the user to outline corresponding curves in the first anatomical plane and the second anatomical plane corresponding to the same MPR coordinate axis perspective.

4. The method according to claim 1, wherein In a case where the three-dimensional medical image data is three-dimensional medical image data representing magnetic resonance imaging or computed tomography imaging, the step of receiving the three-dimensional medical image data includes: receiving three-dimensional medical image data representing magnetic resonance imaging or computed tomography imaging from an imaging device; A preset coordinate axis correction method is adopted for the three-dimensional medical image data, so that voxel points in the three-dimensional medical image data in the device coordinate system are in a Cartesian orthogonal space.

5. The method according to claim 1, wherein Between the step of receiving the first curve data, the second curve data, and the three-dimensional medical image data and the step of generating N cutting planes in a direction perpendicular to the first anatomical plane and the second anatomical plane according to the three-dimensional medical image data, the method further includes: Determine an intersection point between the plane in which the first curve is located and the second curve; wherein the intersection point includes an intersection point between the first line and the plane and an intersection point between the second line and the plane; Determine whether the intersection point of the first line and the surface and the intersection point of the second line and the surface are within the first curve data; In the case where the first curve data is not included, at least two position points are determined from the first curve data; wherein the two position points are the two position points on the first curve that are closest to the intersection point of the first line and the plane and the intersection point of the second line and the plane, respectively; At least two position points in the current first curve data are replaced with the intersection point of the first line and the surface and the intersection point of the second line and the surface to obtain the first curve data after curve correction.

6. The method according to claim 1, characterized in that The step of generating N cutting planes according to the three-dimensional medical image data in a direction perpendicular to the first anatomical plane and the second anatomical plane comprises: Determine an intersection point between a first line and a second line, wherein the intersection point between the first line and the second line represents two intersection points of the first curve and the second curve in space; Taking the direction perpendicular to the first anatomical plane and the second anatomical plane as the cutting plane normal, between the intersection points of the first line and the second line, N cutting planes are generated along the cutting plane normal according to the three-dimensional medical image data at a preset spacing.

7. The method according to claim 1, characterized in that The intersection point data includes position data of four intersection points, which are two intersection points of any cutting plane with the first curve and two intersection points with the second curve; The step of determining a real boundary of the target in the three-dimensional medical image data based on the intersection data and the three-dimensional medical image data comprises: For any cutting plane, the four intersection points of the plane are used as boundary control points, and within the cutting plane, according to the image information of the three-dimensional medical image data and a preset edge segmentation algorithm, a target boundary is generated with the boundary control points as a reference; Traverse all cutting planes and combine the target boundaries of each plane into a three-dimensional target boundary.

8. The method according to claim 7, characterized in that The step of generating a boundary based on the boundary control point according to the image information of the three-dimensional medical image data and a preset edge segmentation algorithm includes: Based on the boundary control points and the preset size parameters, a corresponding target image block is extracted; the target image block carries boundary information of the target from one boundary control point to another boundary control point; Based on the target image block and a preset binary image generation algorithm, generating a binary image block corresponding to the target image block; For the binary image block, a first distance set and a second distance set are calculated to obtain a heat map image block corresponding to the binary image block; wherein the first distance set is a set representing the minimum distance values ​​between each foreground pixel representing a target and any background pixel representing a non-target in the binary image block, and the second distance set is a set representing the minimum distance values ​​between each background pixel representing a non-target and any foreground pixel representing a target in the binary image block; wherein the heat map image block is obtained by superimposing the first distance set and the second distance set; Based on the preset shortest path algorithm, the heat map image blocks corresponding to each target image block are traversed to generate the boundary of the target.

9. The method according to claim 8, wherein the step of generating a binary image block corresponding to the target image block based on the target image block and a preset binary image generation algorithm comprises: For the target image block, generating a grayscale distribution histogram with a preset number of grayscale intervals; Calculate the center value of each grayscale interval and use all the interval center values ​​as the candidate threshold set; Traversing the candidate threshold set, calculating the inter-class variance corresponding to each candidate threshold; wherein the inter-class variance is expressed as a quantitative parameter of the overall distribution separation obtained by dividing the pixels into low grayscale and high grayscale classes according to the candidate threshold, calculating the number weights of the two classes of pixels, and weighting the squared deviations of the average grayscale of the two classes of pixels with the average grayscale of the entire image according to their respective weights; The candidate threshold with the largest inter-class variance is determined as the final threshold; A final threshold is used to perform binarization processing on the target image block to obtain a binary image block.

10. A method for generating a three-dimensional mask of an object, characterized in that: include: For three-dimensional medical image data carrying at least one target, a target boundary determination method according to any one of claims 1 to 9 is used to determine a true boundary of the at least one target; Based on the true boundary, a three-dimensional mask of the object is generated.

11. An electronic device, characterized in that: include: a memory, and one or more processors communicatively coupled to the memory; Instructions executable by the one or more processors are stored in the memory. The instructions are executed by the one or more processors to enable the one or more processors to implement the method according to any one of claims 1 to 9.

Citation Information

Cited By

  • Medical image focus segmentation and three-dimensional reconstruction method and system based on artificial intelligence

    CN121504944A