Method, device, electronic device and medium for correcting medical image annotation results

By determining the maximum diameter and vertex coordinates of the target area of the medical image for scaling processing, the initial annotation results are automatically corrected, which solves the problems of low labeling efficiency and high cost in the prior art, and achieves efficient annotation results correction.

CN119887629BActive Publication Date: 2025-08-12DIGITAL HEALTH CHINA TECHNOLOGIES CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411799053.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-09
Publication Date
2025-08-12
Estimated Expiration
2044-12-09

AI Technical Summary

Technical Problem

The irregular medical image annotation results in the prior art require manual correction, resulting in inefficient labeling and increased cost.

Method used

By obtaining the medical image to be corrected, the maximum diameter and vertex coordinates of the target area are determined, and scaling is performed based on this information, and the initial labeling results are automatically corrected.

Benefits of technology

Improve the labeling efficiency and reduce the workload and cost of labeling personnel.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119887629B_ABST
    Figure CN119887629B_ABST
Patent Text Reader

Abstract

The present invention relates to a method, device, electronic device, and medium for correcting medical image annotation results. The method comprises: obtaining a medical image to be corrected, determining, for each target area, the maximum diameter corresponding to the target area and the pixel coordinates of each of the two target vertices corresponding to the maximum diameter; performing scaling processing on the target area according to the scaling size corresponding to the target area; and determining the target coordinates of each vertex of the target area after scaling based on the maximum diameter, scaling size, and pixel coordinates of each vertex of the target area; and correcting the initial annotation result of the target area based on the target coordinates of each vertex of the target area after scaling to obtain a target annotation result. The method of the present invention can improve annotation efficiency, reduce the workload of annotation personnel, and reduce annotation costs.
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, device, electronic device and medium for correcting medical image annotation results. Background Art

[0002] In the existing technology, non-standard medical image annotation results usually need to be corrected manually. Manual correction reduces annotation efficiency, increases the workload of annotators, and increases annotation costs. Summary of the Invention

[0003] The technical problem to be solved by the present invention is to provide a method, device, electronic device and medium for correcting medical image annotation results, aiming to solve at least one of the above technical problems.

[0004] In a first aspect, the present invention provides a technical solution to the above-mentioned technical problem as follows: a method for correcting medical image annotation results, the method comprising:

[0005] Acquire a medical image to be corrected, wherein the medical image to be corrected includes an initial annotation result of at least one target region, and each target region is a polygonal region;

[0006] For each target area, determining the maximum diameter corresponding to the target area and the pixel coordinates of the two target vertices corresponding to the maximum diameter, wherein the maximum diameter is the maximum value of the distances between any two vertices in the target area;

[0007] For each target area, scaling the target area according to the scaling size corresponding to the target area, and determining the target coordinates of each vertex of the target area after the scaling based on the maximum diameter of the target area, the scaling size, and the pixel coordinates of each vertex;

[0008] For each target region, the initial labeling result of the target region is corrected according to the target coordinates of each vertex of the target region after the scaling process, so as to obtain a target labeling result.

[0009] The beneficial effects of the present invention are as follows: after determining the target coordinates of each vertex of the target area after scaling based on the maximum diameter of the target area, the scaling size and the pixel coordinates of each vertex, the initial annotation result of the target area can be automatically and accurately corrected based on the target coordinates of each vertex of the target area after scaling, thereby improving the annotation efficiency, reducing the workload of the annotation personnel, and reducing the annotation cost expenditure.

[0010] On the basis of the above technical solution, the present invention can also be improved as follows.

[0011] Furthermore, for each target area, determining the maximum diameter corresponding to the target area and the pixel coordinates of the two target vertices corresponding to the maximum diameter includes:

[0012] Determine the pixel coordinates of each vertex and the pixel coordinates of the center point corresponding to the target area;

[0013] Determine the line segment between each vertex and the center point corresponding to the target area;

[0014] Taking any vertex corresponding to the target area as an initial vertex, determining, from each line segment corresponding to the target area, a first vertex corresponding to the maximum angle formed by the line segments corresponding to the initial vertex, and determining the distance between the initial vertex and the first vertex;

[0015] The maximum distance among all distances corresponding to the target area is determined as the maximum diameter corresponding to the target area, and the pixel coordinates of the initial vertex and the first vertex corresponding to the maximum diameter are determined as the pixel coordinates of each of the two target vertices corresponding to the maximum diameter.

[0016] Furthermore, taking any vertex corresponding to the target area as an initial vertex and determining, from the line segments corresponding to the target area, a first vertex corresponding to the maximum angle among the angles formed by the line segments corresponding to the initial vertex, includes:

[0017] Taking any vertex corresponding to the target area as an initial vertex, determining a cross product between a first vector corresponding to the initial vertex and a second vector corresponding to each of the other vertices based on the pixel coordinates of the initial vertex and the pixel coordinates of each of the other vertices, to obtain a plurality of cross product results, wherein the first vector is a vector between the initial vertex and a center point corresponding to the target area, each of the second vectors is a vector between one of the other vertices and the center point corresponding to the target area, and each of the other vertices is all vertices corresponding to the target area except the initial vertex;

