Medical image labeling result correction method and device, electronic equipment and medium

By automatically correcting the results of medical images, using maximum diameter and scaling processing technology, the problem of low manual correction efficiency in the existing technology is solved, and efficient and accurate correction of the results of labeling is achieved.

CN119887629AActive Publication Date: 2025-04-25DIGITAL HEALTH CHINA TECHNOLOGIES CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In the prior art, irregular medical image labeling results require manual correction, resulting in reduced labeling efficiency, increased workload 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, the scaling process is performed, the scaled target coordinates are calculated, and the initial annotation results are automatically corrected based on these coordinates.

Benefits of technology

It realizes automatic and accurate correction of medical image annotation results, improves labeling efficiency, and reduces the workload and cost of labeling personnel.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119887629A_ABST
    Figure CN119887629A_ABST
Patent Text Reader

Abstract

The invention relates to a medical image labeling result correction method and device, electronic equipment and a medium, and the method comprises the steps: obtaining a to-be-corrected medical image, determining the maximum diameter corresponding to each target region and the pixel coordinates of two target vertexes corresponding to the maximum diameter, and correcting the medical image labeling result according to the maximum diameter and the pixel coordinates of the two target vertexes; according to the zoom size corresponding to the target area, performing zoom processing on the target area, and determining target coordinates of each vertex of the target area after zoom processing based on the maximum diameter and the zoom size of the target area and the respective pixel coordinates of each vertex; and correcting the initial labeling result of the target area according to the target coordinates of the zoomed vertexes of the target area to obtain a target labeling result. Through the method provided by the invention, the labeling efficiency can be improved, the workload of labeling personnel is reduced, and the labeling cost is reduced.
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 equipment and medium for correcting medical image annotation results. Background Art

[0002] In the prior art, 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 the first aspect, the technical solution of the present invention to solve the above technical problem is 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 area, and each target area is a polygonal area;

[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 of the target areas, 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 of the target regions, 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 effect of the present invention is that 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 labeling 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 labeling efficiency, reducing the workload of the labeling personnel, and reducing the labeling cost expenditure.

[0010] Based on the above technical solution, the present invention can also be improved as follows.

[0011] Further, for each of the target areas, 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 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, 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] Further, taking any vertex corresponding to the target area as an initial vertex, and determining, from each line segment corresponding to the target area, a first vertex corresponding to the maximum angle among 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 the cross product between a first vector corresponding to the initial vertex and second vectors corresponding to each of the other vertices according to the pixel coordinates of the initial vertex and the pixel coordinates of each of the other vertices, and obtaining 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 a center point corresponding to the target area, and each of the other vertices is all vertices except the initial vertex among all vertices corresponding to the target area;

[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] Further, for each of the target regions, based on the maximum diameter of the target region, the scaling size and the pixel coordinates of each vertex, the target coordinates of each vertex of the target region after scaling are determined, including:

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

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

[0022] Further, 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, the 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] Further, for each of the target regions, determining the target coordinates of each vertex of the target region after the scaling process according to the scaling factor corresponding to the target region and the pixel coordinates of each vertex includes:

[0027] Determine, 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, each target vector corresponding to the target area after scaling, each target vector including a vector between the center point after scaling and each vertex after scaling;

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

[0029] Furthermore, the method further comprises:

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

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

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

[0033] A maximum diameter determination module, used for determining, for each target area, 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 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 the scaling process, so as to obtain the target labeling result.

[0036] In a third aspect, in order to solve the above-mentioned technical problem, the present invention also provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and 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 problem, the present invention further provides a computer-readable storage medium, on which a computer program is stored, and 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 partially given in the following description, which will become apparent from the following description, or will be understood through the 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 drawings required for describing the embodiments of the present invention are briefly introduced below.

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

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

[0042] Figure 3 A schematic diagram of the structure of an electronic device provided by 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 technical solution of the present invention and how the technical solution of the present invention solves the above-mentioned technical problems are described in detail below with 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 embodiments of the present invention will be described below in conjunction with the accompanying drawings.

[0045] The solution provided by the embodiment of the present invention can be applied to any application scenario where the annotation results of the preliminarily annotated medical images need to be corrected. The solution provided by the embodiment of the present invention can be executed by any electronic device, for example, it can be a user's terminal device, and the above terminal device can be any terminal device that can install an application and can correct the annotation results of the preliminarily annotated medical images through the application, including at least one of the following: a smart phone, 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, 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 a terminal device and a server. For the convenience of description, the method provided by the embodiment of the present invention will be described below by taking the terminal device as the execution subject as an example. Figure 1 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 area, and each target area is a polygonal area;

[0048] S20, for each of the target regions, determining a maximum diameter corresponding to the target region 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 region;

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

[0050] S40 , for each target region, according to the target coordinates of each vertex of the target region after scaling, correct the initial labeling result of the target region 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 labeling 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 labeling efficiency, reducing the workload of the labeling personnel, and reducing the labeling cost expenditure.

[0052] The solution of the present invention is further described below in conjunction with 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 area, and each target area is a polygonal area;

