Medical image registration method, device, storage medium and electronic terminal
By creating an undirected graph and dividing it into subgraphs in medical image registration, and utilizing breadth-first traversal, matrix multiplication, and shortest path search methods, the efficiency and storage problems of multi-image registration are solved, achieving efficient image registration.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-02
- Publication Date
- 2026-03-24
AI Technical Summary
Existing technologies struggle to effectively address the registration relationships between multiple medical images, especially when registration relationships exist between known parts of the images. The challenge lies in efficiently acquiring the registration relationships between unknown images.
By creating an undirected graph G, medical images are used as vertices and triples are used as relations to divide the graph into multiple undirected subgraphs. Breadth-first traversal and matrix multiplication are used to calculate the shortest path and obtain the registration relationship between the images to be registered.
It effectively reduces storage costs, improves search efficiency, reduces information duplication and redundancy, and improves the calculation speed and accuracy of image registration.
Smart Images

Figure CN115861389B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of medical image processing technology, and more specifically, to a method, apparatus, storage medium, and electronic terminal for medical image registration. Background Technology
[0002] In hospitals, medical imaging technology is often used to obtain medical images of specific areas of the patient during treatment. Medical imaging technology refers to the techniques and processes used to obtain images of internal tissues of the human body or a part of the body in a non-invasive manner for medical treatment or research. Commonly used medical imaging technologies include: angiography, cardiovascular angiography, computed tomography (CT), mammography, positron emission tomography (PET), magnetic resonance imaging (MRI), and medical ultrasound. The images obtained from these medical imaging technologies are called medical images.
[0003] In medical image analysis, it is often necessary to analyze several medical images of the same patient and the same body part together to obtain comprehensive information about the patient and improve the level of medical diagnosis and treatment. Quantitative analysis of several different medical images first requires solving the problem of strict alignment between them; this is medical image registration. Medical image registration refers to seeking a spatial transformation (or a series of transformations) on one medical image to achieve spatial consistency with corresponding points on another medical image. This consistency means that the same anatomical point on the human body has the same spatial location in both matching medical images. The result of registration should match all anatomical points, or at least all points of diagnostic significance and points of surgical interest, on both medical images.
[0004] In practice, the following problem is often encountered: Given multiple medical images, some of which are known to have a registration relationship, how to obtain the registration relationship between two medical images A and B. Summary of the Invention
[0005] The purpose of this invention is to address the aforementioned problems by providing a method, apparatus, storage medium, and electronic terminal for medical image registration. The method for medical image registration specifically includes the following steps:
[0006] We receive M medical images and N triples. Each triple contains a starting medical image P1, an ending medical image P2, and a pairing matrix Matrix(P1,P2). M and N are natural numbers, where M ≥ 2. The relationships are: P2 = P1 * Matrix(P1,P2), P1 = P2 * Matrix(P2,P1), and Matrix(P1,P2) = Matrix(P2,P1). -1In each triplet, P1 and P2 are two different medical images; and in different triplets, the two starting medical images are different, or the two ending medical images are different.
[0007] Create an undirected graph G with M medical images as vertices and N triples as relations;
[0008] Divide an undirected graph G into multiple undirected subgraphs. Each undirected subgraph contains at least one vertex, and any two vertices in each undirected subgraph are connected. Furthermore, no two different undirected subgraphs contain the same vertices.
[0009] Receive medical image P3 and medical image P4 to be registered; if it is determined that P3 and P4 are not in the same undirected subgraph, then P3 and P4 are not registered; if it is determined that P3 and P4 are in the same undirected subgraph, then P3 and P4 are registered.
[0010] Including any of the above technical solutions, specifically including:
[0011] When it is determined that P3 and P4 are in the same undirected subgraph, find the shortest path between P3 and P4, and P4 = P3 * Matrix(medical image P3, first medical image) Matrix(i-th medical image, i+1-th medical image) * Matrix(Num-th medical image, medical image P4); where the shortest path between P3 and P4 is: medical image P3 --> 1st medical image --> 2nd medical image --> ... --> Num-th medical image --> medical image P4, where Num is a natural number, 1 ≤ Num ≤ M-2.
[0012] The "dividing an undirected graph G into multiple undirected subgraphs" specifically includes: continuously performing the following operations until the number of untraversed vertices in the undirected graph G is zero; the operations include: selecting any untraversed vertex g in the undirected graph G, using breadth-first traversal to obtain a set of connected vertices starting from vertex g, and constructing vertex g and the vertex set into a connected subgraph.
[0013] The "obtaining the shortest path between P3 and P4" specifically includes: obtaining the connected subgraph where P3 is located, and performing a breadth-first search starting from P3 to obtain the shortest path between P3 and P4.
[0014] To achieve one of the above-mentioned objectives, one embodiment of the present invention provides a registration device for medical images, comprising the following modules:
[0015] The receiving module receives M medical images and N triples. Each triple contains a starting medical image P1, an ending medical image P2, and a pairing matrix Matrix(P1,P2). M and N are natural numbers, where M ≥ 2. The relationships are: P2 = P1 * Matrix(P1,P2), P1 = P2 * Matrix(P2,P1), and Matrix(P1,P2) = Matrix(P2,P1). -1 In each triplet, P1 and P2 are two different medical images; and in different triplets, the two starting medical images are different, or the two ending medical images are different.
[0016] The processing module is used to create an undirected graph G with M medical images as vertices and N triples as relations; divide the undirected graph G into multiple undirected subgraphs, each undirected subgraph contains at least one vertex, and any two vertices in each undirected subgraph are connected, and any two different undirected subgraphs do not contain the same vertex.
[0017] The execution module is used to receive medical images P3 and P4 to be registered; if it is determined that P3 and P4 are not in the same undirected subgraph, then P3 and P4 are not registered; if it is determined that P3 and P4 are in the same undirected subgraph, then P3 and P4 are registered.
[0018] Including any of the above technical solutions, it also includes:
[0019] The calculation module is used to obtain the shortest path between P3 and P4 when it is determined that P3 and P4 are in the same undirected subgraph, and P4 = P3 * Matrix(medical image P3, first medical image) Matrix(i-th medical image, i+1-th medical image) * Matrix(Num-th medical image, medical image P4); where the shortest path between P3 and P4 is: medical image P3 --> 1st medical image --> 2nd medical image --> ... --> Num-th medical image --> medical image P4, where Num is a natural number, 1 ≤ Num ≤ M-2.
[0020] Including any of the above technical solutions, it also includes:
[0021] The processing module is further configured to: continuously perform the following operations until the number of untraversed vertices in the undirected graph G is zero; the operations include: selecting any untraversed vertex g in the undirected graph G, using breadth-first traversal to obtain a set of connected vertices starting from vertex g, and constructing vertex g and the vertex set into a connected subgraph.
[0022] Including any of the above technical solutions, it also includes:
[0023] The calculation module is also used to: obtain the connected subgraph where P3 is located, and perform a breadth-first search starting from P3 to obtain the shortest path between P3 and P4.
[0024] To achieve one of the above-mentioned objectives, one embodiment of the present invention provides a storage medium storing program instructions, specifically including, when the program instructions are executed, implementing the multi-graph registration shortest path search method described in any of the above claims.
[0025] To achieve one of the above-mentioned objectives, one embodiment of the present invention provides an electronic terminal, including a processor and a memory, wherein the memory stores program instructions, specifically including the processor running program instructions to implement any of the above-mentioned multi-graph registration shortest path search methods.
[0026] The advantages of the registration method, apparatus, storage medium, and electronic terminal for medical images provided by this invention are as follows:
[0027] 1. Effectively reduce storage costs: By using undirected graphs to store registration information, the drawbacks of multi-way trees in terms of information duplication and redundancy in registration path lookup are eliminated.
[0028] 2. Improve search efficiency: Before searching for the required node, the undirected graph is divided into connected subgraphs, and the nodes are stored in a set. Therefore, for each search, only the shortest path needs to be found in the subgraph containing the required node, reducing the amount of computation. Attached Figure Description
[0029] Figure 1 This is a schematic diagram of the medical image registration method described in this invention. Detailed Implementation
[0030] The present invention will now be described in detail with reference to the specific embodiments shown in the accompanying drawings. However, these embodiments do not limit the present invention, and any structural, methodological, or functional modifications made by those skilled in the art based on these embodiments are included within the scope of protection of the present invention.
[0031] If the present invention involves orientation (e.g., up, down, left, right, front, back, outside, inside, etc.) in its description, then the orientations involved need to be defined.
[0032] Embodiment 1 of the present invention provides a registration method for medical images, comprising the following steps:
[0033] Step 201: Receive M medical images and N triples. Each triple contains: a starting medical image P1, an ending medical image P2, and a pairing matrix Matrix(P1,P2). M and N are natural numbers, M≥2. P2=P1*Matrix(P1,P2), P1=P2*Matrix(P2,P1), Matrix(P1,P2)=Matrix(P2,P1) -1 In each triplet, P1 and P2 are two different medical images; and in different triplets, the two starting medical images are different, or the two ending medical images are different.
[0034] Here, the triplet is used merely for descriptive convenience. In the triplet (starting medical image P1, ending medical image P2, and pairing matrix Matrix(P1,P2)), there is a one-to-one correspondence between the starting medical image P1 and the ending medical image P2, where P2 = P1 * Matrix(P1,P2). When implementing this step in a program, it is only necessary to express this one-to-one correspondence, where Matrix(P1,P2) * Matrix(P2,P1) = E. In this paper, "*" represents matrix multiplication.
[0035] Step 202: Create an undirected graph G with M medical images as vertices and N triples as relations;
[0036] For each triple (starting medical image P1, ending medical image P2, and pairing matrix Matrix(P1,P2)), the following process is performed: a path is established between P1 and P2, with each path having a weight of 1. In essence, integrating and constructing the known information yields the undirected graph G. In practical programming, this undirected graph can be stored using an adjacency matrix or adjacency list.
[0037] Step 203: Divide the undirected graph G into multiple undirected subgraphs. Each undirected subgraph contains at least one vertex, and any two vertices in each undirected subgraph are connected. Furthermore, no two different undirected subgraphs contain the same vertex.
[0038] Here, if a vertex has vertices connected to it, then that vertex and the vertices connected to it constitute an undirected subgraph starting from that vertex. It can be understood that any two undirected subgraphs with different starting points do not contain the same vertices.
[0039] Step 204: Receive the medical image P3 and medical image P4 to be registered; if it is determined that P3 and P4 are not in the same undirected subgraph, then P3 and P4 are not registered; if it is determined that P3 and P4 are in the same undirected subgraph, then P3 and P4 are registered.
[0040] For the registration relationship between two medical images A and B, the method adopted in this embodiment of the invention is to obtain a path between medical images A and B, namely A→A1→A2→…→A N →B, then we need to obtain the registration matrix between A and A1, the registration matrix between A1 and A2, ..., A N-1 and A N The registration matrix between them, A N We obtain the registration matrix between A and B, and then, based on these registration matrices, we can obtain the registration matrix (i.e., the registration relationship) between A and B. Similarly, when P3 and P4 are in the same undirected subgraph, we can obtain the registration relationship between P3 and P4 using the same method, thus P3 and P4 are registered. It is understandable that when P3 and P4 are not in the same undirected subgraph, then P3 and P4 are not registered.
[0041] In this embodiment, when it is determined that P3 and P4 are in the same undirected subgraph, the shortest path between P3 and P4 is obtained, and P4 = P3 * Matrix(medical image P3, first medical image) Matrix(i-th medical image, i+1-th medical image) * Matrix(Num-th medical image, medical image P4); where the shortest path between P3 and P4 is: medical image P3 --> 1st medical image --> 2nd medical image --> ... --> Num-th medical image --> medical image P4, where Num is a natural number, 1 ≤ Num ≤ M-2.
[0042] Here, the shortest path problem takes the following forms: shortest path problem with a given starting point; shortest path problem with a given ending point; shortest path problem with a given starting point and ending point; and global shortest path problem, which finds all the shortest paths in the graph.
[0043] Understandably, matrix multiplication consumes time and storage space. Therefore, finding the shortest path between the starting and ending medical images can significantly reduce processing time and improve efficiency. Thus, given the starting medical image P1, the ending medical image P2, and their corresponding paths, the shortest path can be calculated using a shortest path algorithm, and the images can be registered.
[0044] In this embodiment, the step of "dividing an undirected graph G into multiple undirected subgraphs" includes: continuously performing the following operations until the number of untraversed vertices in the undirected graph G is zero; the operation includes: selecting any untraversed vertex g in the undirected graph G, using breadth-first traversal to obtain a set of connected vertices starting from vertex g, and constructing vertex g and the vertex set into a connected subgraph.
[0045] In this embodiment, the step of "obtaining the shortest path between P3 and P4" specifically includes: obtaining the connected subgraph where P3 is located, and performing a breadth-first search starting from P3 to obtain the shortest path between P3 and P4.
[0046] Breadth-first traversal refers to starting from an unvisited node in the graph, first traversing the adjacent nodes of this node, and then traversing the adjacent nodes of each adjacent node in turn. In some specific cases, breadth-first traversal can eliminate the need for a queue, saving storage space. It stops when all nodes have been traversed, thus improving registration efficiency.
[0047] Embodiment 2 of the present invention provides a registration device for medical images, comprising the following modules:
[0048] The receiving module receives M medical images and N triples. Each triple contains a starting medical image P1, an ending medical image P2, and a pairing matrix Matrix(P1,P2). M and N are natural numbers, where M ≥ 2. The relationships are: P2 = P1 * Matrix(P1,P2), P1 = P2 * Matrix(P2,P1), and Matrix(P1,P2) = Matrix(P2,P1). -1 In each triplet, P1 and P2 are two different medical images; and in different triplets, the two starting medical images are different, or the two ending medical images are different.
[0049] The processing module is used to create an undirected graph G with M medical images as vertices and N triples as relations; divide the undirected graph G into multiple undirected subgraphs, each undirected subgraph contains at least one vertex, and any two vertices in each undirected subgraph are connected, and any two different undirected subgraphs do not contain the same vertex.
[0050] The execution module is used to receive medical images P3 and P4 to be registered; if it is determined that P3 and P4 are not in the same undirected subgraph, then P3 and P4 are not registered; if it is determined that P3 and P4 are in the same undirected subgraph, then P3 and P4 are registered.
[0051] This embodiment also includes the following module: a calculation module, used to obtain the shortest path between P3 and P4 when it is determined that P3 and P4 are in the same undirected subgraph, and P4 = P3 * Matrix(medical image P3, first medical image) Matrix(i-th medical image, i+1-th medical image) * Matrix(Num-th medical image, medical image P4); where the shortest path between P3 and P4 is: medical image P3 --> 1st medical image --> 2nd medical image --> ... --> Num-th medical image --> medical image P4, where Num is a natural number, 1 ≤ Num ≤ M-2.
[0052] In this embodiment, the processing module is further configured to: continuously perform the following operations until the number of untraversed vertices in the undirected graph G is zero; the operations include: selecting any untraversed vertex g in the undirected graph G, using breadth-first traversal to obtain a set of connected vertices starting from vertex g, and constructing vertex g and the vertex set into a connected subgraph.
[0053] In this embodiment, the calculation module is also used to: obtain the connected subgraph where P3 is located, and perform a breadth-first search starting from P3 to obtain the shortest path between P3 and P4.
[0054] Embodiment 2 of the present invention provides a storage medium storing program instructions, which, when executed, implement the multi-graph registration shortest path search method as described in any of the preceding embodiments.
[0055] Embodiment 3 of the present invention provides an electronic terminal, including a processor and a memory, wherein the memory stores program instructions, specifically including that the processor executes the program instructions to implement the multi-graph registration shortest path search method as described in any of the above embodiments.
[0056] It should be noted that although the steps are described in a specific order above, it does not mean that the steps must be executed in the above specific order. In fact, some of these steps can be executed concurrently, as long as the required function can be achieved.
[0057] This invention can be a system, method, and / or computer program product. A computer program product may include a readable storage medium having computer-readable program instructions loaded thereon for causing a processor to implement various aspects of the invention.
[0058] A readable storage medium can be a tangible device that holds and stores instructions for use by an instruction execution device. Readable storage media can include, for example, but not limited to, electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing instructions thereon, and any suitable combination thereof.
[0059] The various embodiments of the present invention have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical application, or technical improvements to the embodiments in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.
Claims
1. A registration method for medical images, characterized in that, Includes the following steps: We receive M medical images and N triples. Each triple contains a starting medical image P1, an ending medical image P2, and a pairing matrix Matrix(P1, P2). M and N are natural numbers, where M ≥ 2. P2 = P1 * Matrix(P1, P2), P1 = P2 * Matrix(P2, P1). In each triplet, P1 and P2 are two different medical images; and in different triplets, the two starting medical images are different, or the two ending medical images are different. An undirected graph G is created using M medical images as vertices and N triples as relations. Specifically, for each triple, the following processing is performed: a path is established between P1 and P2, and the weight of the path is 1. Dividing an undirected graph G into multiple undirected subgraphs specifically includes: continuously performing the following operations until the number of untraversed vertices in the undirected graph G is zero; the operations include: selecting any untraversed vertex g in the undirected graph G, using breadth-first traversal to obtain a set of connected vertices starting from vertex g, and constructing a connected subgraph from vertex g and the vertex set; wherein each undirected subgraph contains at least one vertex, and any two vertices in each undirected subgraph are connected, and any two different undirected subgraphs do not contain the same vertices; Receive medical image P3 and medical image P4 to be registered; if it is determined that P3 and P4 are not in the same undirected subgraph, then P3 and P4 are not registered; if it is determined that P3 and P4 are in the same undirected subgraph, then P3 and P4 are registered.
2. The registration method according to claim 1, characterized in that, It also includes the following steps: When it is determined that P3 and P4 are in the same undirected subgraph, the shortest path between P3 and P4 is obtained. Specifically, this involves: obtaining the connected subgraph containing P3; starting from P3, performing a breadth-first search to find the shortest path between P3 and P4; and P4 = P3 * Matrix(medical image P3, first medical image) * Matrix(i-th medical image, i+1-th medical image) * Matrix(Num-th medical image, medical image P4); where the shortest path between P3 and P4 is: medical image P3 --> 1st medical image --> 2nd medical image --> ... --> Num-th medical image --> medical image P4, where Num is a natural number, 1 ≤ Num ≤ M-2.
3. A registration device for medical images, characterized in that, Includes the following modules: The receiving module receives M medical images and N triples. Each triple contains a starting medical image P1, an ending medical image P2, and a pairing matrix Matrix(P1,P2). M and N are natural numbers, where M ≥ 2, and P2 = P1 * Matrix(P1,P2), P1 = P2 * Matrix(P2,P1). In each triplet, P1 and P2 are two different medical images; and in different triplets, the two starting medical images are different, or the two ending medical images are different. The processing module is used to create an undirected graph G using M medical images as vertices and N triples as relations. Specifically, it includes: performing the following processing on each triple: establishing a path between P1 and P2, with a weight of 1; and dividing the undirected graph G into multiple undirected subgraphs, specifically including: continuously performing the following operations until the number of untraversed vertices in the undirected graph G is zero. The operations include: selecting any untraversed vertex g in the undirected graph G, using breadth-first traversal to obtain a set of connected vertices starting from vertex g, and constructing a connected subgraph from vertex g and the vertex set. Each undirected subgraph contains at least one vertex, and any two vertices in each undirected subgraph are connected, and no two different undirected subgraphs contain the same vertices. The execution module is used to receive medical images P3 and P4 to be registered; if it is determined that P3 and P4 are not in the same undirected subgraph, then P3 and P4 are not registered; if it is determined that P3 and P4 are in the same undirected subgraph, then P3 and P4 are registered.
4. The registration device according to claim 3, characterized in that, It also includes the following modules: The calculation module is used to obtain the shortest path between P3 and P4 when it is determined that P3 and P4 are in the same undirected subgraph. Specifically, it includes: obtaining the connected subgraph where P3 is located, and performing a breadth-first search starting from P3 to obtain the shortest path between P3 and P4; and P4 = P3 * Matrix(medical image P3, first medical image) * Matrix(i-th medical image, i+1-th medical image) * Matrix(Num-th medical image, medical image P4); where the shortest path between P3 and P4 is: medical image P3 --> 1st medical image --> 2nd medical image --> ... --> Num-th medical image --> medical image P4, where Num is a natural number, 1 ≤ Num ≤ M-2.
5. A storage medium storing program instructions, characterized in that, When the program instructions are executed, they implement the registration method as described in any one of claims 1 to 2.
6. An electronic terminal, comprising a processor and a memory, wherein the memory stores program instructions, characterized in that, The processor executes program instructions to implement the registration method as described in any one of claims 1 to 2.
Citation Information
Patent Citations
Multimodal medical image registration method
CN103426174A
Method and computer program product for processing an examination record comprising a plurality of images of at least parts of at least one retina of a patient
WO2017046377A1