[0018] According to all cross product results corresponding to the initial vertex, a first vertex is determined from all other vertices so that the angle formed by the line segment between the first vertex and the center point of the target area and the line segment between the initial vertex and the center point of the target area is maximized.

[0019] Furthermore, for each target area, based on the maximum diameter of the target area, the scaling size, and the pixel coordinates of each vertex, the target coordinates of each vertex of the target area after scaling are determined, including:

[0020] Determining a scaling factor corresponding to the target area according to the maximum diameter and scaling size of the target area;

[0021] The target coordinates of each vertex of the target area after the scaling process are determined according to the scaling factor corresponding to the target area and the pixel coordinates of each vertex.

[0022] Furthermore, determining the scaling factor corresponding to the target area according to the maximum diameter and the scaling size of the target area includes:

[0023] According to the maximum diameter and the scaling size of the target area, a scaling factor corresponding to the target area is determined by a first formula, wherein the first formula is:

[0024] μ=(dmax±S) / dmax

[0025] Wherein, μ is the scaling factor corresponding to the target area, dmax is the maximum diameter corresponding to the target area, and S is the scaling size corresponding to the target area.

[0026] Furthermore, for each target area, determining the target coordinates of each vertex of the target area after scaling according to the scaling factor corresponding to the target area and the pixel coordinates of each vertex includes:

[0027] Determining target vectors corresponding to the target area after scaling based on the scaling factor of the target area, the pixel coordinates of the respective vertices, and the pixel coordinates of the center point of the target area, wherein each target vector includes a vector between the center point after scaling and each vertex after scaling;

[0028] The target coordinates of each vertex of the target area after scaling are determined according to all target vectors corresponding to the target area.

[0029] Furthermore, the method further comprises:

[0030] For each target area, the pixel coordinates of each vertex corresponding to the target area are determined according to a convex hull algorithm.

[0031] In a second aspect, in order to solve the above technical problems, the present invention further provides a medical image annotation result correction device, which includes:

[0032] An acquisition module is used to acquire a medical image to be corrected, wherein the medical image to be corrected includes an initial annotation result of at least one target region, and each target region is a polygonal region;

[0033] a maximum diameter determination module, configured to determine, for each target area, a maximum diameter corresponding to the target area and the pixel coordinates of two target vertices corresponding to the maximum diameter, wherein the maximum diameter is the maximum value of the distances between any two vertices in the target area;

[0034] a scaling processing module, configured to perform scaling processing on each target area according to a scaling size corresponding to the target area, and determine target coordinates of each vertex of the target area after the scaling processing based on the maximum diameter of the target area, the scaling size, and the pixel coordinates of each vertex;

[0035] The labeling result correction module is used to correct the initial labeling result of each target area according to the target coordinates of each vertex of the target area after scaling to obtain a target labeling result.

[0036] In the third aspect, in order to solve the above-mentioned technical problems, the present invention also provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and runnable on the processor. When the processor executes the computer program, the medical image annotation result correction method of the present application is implemented.

[0037] In a fourth aspect, in order to solve the above-mentioned technical problems, the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the medical image annotation result correction method of the present application is implemented.

[0038] Additional aspects and advantages of the present application will be given in part in the following description, which will become apparent from the following description, or will be learned through practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments of the present invention.

[0040] Figure 1 A schematic flow chart of a method for correcting medical image annotation results provided by one embodiment of the present invention;

[0041] Figure 2 A schematic structural diagram of a medical image annotation result correction device provided by one embodiment of the present invention;

[0042] Figure 3 The present invention provides a schematic structural diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0043] The principles and features of the present invention are described below. The examples given are only used to explain the present invention and are not used to limit the scope of the present invention.

[0044] The following describes in detail the technical solution of the present invention and how the technical solution of the present invention solves the above-mentioned technical problems using specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The following embodiments of the present invention are described in conjunction with the accompanying drawings.

[0045] The solution provided by the embodiments of the present invention can be applied to any application scenario where the annotation results of preliminarily annotated medical images need to be corrected. The solution provided by the embodiments of the present invention can be executed by any electronic device, for example, a user's terminal device. The terminal device can be any terminal device that can install an application and use the application to correct the annotation results of preliminarily annotated medical images, including at least one of the following: a smartphone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, a smart TV, and a smart car device.

[0046] The embodiment of the present invention provides a possible implementation method, such as Figure 1 As shown in FIG, a flowchart of a method for correcting medical image annotation results is provided. The solution can be executed by any electronic device, for example, a terminal device, or by a terminal device and a server. For ease of description, the method provided by the embodiment of the present invention will be described below using a terminal device as an example of the execution subject. Figure 1 As shown in the flowchart, the method may include the following steps:

[0047] S10, obtaining a medical image to be corrected, wherein the medical image to be corrected includes an initial annotation result of at least one target region, and each target region is a polygonal region;

[0048] S20, for each target area, determining a maximum diameter corresponding to the target area and pixel coordinates of two target vertices corresponding to the maximum diameter, wherein the maximum diameter is the maximum value of distances between any two vertices in the target area;

[0049] S30, for each target area, scaling the target area according to the scaling size corresponding to the target area, and determining target coordinates of each vertex of the target area after the scaling based on the maximum diameter of the target area, the scaling size, and the pixel coordinates of each vertex;

[0050] S40 , for each target area, correcting the initial labeling result of the target area according to the target coordinates of each vertex of the target area after scaling, to obtain a target labeling result.

[0051] Through the method of the present invention, after the target coordinates of each vertex of the target area after the scaling process are determined based on the maximum diameter of the target area, the scaling size and the pixel coordinates of each vertex, the initial annotation result of the target area can be automatically and accurately corrected based on the target coordinates of each vertex of the target area after the scaling process, thereby improving the annotation efficiency, reducing the workload of the annotation personnel, and reducing the annotation cost expenditure.

[0052] The solution of the present invention is further described below with reference to the following specific embodiments. In this embodiment, a method for correcting medical image annotation results may include the following steps:

[0053] S10, obtaining a medical image to be corrected, wherein the medical image to be corrected includes an initial annotation result of at least one target region, and each target region is a polygonal region;

[0054] The medical image to be corrected refers to a medical image that needs to have its annotation results corrected. The medical image to be corrected may be a medical image in DICOM format. The target area refers to an area in the medical image to be corrected that represents specific features, including but not limited to an area that represents lesion features, or an area that represents organ features.

[0055] Each target region corresponds to an initial annotation result, which represents the annotation information corresponding to the target region, such as the organ. The initial annotation result can be based on the annotation performed by the annotator.

[0056] S20, for each target area, determining a maximum diameter corresponding to the target area and pixel coordinates of two target vertices corresponding to the maximum diameter, wherein the maximum diameter is the maximum value of distances between any two vertices in the target area;

[0057] In the solution of the present application, based on the user's selection operation on any one of the at least one target area, the target area that needs to be zoomed in can be determined to correct the initial annotation result corresponding to the target area.

[0058] The maximum diameter corresponding to the target area refers to the maximum distance between every two vertices among all vertices corresponding to the target area.

[0059] Optionally, in the above S20, for each target area, that is, taking one target area as an example, determining the maximum diameter corresponding to the target area and the pixel coordinates of the two target vertices corresponding to the maximum diameter includes:

[0060] S201, determining the pixel coordinates of each vertex and the pixel coordinates of the center point corresponding to the target area;

[0061] In the solution of the present application, for each target area, the pixel coordinates of each vertex corresponding to the target area can be determined based on an image algorithm.

[0062] Furthermore, for each target area, the pixel coordinates of each vertex corresponding to the target area may be determined according to a convex hull algorithm.

[0063] As an example, for a target area A, all vertices of the target area A determined by the image algorithm can be represented based on a vertex set P, P = {(x1, y1), (x2, y2), ..., (x n ,y n )}, where n represents the total number of vertices in the target area A. All vertices of the target area A determined by the convex hull algorithm can be represented based on the vertex set C, C = {(x1′, y1′), (x2′, y2′), …, (x m ′,y m ′)}, where m represents the total number of vertices in the target area A, and m≤n. That is, the total number of vertices in the target area determined based on the convex hull algorithm is not greater than the total number of vertices in the target area determined based on the image algorithm.

[0064] Since the target area is a polygon, the vertices in the polygon are all convex outside the inscribed circle of the polygon, not concave inside the inscribed circle of the polygon. Therefore, based on the convex hull algorithm, the points in the target area that are not vertices of the polygon can be removed.

[0065] In this application, the pixel coordinates of the center point of a target area can be determined based on the following method:

[0066] The center of the circumscribed circle corresponding to the target area is determined, and the pixel coordinates of the center are determined as the pixel coordinates of the center point of the target area.

[0067] S202, determining a line segment between each vertex and the center point corresponding to the target area;

[0068] S203: Taking any vertex corresponding to the target area as an initial vertex, that is, performing the following identical processing on each vertex corresponding to the target area: determining, from all line segments corresponding to the target area, a first vertex corresponding to the maximum angle formed by the line segments corresponding to the target area and the line segments corresponding to the initial vertex, and determining the distance between the initial vertex and the first vertex;

[0069] S204: Determine the maximum distance among all distances corresponding to the target area as the maximum diameter corresponding to the target area, and determine the pixel coordinates of the initial vertex and the first vertex corresponding to the maximum diameter as the pixel coordinates of the two target vertices corresponding to the maximum diameter.

[0070] Optionally, in S203, any vertex corresponding to the target area is used as an initial vertex, and a first vertex corresponding to the maximum angle among angles formed by line segments corresponding to the target area and the line segments corresponding to the initial vertex is determined, including:

[0071] S2031, taking any vertex corresponding to the target area as an initial vertex, and determining, based on the pixel coordinates of the initial vertex and the pixel coordinates of each other vertex, a cross product between a first vector corresponding to the initial vertex and a second vector corresponding to each other vertex, to obtain a plurality of cross product results, where the first vector is a vector between the initial vertex and a center point corresponding to the target area, each second vector is a vector between one of the other vertices and the center point corresponding to the target area, and each other vertex is all vertices corresponding to the target area except the initial vertex;

[0072] S2032: Determine a first vertex from all other vertices based on all cross product results corresponding to the initial vertex, so that the angle formed by the line segment between the first vertex and the center point of the target area and the line segment between the initial vertex and the center point of the target area is maximized.

[0073] Among them, the cross product result obtained by calculating the cross product between the two vectors is a scalar. The closer the scalar is to 0, the more likely it is that the two vertices and the center point corresponding to the two vectors are on the same straight line. In other words, the larger the angle formed by the line segment between the two vertices corresponding to the two vectors and the center point is. Therefore, the first vertex corresponding to the initial vertex can be determined based on the cross product results corresponding to the two vectors.

[0074] It should be noted that for each vertex in each target area, the first vertex corresponding to each vertex can be determined through the above steps S2031 and S2032. In this way, for each target area, there are several vertices and several distances can be determined. Each distance refers to the distance between the corresponding vertex and the first vertex corresponding to the vertex.

[0075] As an example, if a target area is a quadrilateral with four vertices A, B, C, and D, and vertex A is used as the initial vertex, assuming that the first vertex corresponding to this initial vertex is C, then a distance can be determined between vertices A and C, denoted as Distance 1. Similarly, if vertex B is used as the initial vertex, and the first vertex corresponding to this initial vertex is D, then a distance can be determined between vertices B and D, denoted as Distance 2. If vertex C is used as the initial vertex, and the first vertex corresponding to this initial vertex is A, then a distance can be determined between vertices C and A, denoted as Distance 3. Distance 3 and Distance 1 can be the same distance. If vertex D is used as the initial vertex, and the first vertex corresponding to this initial vertex is B, then a distance can be determined between vertices B and D, denoted as Distance 4. Distance 2 and Distance 4 can be the same distance. In this way, four distances can be obtained for this quadrilateral. Then, the maximum of these four distances can be determined as the maximum diameter of the quadrilateral, and the two vertices corresponding to this maximum diameter can be used as target vertices.

[0076] In the present application, if the first vertex corresponding to a target area is obtained based on the cross product calculation, then in the present application, the pixel coordinates of the center point of a target area can also be determined based on the following method:

[0077] The pixel coordinates of the center point of the target area are determined based on the pixel coordinates corresponding to the two target vertices corresponding to the maximum diameter of the target area.

[0078] As an example, if the pixel coordinates of the two target vertices corresponding to the maximum diameter of the target area are p1(x1, y1) and p2(x2, y2), respectively, then the pixel coordinates of the center point O are:

[0079]

[0080] S30, for each target area, scaling the target area according to the scaling size corresponding to the target area, and determining target coordinates of each vertex of the target area after the scaling based on the maximum diameter of the target area, the scaling size, and the pixel coordinates of each vertex;

[0081] Different target areas may correspond to different scaling sizes, which may be x pixels. The scaling size may be based on user-defined settings.

[0082] Wherein, performing scaling processing on the target area specifically refers to enlarging or reducing the target area according to the scaling size corresponding to the target area. It is understood that only one processing, enlarging or reducing, can be performed on the target area at a time, and it cannot be enlarged and reduced at the same time. Enlarging processing specifically refers to enlarging the pixels corresponding to the scaling size of the target area according to the scaling size, and reducing processing specifically refers to reducing the pixels corresponding to the scaling size of the target area according to the scaling size.

[0083] Optionally, in S30 above, for each target area, determining the target coordinates of each vertex of the target area after scaling based on the maximum diameter of the target area, the scaling size, and the pixel coordinates of each vertex includes:

[0084] S301, determining a scaling factor corresponding to the target area according to the maximum diameter and scaling size of the target area;

[0085] S302 : Determine target coordinates of each vertex of the target area after scaling according to the scaling factor corresponding to the target area and the pixel coordinates of each vertex.

[0086] The scaling factor refers to the ratio between the size of the target area after scaling and the size of the target area before scaling. The scaling factor can reflect the changes in the target area before and after scaling.

[0087] Optionally, one possible implementation of S301 is:

[0088] According to the maximum diameter and the scaling size of the target area, a scaling factor corresponding to the target area is determined by a first formula, wherein the first formula is:

[0089] μ=(dmax±S) / dmax

[0090] Wherein, μ is the scaling factor corresponding to the target area, dmax is the maximum diameter corresponding to the target area, and S is the scaling size corresponding to the target area.