[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 a 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] Among them, one target area corresponds to one initial annotation result, and the initial annotation result represents the annotation information corresponding to the corresponding target area, for example, what organ it is. The initial annotation result can be annotated based on the annotation personnel.

[0056] S20, for each of the target regions, determining a maximum diameter corresponding to the target region 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 region;

[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 of the target areas, 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 of the target areas, the pixel coordinates of each vertex corresponding to the target area can be determined based on an image algorithm.

[0062] Furthermore, for each of the target regions, the pixel coordinates of each vertex corresponding to the target region may also 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, where 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 protruding outside the inscribed circle of the polygon, not concave inside the inscribed circle of the polygon. Therefore, the points in the target area that are not vertices of the polygon can be removed based on the convex hull algorithm.

[0065] In the present 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 same processing on each vertex corresponding to the target area: determining, from each line segment corresponding to the target area, a first vertex corresponding to the maximum angle among the angles 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, 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 first vertex corresponding to the maximum diameter as the pixel coordinates of each of the two target vertices corresponding to the maximum diameter.

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

[0071] S2031, taking any vertex corresponding to the target area as an initial vertex, and determining the cross product between a first vector corresponding to the initial vertex and second vectors corresponding to each of the other vertices according to 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 the 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;

[0072] S2032, according to all cross product results corresponding to the initial vertex, determine the first vertex 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.

[0073] Among them, the cross product result obtained by calculating the cross product between 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, the four vertices of the quadrilateral are A, B, C and D, vertex A is taken as the initial vertex, and it is assumed that the first vertex corresponding to the initial vertex A is C, then vertex A and vertex C can be determined to have a corresponding distance, recorded as distance 1. In the same way, vertex B is taken as the initial vertex, and the first vertex corresponding to the initial vertex B is D, then vertex B and vertex D can be determined to have a corresponding distance, recorded as distance 2. Vertex C is taken as the initial vertex, and the first vertex corresponding to the initial vertex C is A, then vertex C and vertex A can be determined to have a corresponding distance, recorded as distance 3, and distance 3 and distance 1 can be the same distance. Vertex D is taken as the initial vertex, and the first vertex corresponding to the initial vertex D is B, then vertex B and vertex D can be determined to have a corresponding distance, recorded as distance 4, and distance 2 and distance 4 can be the same distance. In this way, for the quadrilateral, 4 distances can be obtained. Afterwards, among the 4 distances, the maximum distance among the 4 distances can be determined as the maximum diameter corresponding to the quadrilateral, and the two vertices corresponding to the maximum diameter are taken as the 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 of 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 of the target areas, 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;

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

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

[0083] Optionally, in the above S30, for each of the target regions, based on the maximum diameter of the target region, the scaling size and the pixel coordinates of each vertex, determining the target coordinates of each vertex of the target region after the scaling process 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 change of the target area before and after scaling.

[0087] Optionally, a possible implementation of the above S301 is:

[0088] According to the maximum diameter and the scaling size of the target area, the 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, a possible implementation of the above S302 is:

[0093] S3021, determining each target vector corresponding to the target area after scaling 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, each target vector including 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 according to all target vectors corresponding to the target area.

[0095] The specific implementation of 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 corresponding to 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, a possible implementation manner of the above 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] Among them, during the scaling process, the pixel coordinates of the center point remain unchanged. For each target vector, under the premise of knowing the pixel coordinates of the center point corresponding to the target vector, the target coordinates of each vertex of the target area after the scaling process can be calculated, which can be specifically 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] Where B represents the set of 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, i.e. 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 region, according to the target coordinates of each vertex of the target region after scaling, correct the initial labeling result of the target region 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 manner:

[0108] 1. Preparation

[0109] Introduce Cornerstone core library (cornerstone-core), Cornerstone tool library (cornerstone-tools), Cornerstone WADO image loader (cornerstone-wado-image-loader), 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] Register 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 to pass in the URL (or image ID) of the DICOM file to load the DICOM image.

[0117] During the loading process, CornerstoneWADOImageLoader will use 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 corresponding to the target coordinates of each vertex of the target area after the scaling process) in the activated container to realize the rendering and display of the target annotation results of the medical image to be corrected after the scaling process.

[0121] After that, the plan 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, measure, 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 the present application, the brush tool (freehandTool) 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. Or connect the deep network training model to annotate the area to be annotated in the medical image to be corrected.

[0127] Through the scheme of the present invention, the freehandRoi tool in the cornerstoneTool can be used to outline the boundary of the region of interest in the medical image to form 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 also 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 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;

[0130] A maximum diameter determination module 220 is used to determine, for each target region, a maximum diameter corresponding to the target region and 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] The scaling processing module 230 is used to perform scaling processing on each target area according to the scaling size corresponding to the target area, and determine the 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;

[0132] The labeling result correction module 240 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 the scaling process, so as to obtain the 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 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, 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 determination module 220 takes any vertex corresponding to the target area as an initial vertex and determines, from each line segment 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 determination module 220 is specifically configured to:

[0139] Taking any vertex corresponding to the target area as an initial vertex, determining the cross product between a first vector corresponding to the initial vertex and second vectors corresponding to each of the other vertices according to the pixel coordinates of the initial vertex and the pixel coordinates of each of the other vertices, and obtaining 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 a center point corresponding to the target area, and each of the other vertices is all vertices except the initial vertex among all vertices corresponding to the target area;

[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 of the target areas, 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 the scaling size of the target area;

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

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

[0145] According to the maximum diameter and the scaling size of the target area, the 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 of the target areas, when the scaling processing module 230 determines the target coordinates of each vertex of the target area after scaling processing according to the scaling factor corresponding to the target area and the pixel coordinates of each vertex, it is specifically configured to:

[0149] Determine, 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, each target vector corresponding to the target area after scaling, each target vector including a vector between the center point after scaling and each vertex after scaling;

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

[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 in the corresponding medical image annotation result correction method shown in the previous text, which 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 embodiments 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, which are used to implement 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 by software or hardware, wherein the name of a module does not limit the module itself in some cases.

[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 a computer program; 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, such as through a bus 4002. Optionally, the electronic device 4000 may also include a transceiver 4004, which may be used for data interaction 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 transceiver 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 various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of the present invention. 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, etc.

[0161] The bus 4002 may include a path to transmit information between the above components. The bus 4002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The 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 only one type of bus.

[0162] The memory 4003 can 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 compressed optical disk, laser disk, optical disk, digital versatile disk, Blu-ray disk, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited to this.

[0163] The memory 4003 is used to store the application code (computer program) for executing the solution of the present invention, and the execution 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] The electronic device may also be a terminal device. Figure 3 The electronic device shown is only an example and should not bring any limitation to 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, on which a computer program is stored. 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 a computer program is also provided, the computer program product or the computer program comprising computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods provided in the implementation modes of the above-mentioned various embodiments.

[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 separate software package, partially on the user's computer and partially on a remote computer, or entirely on a 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 flow charts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the module, the program segment, or a part of the code contains one or more executable instructions for realizing 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 sequence different from that 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 flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0169] The computer-readable storage medium provided by the embodiment of the present invention may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, 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 may 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 only a preferred embodiment of the present invention and an explanation of the technical principles used. Those skilled in the art should understand that the disclosure scope involved in the present invention is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present invention (but not limited to) by each other.

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 area, and each target area is a polygonal area; 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; For each of the target areas, 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 of the target regions, 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 of the target areas, determining the maximum diameter corresponding to the target area and the pixel coordinates of the two target vertices corresponding to the maximum diameter includes: Determine the pixel coordinates of each vertex and the pixel coordinates of the center point corresponding to the target area; Determine the 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, 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, and determining the distance between the initial vertex and the first vertex; 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.

3. The method according to claim 2, characterized in that The method of taking any vertex corresponding to the target area as the 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, comprises: Taking any vertex corresponding to the target area as an initial vertex, determining the cross product between a first vector corresponding to the initial vertex and second vectors corresponding to each of the other vertices according to the pixel coordinates of the initial vertex and the pixel coordinates of each of the other vertices, and obtaining 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 a center point corresponding to the target area, and each of the other vertices is all vertices except the initial vertex among all vertices corresponding to the target area; 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.

4. The method according to any one of claims 1 to 3, characterized in that For each of the target regions, based on the maximum diameter of the target region, the scaling size, and the pixel coordinates of each vertex, determining the target coordinates of each vertex of the target region after scaling, includes: Determining a scaling factor corresponding to the target area according to the maximum diameter and the scaling size of the target area; According to the scaling factor corresponding to the target area and the pixel coordinates of each vertex, the target coordinates of each vertex of the target area after scaling are determined.

5. The method according to claim 4, characterized in that The step of determining the scaling factor corresponding to the target area according to the maximum diameter and the scaling size of the target area includes: According to the maximum diameter and the scaling size of the target area, the 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.

6. The method according to claim 4, characterized in that For each of the target regions, determining the target coordinates of each vertex of the target region after scaling according to the scaling factor corresponding to the target region and the pixel coordinates of each vertex includes: Determine, 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, each target vector corresponding to the target area after scaling, each target vector including a vector between the center point after scaling and each vertex after scaling; According to all target vectors corresponding to the target area, target coordinates of each vertex of the target area after scaling are determined.

7. The method according to any one of claims 1 to 3, characterized in that The method further comprises: For each of the target regions, the pixel coordinates of each vertex corresponding to the target region are determined according to a convex hull algorithm.

8. A medical image annotation result correction device, characterized in that: include: An acquisition module, used for acquiring a medical image to be corrected, wherein the medical image to be corrected includes an initial annotation result of at least one target area, and each target area is a polygonal area; A maximum diameter determination module, used for determining, for each target area, 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 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 the scaling process, so as to obtain the target labeling result.

9. 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 7 when executing the computer program.

10. 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 7 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

  • Method and device for acquiring region of interest of medical image, medium and equipment

    CN118898577A

  • System and method for adjusting pixel parameters by subpixel positioning

    US6219070B1