[0091] Here, dmax+S refers to a process of enlarging the target area by S pixels, and dmax-S refers to a process of shrinking the target area by S pixels.

[0092] Optionally, one possible implementation of S302 is:

[0093] S3021, determining target vectors corresponding to the target area after scaling based on the scaling factor of the target area, the pixel coordinates of the respective vertices, and the pixel coordinates of the center point of the target area, wherein each target vector includes a vector between the center point after scaling and each vertex after scaling;

[0094] S3022: Determine target coordinates of each vertex of the target area after scaling based on all target vectors corresponding to the target area.

[0095] The specific implementation of the above S3021 is as follows:

[0096] According to the scaling factor corresponding to the target area, the pixel coordinates of each vertex, and the pixel coordinates of the center point of the target area, the target vectors corresponding to the target area after scaling are determined by the following formula:

[0097]

[0098] Among them, V represents the vector set corresponding to each target vector of the target area after scaling processing, Indicates the target vector corresponding to the vector corresponding to the i-th vertex after scaling. represents the vector between the i-th vertex and the center point O, and μ represents the scaling factor.

[0099] in, It can be determined based on the pixel coordinates of the corresponding vertices and the pixel coordinates of the center point.

[0100] Optionally, one possible implementation of S3022 is:

[0101] According to all target vectors corresponding to the target area and the pixel coordinates of the center point, the target coordinates of each vertex of the target area after the scaling process can be determined.

[0102] During the scaling process, the pixel coordinates of the center point remain unchanged. For each target vector, given the pixel coordinates of the center point corresponding to the target vector, the target coordinates of each vertex in the target area after scaling can be calculated. Specifically, it can be expressed as:

[0103] B={(p1.x+v1.x,p1.y+v1.y),(p2.x+v2.x,p2.y+v2.y),......(p i .x+v i .x,p i .y+v i .y)}

[0104] Among them, B represents the target coordinates of each vertex in the target area after scaling, p i Indicates the target area before scaling, the i-th vertex, (x, y) represents p i The x-axis and y-axis coordinates of the point, that is, p i The pixel coordinates of the point, v i Represents the i-th vertex of the scaled vector set V.

[0105] S40 , for each target area, correcting the initial labeling result of the target area according to the target coordinates of each vertex of the target area after scaling, to obtain a target labeling result.

[0106] Among them, correcting the initial annotation result of the target area essentially means re-rendering and displaying according to the target coordinates of each vertex of the target area after the scaling process.

[0107] In the present application, the target coordinates of each vertex of the target area after scaling can be used to render and display the target annotation results in the following way:

[0108] 1. Preparation

[0109] Import the Cornerstone core library (cornerstone-core), Cornerstone tool library (cornerstone-tools), Cornerstone WADO image loader (cornerstone-wado-image-loader), and DICOM parser (dicom-parser) into the HTML page.

[0110] Register Cornerstone (tool library) and DICOM parser as external dependencies in CornerstoneWADOImageLoader;

[0111] Create a container element in HTML for displaying DICOM images (DICOM (Digital Imaging and Communications in Medicine) is an international standard for medical images and related information (ISO 12052). It defines a medical image format that can be used for data exchange with quality that meets clinical needs);

[0112] 2. Load and parse DICOM files

[0113] Use CornerstoneWADOImageLoader as the loader for DICOM files.

[0114] Registers CornerstoneWADOImageLoader's loading function for HTTP and HTTPS protocols.

[0115] Get the URL of a DICOM file via the WADO protocol or directly from the local file system.

[0116] Use Cornerstone's loadImage function, pass in the URL (or image ID) of the DICOM file, and load the DICOM image.

[0117] During the loading process, CornerstoneWADOImageLoader uses the DICOM parser (dicom-parser) to parse the metadata and pixel data of the DICOM file (each DICOM file consists of two parts: metadata and pixel data. Metadata is a "tag" used to describe image information, including patient name, acquisition time, etc. These tags are organized into different groups and element numbers to ensure the uniqueness and validity of the information. Pixel data directly presents the content of medical images such as CT or MRI, and is integrated at the end of the file with a specific coding structure).

[0118] 3. Rendering DICOM Images

[0119] Use Cornerstone's enable function to activate the HTML element (container) used to display DICOM images.

[0120] Use Cornerstone's displayImage function to display the loaded and parsed DICOM image (this DICOM image is the medical image to be corrected when the target coordinates of each vertex of the target area after scaling are determined) in the activated container to achieve the rendering display of the target annotation results of the medical image to be corrected after scaling.

[0121] Afterwards, the program may also include:

[0122] Add reading and annotation tools to rendered medical images, specifically:

[0123] Use the API provided by cornerstoneTools to initialize and activate the required interactive tools (such as zoom, pan, measurement, brush, polygon annotation tools, etc.).

[0124] Bind the event handler of the interactive tool to the rendering container to implement the function of adding reading and annotation to the rendered medical images.

[0125] In this application, the brush tool (freehand Tool) in the cornerstoneTool can also be used to mark the area to be marked in the corrected medical image (the target area before marking), specifically:

[0126] Use the brush tool to outline the area of interest in the image to form a closed area. Alternatively, connect to the deep network training model to annotate the area to be annotated in the medical image to be corrected.

[0127] Through the solution of the present invention, the freehandRoi tool in the cornerstoneTool can be used to outline the boundaries of the region of interest in the medical image, forming a multi-point irregular polygonal closed area. By calculating the center point of the polygon and setting a suitable scaling factor, the polygonal annotated area (target area) can be quickly scaled according to the pixels corresponding to the scaling factor.

[0128] Based on Figure 1 Based on the same principle as the method shown in , the embodiment of the present invention further provides a medical image annotation result correction device 20, such as Figure 2 As shown in , the medical image annotation result correction device 20 may include an acquisition module 210, a maximum diameter determination module 220, a scaling processing module 230 and an annotation result correction module 240, wherein:

[0129] An acquisition module 210 is configured to acquire a medical image to be corrected, wherein the medical image to be corrected includes an initial annotation result of at least one target region, and each target region is a polygonal region;

[0130] A maximum diameter determination module 220 is configured to determine, for each target region, a maximum diameter corresponding to the target region and the pixel coordinates of two target vertices corresponding to the maximum diameter, wherein the maximum diameter is the maximum value of the distances between any two vertices in the target region;

[0131] a scaling processing module 230 for scaling each target region according to a scaling size corresponding to the target region, and determining target coordinates of each vertex of the target region after the scaling process based on the maximum diameter of the target region, the scaling size, and the pixel coordinates of each vertex;

[0132] The labeling result correction module 240 is configured to correct the initial labeling result of each target region according to the target coordinates of each vertex of the target region after scaling to obtain a target labeling result.

[0133] Optionally, for each target area, when determining the maximum diameter corresponding to the target area and the pixel coordinates of the two target vertices corresponding to the maximum diameter, the maximum diameter determining module 220 is specifically configured to:

[0134] Determine the pixel coordinates of each vertex and the pixel coordinates of the center point corresponding to the target area;

[0135] Determine the line segment between each vertex and the center point corresponding to the target area;

[0136] Taking any vertex corresponding to the target area as an initial vertex, determining, from each line segment corresponding to the target area, a first vertex corresponding to the maximum angle formed by the line segments corresponding to the initial vertex, and determining the distance between the initial vertex and the first vertex;

[0137] The maximum distance among all distances corresponding to the target area is determined as the maximum diameter corresponding to the target area, and the pixel coordinates of the initial vertex and the first vertex corresponding to the maximum diameter are determined as the pixel coordinates of each of the two target vertices corresponding to the maximum diameter.

[0138] Optionally, when the maximum diameter determining module 220 takes any vertex corresponding to the target area as an initial vertex and determines, from the line segments corresponding to the target area, a first vertex corresponding to the maximum angle among the angles formed by the line segments corresponding to the initial vertex, the maximum diameter determining module 220 is specifically configured to:

[0139] Taking any vertex corresponding to the target area as an initial vertex, determining a cross product between a first vector corresponding to the initial vertex and a second vector corresponding to each of the other vertices based on the pixel coordinates of the initial vertex and the pixel coordinates of each of the other vertices, to obtain a plurality of cross product results, wherein the first vector is a vector between the initial vertex and a center point corresponding to the target area, each of the second vectors is a vector between one of the other vertices and the center point corresponding to the target area, and each of the other vertices is all vertices corresponding to the target area except the initial vertex;

[0140] According to all cross product results corresponding to the initial vertex, a first vertex is determined from all other vertices so that the angle formed by the line segment between the first vertex and the center point of the target area and the line segment between the initial vertex and the center point of the target area is maximized.

[0141] Optionally, for each target area, the scaling processing module 230 is specifically configured to:

[0142] Determining a scaling factor corresponding to the target area according to the maximum diameter and scaling size of the target area;

[0143] The target coordinates of each vertex of the target area after the scaling process are determined according to the scaling factor corresponding to the target area and the pixel coordinates of each vertex.

[0144] Optionally, when determining the scaling factor corresponding to the target area according to the maximum diameter and the scaling size of the target area, the scaling processing module 230 is specifically configured to:

[0145] According to the maximum diameter and the scaling size of the target area, a scaling factor corresponding to the target area is determined by a first formula, wherein the first formula is:

[0146] μ=(dmax±S) / dmax

[0147] Wherein, μ is the scaling factor corresponding to the target area, dmax is the maximum diameter corresponding to the target area, and S is the scaling size corresponding to the target area.

[0148] Optionally, for each target area, the scaling processing module 230 is specifically configured to:

[0149] Determining target vectors corresponding to the target area after scaling based on the scaling factor of the target area, the pixel coordinates of the respective vertices, and the pixel coordinates of the center point of the target area, wherein each target vector includes a vector between the center point after scaling and each vertex after scaling;

[0150] The target coordinates of each vertex of the target area after scaling are determined according to all target vectors corresponding to the target area.

[0151] Optionally, the device further comprises:

[0152] The vertex pixel coordinate determination module is used to determine the pixel coordinates of each vertex corresponding to each target area according to a convex hull algorithm.

[0153] The medical image annotation result correction device of the embodiment of the present invention can execute the medical image annotation result correction method provided by the embodiment of the present invention. The implementation principle is similar. The actions performed by each module and unit in the medical image annotation result correction device in each embodiment of the present invention correspond to the steps in the medical image annotation result correction method in each embodiment of the present invention. For the detailed functional description of each module of the medical image annotation result correction device, please refer to the description of the corresponding medical image annotation result correction method shown in the previous text, and will not be repeated here.

[0154] Among them, the above-mentioned medical image annotation result correction device can be a computer program (including program code) running in a computer device, for example, the medical image annotation result correction device is an application software; the device can be used to execute the corresponding steps in the method provided in the embodiment of the present invention.

[0155] In some embodiments, the medical image annotation result correction device provided by the embodiments of the present invention can be implemented in a combination of software and hardware. As an example, the medical image annotation result correction device provided by the embodiments of the present invention can be a processor in the form of a hardware decoding processor, which is programmed to execute the medical image annotation result correction method provided by the embodiments of the present invention. For example, the processor in the form of a hardware decoding processor can adopt one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), or other electronic components.

[0156] In other embodiments, the medical image annotation result correction device provided by the embodiment of the present invention can be implemented in software. Figure 2 A medical image annotation result correction device stored in a memory is shown, which can be software in the form of a program and a plug-in, and includes a series of modules, including an acquisition module 210, a maximum diameter determination module 220, a scaling processing module 230 and an annotation result correction module 240, for implementing the medical image annotation result correction method provided in an embodiment of the present invention.

[0157] The modules involved in the embodiments of the present invention may be implemented in software or hardware, wherein the name of a module does not necessarily limit the module itself.

[0158] Based on the same principle as the method shown in the embodiments of the present invention, an electronic device is also provided in the embodiments of the present invention, which may include but is not limited to: a processor and a memory; the memory is used to store computer programs; the processor is used to execute the method shown in any embodiment of the present invention by calling the computer program.

[0159] In an alternative embodiment, an electronic device is provided, such as Figure 3 As shown, Figure 3 The electronic device 4000 shown includes: a processor 4001 and a memory 4003. The processor 4001 and the memory 4003 are connected, for example, via a bus 4002. Optionally, the electronic device 4000 may further include a transceiver 4004, which can be used for data exchange between the electronic device and other electronic devices, such as data transmission and / or data reception. It should be noted that in actual applications, the number of transceivers 4004 is not limited to one, and the structure of the electronic device 4000 does not constitute a limitation on the embodiments of the present invention.

[0160] Processor 4001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the present disclosure. Processor 4001 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like.

[0161] Bus 4002 may include a path for transmitting information between the above components. Bus 4002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. Bus 4002 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 3 Only one thick line is used in the diagram, but this does not mean that there is only one bus or one type of bus.

[0162] The memory 4003 may be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, optical disk storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited to these.

[0163] The memory 4003 is used to store application code (computer program) for executing the solution of the present invention, and is controlled by the processor 4001. The processor 4001 is used to execute the application code stored in the memory 4003 to implement the content shown in the above method embodiment.

[0164] Among them, the electronic device can also be a terminal device, Figure 3 The electronic device shown is only an example and should not limit the functions and scope of use of the embodiments of the present invention.

[0165] An embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon. When the computer-readable storage medium is run on a computer, the computer can execute the corresponding contents of the aforementioned method embodiment.

[0166] According to another aspect of the present invention, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in the various implementations described above.

[0167] Computer program code for performing the operations of the present invention may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0168] It should be understood that the flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the methods and computer program products according to various embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or can be implemented using a combination of dedicated hardware and computer instructions.

[0169] The computer-readable storage medium provided by the embodiments of the present invention may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or component, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device or device.

[0170] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device executes the method shown in the above embodiment.

[0171] The above description is merely a preferred embodiment of the present invention and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of disclosure involved in the present invention is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, but also includes other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the above-mentioned disclosed concepts. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in the present invention.

Claims

1. A method for correcting medical image annotation results, characterized in that: The following steps are involved: Acquire a medical image to be corrected, wherein the medical image to be corrected includes an initial annotation result of at least one target region, and each target region is a polygonal region; For each target area, determining the pixel coordinates of each vertex and the pixel coordinates of the center point corresponding to the target area; For each target area, determining a line segment between each vertex corresponding to the target area and the center point; For each target area, any vertex corresponding to the target area is used as an initial vertex, and according to the pixel coordinates of the initial vertex and the pixel coordinates of each other vertex, a cross product between a first vector corresponding to the initial vertex and a second vector corresponding to each other vertex is determined to obtain a plurality of cross product results, wherein the first vector is a vector between the initial vertex and the center point corresponding to the target area, each second vector is a vector between one of the other vertices and the center point corresponding to the target area, and each other vertex is all vertices corresponding to the target area except the initial vertex; Determine a first vertex from all other vertices based on all cross product results corresponding to the initial vertex so that the angle formed by a line segment between the first vertex and the center point of the target area and a line segment between the initial vertex and the center point of the target area is maximized, and determine the distance between the initial vertex and the first vertex; For each target area, determining the maximum distance among all distances corresponding to the target area as the maximum diameter corresponding to the target area, and determining the pixel coordinates of the initial vertex and the pixel coordinates of the first vertex corresponding to the maximum diameter as the pixel coordinates of the two target vertices corresponding to the maximum diameter, wherein the maximum diameter is the maximum value of the distances between any two vertices in the target area; For each target area, scaling the target area according to the scaling size corresponding to the target area, and determining the target coordinates of each vertex of the target area after the scaling based on the maximum diameter of the target area, the scaling size, and the pixel coordinates of each vertex; For each target region, the initial labeling result of the target region is corrected according to the target coordinates of each vertex of the target region after the scaling process, so as to obtain a target labeling result.

2. The method according to claim 1, characterized in that For each target area, determining target coordinates of each vertex of the target area after scaling based on the maximum diameter of the target area, the scaling size, and the pixel coordinates of each vertex includes: Determining a scaling factor corresponding to the target area according to the maximum diameter and scaling size of the target area; The target coordinates of each vertex of the target area after the scaling process are determined according to the scaling factor corresponding to the target area and the pixel coordinates of each vertex.

3. The method according to claim 2, characterized in that The determining, according to the maximum diameter and the scaling size of the target area, a scaling factor corresponding to the target area includes: According to the maximum diameter and the scaling size of the target area, a scaling factor corresponding to the target area is determined by a first formula, wherein the first formula is: μ=(dmax±S) / dmax Wherein, μ is the scaling factor corresponding to the target area, dmax is the maximum diameter corresponding to the target area, and S is the scaling size corresponding to the target area.

4. The method according to claim 3, characterized in that For each target area, determining the target coordinates of each vertex of the target area after scaling according to the scaling factor corresponding to the target area and the pixel coordinates of each vertex includes: Determining target vectors corresponding to the target area after scaling based on the scaling factor of the target area, the pixel coordinates of the respective vertices, and the pixel coordinates of the center point of the target area, wherein each target vector includes a vector between the center point after scaling and each vertex after scaling; The target coordinates of each vertex of the target area after scaling are determined according to all target vectors corresponding to the target area.

5. The method according to claim 1, wherein The method further comprises: For each target area, the pixel coordinates of each vertex corresponding to the target area are determined according to a convex hull algorithm.

6. A medical image annotation result correction device, characterized in that: include: An acquisition module is used to acquire a medical image to be corrected, wherein the medical image to be corrected includes an initial annotation result of at least one target region, and each target region is a polygonal region; a maximum diameter determination module, configured to determine, for each target area, the pixel coordinates of each vertex and the pixel coordinates of the center point corresponding to the target area; and determine a line segment between each vertex and the center point corresponding to the target area; Taking any vertex corresponding to the target area as an initial vertex, determining a cross product between a first vector corresponding to the initial vertex and a second vector corresponding to each of the other vertices based on the pixel coordinates of the initial vertex and the pixel coordinates of each of the other vertices, to obtain a plurality of cross product results, wherein the first vector is a vector between the initial vertex and a center point corresponding to the target area, each of the second vectors is a vector between one of the other vertices and the center point corresponding to the target area, and each of the other vertices is all vertices corresponding to the target area except the initial vertex; Based on all cross product results corresponding to the initial vertex, a first vertex is determined from all other vertices so that the angle formed by the line segment between the first vertex and the center point of the target area and the line segment between the initial vertex and the center point of the target area is maximized, and the distance between the initial vertex and the first vertex is determined; the maximum distance among all distances corresponding to the target area is determined as the maximum diameter corresponding to the target area, and the pixel coordinates of the initial vertex and the first vertex corresponding to the maximum diameter are determined as the pixel coordinates of each of the two target vertices corresponding to the maximum diameter, and the maximum diameter is the maximum value of the distances between any two vertices in the target area; a scaling processing module, configured to perform scaling processing on each target area according to a scaling size corresponding to the target area, and determine target coordinates of each vertex of the target area after the scaling processing based on the maximum diameter of the target area, the scaling size, and the pixel coordinates of each vertex; The labeling result correction module is used to correct the initial labeling result of each target area according to the target coordinates of each vertex of the target area after scaling to obtain a target labeling result.

7. An electronic device, characterized in that: The method comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method according to any one of claims 1 to 5 when executing the computer program.

8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Key point labeling method and device, equipment and storage medium

    CN116958843A

  • Medical image processing method and device, electronic equipment and storage medium

    CN117809092A