Tubular parameter calculation method and apparatus
By combining skeleton algorithms and graph data structure algorithms, the length and longest diameter of tubular structures are automatically calculated, solving the problem of inaccuracy in existing skeleton algorithms and achieving efficient and accurate parameter calculation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING SEMATECH MEDICAL TECH CO LTD
- Filing Date
- 2023-03-27
- Publication Date
- 2026-07-24
AI Technical Summary
In existing technologies, skeleton algorithms are inaccurate when calculating the length and longest diameter of non-smooth tubular structures such as bile ducts and ureters, and rely on manual measurement, which is inefficient.
By combining skeletonization and graph data structure algorithms, the original image of the tubular object is preprocessed to generate a minimum spanning tree, calculate the shortest path, select the longest path as the target path, determine the target skeleton, and calculate its relevant parameters, such as length and longest diameter.
It enables automatic and accurate calculation of the length and longest diameter of tubular objects, avoiding the inefficiency of manual measurement and improving calculation accuracy.
Smart Images

Figure CN116342680B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, specifically to a method and apparatus for calculating parameters of tubular objects. Background Technology
[0002] In imaging examinations such as CT and MRI, calculating the length and longest diameter of tubular structures like bile ducts and ureters is a common requirement. Currently, many open-source algorithms for image processing include those for obtaining image skeletons. These algorithms generally work by eroding the image from the edges inwards until only a skeleton remains at the center. Since the skeleton is the centerline, skeleton algorithms can be very effective in calculating tubular structures, especially for smooth, ideal tubular structures. However, in reality, most tubular structures, such as bile ducts, are not smooth. Due to the characteristics of skeleton algorithms, the obtained length or longest diameter results are inaccurate. Therefore, skeleton algorithms are not suitable for tubular structures like bile ducts and ureters. Current technologies primarily rely on manual measurement, which is inefficient and of low quality. Summary of the Invention
[0003] In view of this, embodiments of the present invention aim to provide a method and apparatus for calculating tubular parameters, which solves the above problems by combining skeleton algorithms and graph data structure algorithms.
[0004] The first aspect of this invention provides a method for calculating parameters of a tubular object, comprising:
[0005] The original image of the tubular object is preprocessed to obtain a preprocessed image of the tubular object;
[0006] The tubular skeleton is obtained based on all voxel points of the preprocessed tubular image;
[0007] The tubular skeleton is subjected to a branch removal process, which includes: generating a minimum spanning tree from all skeleton points in the tubular skeleton using a graph algorithm; calculating the shortest path between any two nodes in the minimum spanning tree to obtain a set of shortest paths; and selecting the longest shortest path in the set of shortest paths as the target path.
[0008] Based on the target path, the target skeleton is determined;
[0009] Calculate the relevant parameters of the target skeleton as tubular parameters;
[0010] The relevant parameters of the target skeleton are its length and longest diameter.
[0011] In some embodiments, determining the target skeleton based on the target path includes:
[0012] The target path is smoothed.
[0013] Extend both ends of the processed target path to the edge of the original image of the tubular object to obtain the target skeleton.
[0014] In some embodiments, extending both ends of the processed target path to the edge of the original image of the tubular object includes:
[0015] Extract the two nodes closest to the starting end of the processed target path, extend the straight line containing these two nodes outward, and make a first intersection point with the original image of the tubular object. Incorporate the first intersection point into the processed target path according to the physical spatial order.
[0016] Extract the two nodes closest to the endpoint of the processed target path, extend the straight line containing these two nodes outward, and make a second intersection point with the original image of the tubular object. Incorporate the second intersection point into the processed target path according to the physical spatial order.
[0017] In some embodiments, preprocessing the original image of the tubular object to obtain a preprocessed image of the tubular object includes:
[0018] Extract the largest connected component from the original image of the tubular object, and then perform equidistant resampling on the label image of the tubular object with the largest connected component in each direction to obtain the preprocessed image of the tubular object.
[0019] In some embodiments, calculating relevant parameters of the target skeleton as tubular parameters includes:
[0020] Based on the original image of the tubular object and the target skeleton, the longest diameter of all vertical surfaces of the tubular object is determined to obtain the set of longest diameters;
[0021] The longest diameter with the largest value in the set of longest diameters is determined as the longest diameter of the tubular structure.
[0022] In some embodiments, based on the original image of the tubular structure and the target skeleton, the longest diameter of all vertical planes of the tubular structure is determined to obtain the set of longest diameters, including:
[0023] The vertical plane of all the original images of the tubular objects is obtained by connecting every two adjacent skeleton points in the target skeleton.
[0024] Obtain the longest diameter for each vertical plane to get the set of longest diameters.
[0025] Obtain the longest diameter for each vertical plane to get the set of longest diameters.
[0026] In some embodiments, generating a minimum spanning tree from all skeleton points in the tubular skeleton using a graph algorithm includes:
[0027] Obtain all skeleton points of the tubular skeleton, and generate the adjacency matrix of the tubular skeleton based on the spatial distance between any two skeleton points;
[0028] Generate an undirected weighted graph based on the adjacency matrix of the tubular skeleton;
[0029] Obtain the minimum spanning tree of the undirected weighted graph.
[0030] In some embodiments, obtaining all skeleton points of the tubular skeleton and generating an adjacency matrix of the tubular skeleton based on the spatial distance between any two skeleton points includes:
[0031] Obtain the N skeleton points contained in the tubular skeleton, each skeleton point including its spatial coordinates, generate an N-order square matrix composed of the distances between each skeleton point, and use this square matrix as the adjacency matrix.
[0032] In some embodiments, generating an undirected weighted graph based on the adjacency matrix of the tubular skeleton includes:
[0033] Connect each skeleton point in the tubular skeleton to all other skeleton points to obtain a fully connected graph.
[0034] Select any two skeleton points in the fully connected graph, and weight the connection strength of the two skeleton points according to the distance in the adjacency matrix to obtain an undirected weighted graph.
[0035] A second aspect of the present invention provides a tubular object parameter calculation device, comprising:
[0036] The preprocessing module is used to preprocess the original image of the tubular object to obtain a preprocessed image of the tubular object.
[0037] The acquisition module is used to acquire the tubular skeleton based on all voxel points of the preprocessed tubular image;
[0038] The processing module is used to perform branch removal processing on the tubular skeleton; wherein, the branch removal processing includes: generating a minimum spanning tree from all skeleton points in the tubular skeleton using a graph algorithm; calculating the shortest path between any two nodes in the minimum spanning tree to obtain a set of shortest paths; and selecting the longest shortest path in the set of shortest paths as the target path;
[0039] The determination module is used to determine the target skeleton based on the target path;
[0040] The calculation module is used to calculate the relevant parameters of the target skeleton as tubular parameters;
[0041] The relevant parameters of the target skeleton are its length and longest diameter.
[0042] A third aspect of the present invention provides an electronic device, comprising:
[0043] A processor, and a memory for storing a processor-executable program;
[0044] The processor is configured to implement the above method by running a program in the memory.
[0045] A fourth aspect of the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, causes the processor to perform the above-described method.
[0046] The tubular object parameter calculation method provided in this application first preprocesses the original image of the tubular object to obtain a preprocessed tubular object image; then, it obtains the tubular object skeleton based on all voxel points of the preprocessed tubular object image; finally, it performs a branch removal process on the tubular object skeleton, wherein the branch removal process includes: generating a minimum spanning tree from all skeleton points in the tubular object skeleton using a graph algorithm; calculating the shortest path between any two nodes in the minimum spanning tree to obtain a set of shortest paths; selecting the longest shortest path in the set of shortest paths as the target path; determining the target skeleton based on the target path; and calculating the relevant parameters of the target skeleton as tubular object parameters; the relevant parameters of the target skeleton are the length and longest diameter of the target skeleton. This method can automatically and accurately calculate the length and longest diameter of the tubular object, avoiding the problems of manual measurement, which is time-consuming, labor-intensive, and inefficient. Attached Figure Description
[0047] The above and other objects, features, and advantages of the present invention will become more apparent from the more detailed description of the embodiments of the invention in conjunction with the accompanying drawings. The drawings are provided to further illustrate the embodiments of the invention and form part of the specification. They are used together with the embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings, the same reference numerals generally represent the same parts or steps.
[0048] Figure 1 This is a flowchart illustrating a method for calculating tubular parameters according to an embodiment of the present invention.
[0049] Figure 2 This is a grayscale schematic diagram of the tubular skeleton in another embodiment of the present invention.
[0050] Figure 3 This is a grayscale schematic diagram of the target skeleton before smoothing processing in another embodiment of the present invention.
[0051] Figure 4 This is a partial flowchart illustrating a method for calculating tubular parameters according to an embodiment of the present invention.
[0052] Figure 5 This is a grayscale schematic diagram of the target skeleton after smoothing in another embodiment of the present invention.
[0053] Figure 6 This is a grayscale schematic diagram of the target skeleton after both ends are extended in another embodiment of the present invention.
[0054] Figure 7 This is a partial flowchart illustrating a method for calculating tubular parameters according to an embodiment of the present invention.
[0055] Figure 8 This is a grayscale schematic diagram of the vertical plane in another embodiment of the present invention.
[0056] Figure 9 This is a partial flowchart illustrating a method for calculating tubular parameters according to an embodiment of the present invention.
[0057] Figure 10 This is an embodiment of the present invention that provides a fully connected graph.
[0058] Figure 11 This is a schematic diagram of a minimum spanning tree provided in one embodiment of the present invention.
[0059] Figure 12 This is a schematic diagram of the structure of a tubular parameter calculation device provided in one embodiment of the present invention.
[0060] Figure 13 This is a schematic diagram of the structure of an electronic device provided in one embodiment of the present invention. Detailed Implementation
[0061] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0062] Application Overview
[0063] In imaging examinations such as CT and MRI, calculating the length and longest diameter of tubular structures such as bile ducts and ureters is a common requirement. Currently, this is mainly done manually, which is inefficient.
[0064] To address the aforementioned problems, this application provides a method for calculating tubular object parameters. The method includes: preprocessing the original image of the tubular object to obtain a preprocessed tubular object image; obtaining the tubular object skeleton based on all voxel points of the preprocessed tubular object image; performing bifurcation removal processing on the tubular object skeleton, which includes: generating a minimum spanning tree from all skeleton points in the tubular object skeleton using a graph algorithm; calculating the shortest path between any two nodes in the minimum spanning tree to obtain a set of shortest paths; selecting the longest shortest path in the set as the target path; determining the target skeleton based on the target path; and calculating the relevant parameters of the target skeleton as tubular object parameters. The relevant parameters of the target skeleton are the length and longest diameter of the target skeleton. This method automatically calculates the length and longest diameter of the tubular object, avoiding the problems of manual measurement, which is time-consuming, labor-intensive, and inefficient.
[0065] After introducing the basic principles of the present invention, various non-limiting embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0066] Exemplary methods
[0067] Figure 1 This is a flowchart illustrating a method for calculating tubular parameters according to an embodiment of the present invention. Figure 1 As shown, the method includes the following:
[0068] Step S110: Preprocess the original image of the tubular object to obtain a preprocessed image of the tubular object;
[0069] Specifically, the tubular structure can be the bile duct or ureter, etc. The original image can be a CT or MRI image.
[0070] In some embodiments, the largest connected component of the original image of the tubular object is extracted, and the label image of the tubular object with the largest connected component is resampled at equal intervals in each direction to obtain a preprocessed image of the tubular object.
[0071] In practical applications, since there may be noise and some free-floating images around the tubular image, in order to remove these interferences, only the part to which the largest connected component belongs is processed.
[0072] Perform equidistant resampling on the image in all directions. In most cases, the sampling intervals of the labels in the X, Y, and Z directions are different, which will lead to deviations in the obtained skeleton. In order to maintain the consistency in direction and obtain more accurate skeleton points, perform equidistant resampling on the image in all directions.
[0073] Step S120: Obtain the tubular skeleton based on all voxel points of the preprocessed tubular image;
[0074] In practical applications, refer to Figure 2 The uneven surface of the tubular label can cause the obtained skeleton to split, which in turn affects subsequent calculations.
[0075] Step S130: Perform a branch removal process on the tubular skeleton, wherein the branch removal process includes: generating a minimum spanning tree from all skeleton points in the tubular skeleton using a graph algorithm; calculating the shortest path between any two nodes in the minimum spanning tree to obtain a set of shortest paths; and selecting the longest shortest path in the set of shortest paths as the target path.
[0076] Specifically, the tubular skeleton is subjected to a branch removal process, and the resulting skeleton can be referred to... Figure 3 .
[0077] Step S140: Determine the target skeleton based on the target path;
[0078] Step S150: Calculate the relevant parameters of the target skeleton as tubular parameters;
[0079] The relevant parameters of the target skeleton are its length and longest diameter.
[0080] This setup allows for the automatic calculation of the length and longest diameter of tubular structures, avoiding the time-consuming, labor-intensive, and inefficient problem of manual measurement.
[0081] In practical applications, step S140 involves determining the target skeleton based on the target path, referring to... Figure 4 ,include:
[0082] S401, Smooth the target path;
[0083] It should be noted that, furthermore, even after removing the branches, the skeleton will still be uneven, which can lead to errors in subsequent calculations. Therefore, the target path can be smoothed to obtain the target skeleton. Specifically, Figure 5 A smoothed skeleton. (See reference) Figure 5 Curve fitting can be used to make the skeleton look smoother overall.
[0084] S402, extend both ends of the processed target path to the edge of the original image of the tubular object to obtain the target skeleton.
[0085] Specifically, at the starting end of the processed target path, the two nodes closest to the starting end are extracted. A first extension line is drawn outward from the straight line containing these two nodes. The first extension line intersects with the original image of the tubular object at a first intersection point. The first intersection point is incorporated into the processed target path according to physical spatial order. At the ending end of the processed target path, the two nodes closest to the ending end are extracted. A second extension line is drawn outward from the straight line containing these two nodes. The second extension line intersects with the original image of the tubular object at a second intersection point. The second intersection point is incorporated into the processed target path according to physical spatial order.
[0086] It's important to note that in practical applications, the intersection points after extension at both ends are ordered. For example, starting from the starting point, they are numbered 1, and the endpoint needs to be the largest. This order prevents confusion when calculating the longest diameter later. It also helps to better define the two ends of the skeleton. The extended skeleton can be referenced... Figure 6 .
[0087] Specifically, refer to Figure 7 Step S150, calculating the relevant parameters of the target skeleton as tubular parameters, including:
[0088] S701, Based on the original image of the tubular object and the target skeleton, determine the longest diameter of all vertical surfaces of the tubular object to obtain the set of longest diameters;
[0089] Specifically, by connecting every two adjacent skeleton points in the target skeleton, the vertical planes of all the original images of the tubular objects are obtained; the longest diameter of each vertical plane is obtained, resulting in a set of longest diameters.
[0090] It should be noted that each vertical plane of the tubular object is generally not a regular image. The longest diameter of the vertical plane refers to the longest line segment among all straight lines passing through the target point that are intercepted by the vertical plane. The target point is the intersection of the line connecting any two adjacent skeleton points and the corresponding vertical plane.
[0091] It should be noted that, referring to Figure 8 In practical applications, the orientation of two adjacent skeleton points can be approximated as the orientation of the tubular object at that point. Based on this, the vertical plane of all the original images of the tubular object can be obtained according to the vertical line connecting each pair of adjacent skeleton points in the target skeleton. Then, the longest diameter of each vertical plane is obtained, resulting in a set of longest diameters that includes multiple longest diameters.
[0092] It should be noted that the above steps can also be as follows: for each vertical plane obtained, the longest diameter of that vertical plane is obtained simultaneously, and other diameters are discarded. Then, the next vertical plane is obtained, and the longest diameter of the next vertical plane is obtained simultaneously, forming a set of the longest diameters.
[0093] S702, determine the longest diameter with the largest value in the set of longest diameters as the longest diameter of the tubular structure.
[0094] This setup allows us to determine the longest diameter of the tubular structure. In practical applications, this can be used to determine the longest diameter of the bile duct and the ureter.
[0095] Furthermore, refer to Figure 9 In step S130, during the branch removal process of the tubular skeleton, a minimum spanning tree is generated from all skeleton points in the tubular skeleton using a graph algorithm, including:
[0096] S901, obtain all skeleton points of the tubular skeleton, and generate the adjacency matrix of the tubular skeleton based on the spatial distance between any two skeleton points;
[0097] In this context, all skeleton points of the tubular skeleton are the voxel points mentioned above. Specifically, the N skeleton points contained in the tubular skeleton are obtained, each skeleton point includes its spatial coordinates, and an N-order square matrix consisting of the distances between each skeleton point is generated. This square matrix is then used as the adjacency matrix.
[0098] Specifically, assuming a skeleton has N skeleton points, first determine the spatial coordinates of each skeleton point: (x0, y0, z0), (x1, y1, z1), ..., (x N-1 ,y N-1 ,z N-1 After that, an N-order square matrix consisting of the distances between points can be generated:
[0099]
[0100] Where, d i, This represents the distance between the i-th point and the j-th point.
[0101]
[0102] S902, Generate an undirected weighted graph based on the adjacency matrix of the tubular skeleton;
[0103] Specifically, each skeleton point in the tubular skeleton is connected to all other skeleton points to obtain a fully connected graph; any two connected skeleton points in the fully connected graph are selected, and the connection strength between the two skeleton points is weighted according to the distance between them in the adjacency matrix to obtain an undirected weighted graph.
[0104] Specifically, after the adjacency matrix is calculated, it can be used to organize the original N skeleton points. Here, we generate an undirected weighted graph. A graph is a data structure, a way of organizing data. Using graph data structures, we can more easily manage the relationships between data. In our algorithm, we use the open-source graph framework igraph (https: / / igraph.org / ) for graph generation and related calculations. The following uses a reference... Figure 10 To explain the concepts involved:
[0105] Assumption Figure 10 This represents five points in a plane. Connecting each point to the other four creates a graph. Because every pair of points is connected, it's called a fully connected graph. We don't care about the direction of the connection, so it's also called an undirected graph. Furthermore, we're not only concerned with the connections between points, but also their strength, so we weight the connections using the distance between them. In summary, what we need is an undirected weighted graph.
[0106] However, an undirected weighted fully connected graph has a drawback: all points are related, which undoubtedly increases the complexity of the analysis. Because in the skeleton graph, we only need to focus on points that are spatially close; for example, we only need to focus on the connection between point A and point B, not the connection between point A and point E. Therefore, we simplify the fully connected graph by only obtaining its minimum spanning tree. The minimum spanning tree is calculated using the `spanning_tree` function from igraph.
[0107] The minimum spanning tree obtained from the fully connected graph above is as follows: Figure 11 As shown, specifically, the shortest path between all nodes of the minimum spanning tree is calculated using the shortest_paths function in igraph.
[0108] S903, obtain the minimum spanning tree of the undirected weighted graph.
[0109] The final step yields the longest path containing all the nodes, which constitutes all the voxel points along the centerline of the entire tubular structure. The start and end points of the path are the two endpoints of the centerline.
[0110] Exemplary device
[0111] Reference Figure 12 The present invention also provides a device for calculating parameters of a tubular object, comprising:
[0112] Preprocessing module 121 is used to preprocess the original image of the tubular object to obtain a preprocessed image of the tubular object;
[0113] The acquisition module 122 is used to acquire the tubular skeleton based on all voxel points of the preprocessed tubular image;
[0114] Processing module 123 is used to perform branch removal processing on the tubular skeleton; wherein, the branch removal processing includes: generating a minimum spanning tree from all skeleton points in the tubular skeleton using a graph algorithm; calculating the shortest path between any two nodes in the minimum spanning tree to obtain a set of shortest paths; and selecting the longest shortest path in the set of shortest paths as the target path;
[0115] The determining module 124 is used to determine the target skeleton based on the target path;
[0116] Calculation module 125 is used to calculate relevant parameters of the target skeleton as tubular parameters;
[0117] The relevant parameters of the target skeleton are its length and longest diameter.
[0118] In some embodiments, determining the target skeleton based on the target path includes:
[0119] The target path is smoothed.
[0120] Extend both ends of the processed target path to the edge of the original image of the tubular object to obtain the target skeleton.
[0121] In some embodiments, extending both ends of the processed target path to the edge of the original image of the tubular object includes:
[0122] Extract the two nodes closest to the starting end of the processed target path, extend the first line outward from the straight line containing these two nodes, and make a first intersection point with the original image of the tubular object. Incorporate the first intersection point into the processed target path according to the physical spatial order.
[0123] Extract the two nodes closest to the endpoint of the processed target path, extend the straight line containing these two nodes outward, and make a second intersection point with the original image of the tubular object. Incorporate the second intersection point into the processed target path according to the physical spatial order.
[0124] In some embodiments, preprocessing the original image of the tubular object to obtain a preprocessed image of the tubular object includes:
[0125] Extract the largest connected component from the original image of the tubular object, and then perform equidistant resampling on the label image of the tubular object with the largest connected component in each direction to obtain the preprocessed image of the tubular object.
[0126] In some embodiments, calculating relevant parameters of the target skeleton as tubular parameters includes:
[0127] Based on the original image of the tubular object and the target skeleton, the longest diameter of all vertical surfaces of the tubular object is determined to obtain the set of longest diameters;
[0128] The longest diameter with the largest value in the set of longest diameters is determined as the longest diameter of the tubular structure.
[0129] In some embodiments, based on the original image of the tubular structure and the target skeleton, the longest diameter of all vertical planes of the tubular structure is determined to obtain the set of longest diameters, including:
[0130] The vertical plane of all the original images of the tubular objects is obtained by connecting every two adjacent skeleton points in the target skeleton.
[0131] Obtain the longest diameter for each vertical plane to get the set of longest diameters.
[0132] In some embodiments, generating a minimum spanning tree from all skeleton points in the tubular skeleton using a graph algorithm includes:
[0133] Obtain all skeleton points of the tubular skeleton, and generate the adjacency matrix of the tubular skeleton based on the spatial distance between any two skeleton points;
[0134] Generate an undirected weighted graph based on the adjacency matrix of the tubular skeleton;
[0135] Obtain the minimum spanning tree of the undirected weighted graph.
[0136] In some embodiments, obtaining all skeleton points of the tubular skeleton and generating an adjacency matrix of the tubular skeleton based on the spatial distance between any two skeleton points includes:
[0137] Obtain the N skeleton points contained in the tubular skeleton, each skeleton point including its spatial coordinates, generate an N-order square matrix composed of the distances between each skeleton point, and use this square matrix as the adjacency matrix.
[0138] In some embodiments, generating an undirected weighted graph based on the adjacency matrix of the tubular skeleton includes:
[0139] Connect each skeleton point in the tubular skeleton to all other skeleton points to obtain a fully connected graph.
[0140] Select any two skeleton points in the fully connected graph, and weight the connection strength of the two skeleton points according to the distance in the adjacency matrix to obtain an undirected weighted graph.
[0141] Exemplary electronic devices
[0142] Below, for reference Figure 13 To describe an electronic device according to an embodiment of the present invention. Figure 13 A block diagram of an electronic device according to an embodiment of the present invention is shown.
[0143] like Figure 13 As shown, the electronic device 1300 includes one or more processors 1310 and memory 1320.
[0144] The processor 1310 may be a central processing unit (CPU) or other form of processing unit with data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 1300 to perform desired functions.
[0145] The memory 1320 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 1310 may execute the program instructions to implement the tubular parameter calculation methods of the various embodiments of the present invention described above, and / or other desired functions. Various contents, such as category correspondences, may also be stored in the computer-readable storage medium.
[0146] In one example, the electronic device 1300 may also include an input device 1330 and an output device 1340, which are interconnected via a bus system and / or other forms of connection mechanism (not shown).
[0147] In addition, the input device 1330 may also include, for example, a keyboard, mouse, interface, etc. The output device 1340 can output various information to the outside, including analysis results, etc. The output device 1340 may include, for example, a monitor, speaker, printer, and communication network and its connected remote output devices, etc.
[0148] Of course, for the sake of simplicity, Figure 13 Only some of the components of the electronic device relevant to the present invention are shown, omitting components such as buses, input / output interfaces, etc. In addition, the electronic device may include any other suitable components depending on the specific application.
[0149] Exemplary computer program products and computer-readable storage media
[0150] In addition to the methods and apparatus described above, embodiments of the present invention may also be computer program products, comprising computer program instructions that, when executed by a processor, cause the processor to perform the steps in the methods for calculating tubular parameters according to various embodiments of the present invention as described in the "Exemplary Methods" section of this specification.
[0151] The computer program product can be written in any combination of one or more programming languages to perform the operations of the embodiments of the present invention. The programming languages include object-oriented programming languages such as Java and C++, as well as conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0152] Furthermore, embodiments of the present invention may also be computer-readable storage media storing computer program instructions thereon, which, when executed by a processor, cause the processor to perform the steps in the tubular parameter calculation methods according to various embodiments of the present invention described in the "Exemplary Methods" section above.
[0153] The computer-readable storage medium may be any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0154] The above description has been given for purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of the invention to the forms disclosed herein. Although numerous exemplary aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, alterations, additions, and sub-combinations therein.
Claims
1. A method for calculating parameters of a tubular structure, characterized in that, include: The original image of the tubular object is preprocessed to obtain a preprocessed image of the tubular object; The tubular skeleton is obtained based on all voxel points of the preprocessed tubular image; The tubular skeleton is subjected to a branch removal process, which includes: generating a minimum spanning tree from all skeleton points in the tubular skeleton using a graph algorithm; calculating the shortest path between any two nodes in the minimum spanning tree to obtain a set of shortest paths; and selecting the longest shortest path in the set of shortest paths as the target path. Based on the target path, the target skeleton is determined; Calculate the relevant parameters of the target skeleton as tubular parameters; The relevant parameters of the target skeleton are its length and longest diameter; Calculating the relevant parameters of the target skeleton as tubular parameters includes: Based on the original image of the tubular object and the target skeleton, the longest diameter of all vertical surfaces of the tubular object is determined to obtain the set of longest diameters; The longest diameter with the largest value in the set of longest diameters is determined as the longest diameter of the tubular structure. Based on the original image of the tubular structure and the target skeleton, the longest diameter of all vertical surfaces of the tubular structure is determined to obtain the set of longest diameters, including: The vertical plane of all the original images of the tubular objects is obtained by connecting every two adjacent skeleton points in the target skeleton. Obtain the longest diameter for each vertical plane to get the set of longest diameters.
2. The method for calculating parameters of a tubular object according to claim 1, characterized in that, Based on the target path, the target skeleton is determined, including: The target path is smoothed. Extend both ends of the processed target path to the edge of the original image of the tubular object to obtain the target skeleton.
3. The method for calculating parameters of a tubular object according to claim 2, characterized in that, The extension of both ends of the target path after the extension process, up to the edge of the original image of the tubular object, includes: Extract the two nodes closest to the starting end of the processed target path, extend the first line outward from the straight line containing these two nodes, and make a first intersection point with the original image of the tubular object. Incorporate the first intersection point into the processed target path according to the physical spatial order. Extract the two nodes closest to the endpoint of the processed target path, extend the straight line containing these two nodes outward, and make a second intersection point with the original image of the tubular object. Incorporate the second intersection point into the processed target path according to the physical spatial order.
4. The method for calculating parameters of a tubular object according to claim 1, characterized in that, The preprocessing of the original image of the tubular object to obtain the preprocessed image of the tubular object includes: Extract the largest connected component from the original image of the tubular object, and then perform equidistant resampling on the label image of the tubular object with the largest connected component in each direction to obtain the preprocessed image of the tubular object.
5. A method for calculating parameters of a tubular object according to claim 1, characterized in that, The step of generating a minimum spanning tree from all skeleton points in the tubular skeleton using a graph algorithm includes: Obtain all skeleton points of the tubular skeleton, and generate the adjacency matrix of the tubular skeleton based on the spatial distance between any two skeleton points; Generate an undirected weighted graph based on the adjacency matrix of the tubular skeleton; Obtain the minimum spanning tree of the undirected weighted graph.
6. A method for calculating parameters of a tubular object according to claim 5, characterized in that, Obtain all skeleton points of the tubular skeleton, and generate the adjacency matrix of the tubular skeleton based on the spatial distance between any two skeleton points, including: Obtain the N skeleton points contained in the tubular skeleton, each skeleton point including its spatial coordinates, generate an N-order square matrix composed of the distances between each skeleton point, and use this square matrix as the adjacency matrix.
7. A method for calculating parameters of a tubular object according to claim 5, characterized in that, The step of generating an undirected weighted graph based on the adjacency matrix of the tubular skeleton includes: Connect each skeleton point in the tubular skeleton to all other skeleton points to obtain a fully connected graph. Select any two skeleton points in the fully connected graph, and weight the connection strength of the two skeleton points according to the distance in the adjacency matrix to obtain an undirected weighted graph.
8. A device for calculating parameters of a tubular object, characterized in that, include: The preprocessing module is used to preprocess the original image of the tubular object to obtain a preprocessed image of the tubular object. The acquisition module is used to acquire the tubular skeleton based on all voxel points of the preprocessed tubular image; The processing module is used to perform branch removal processing on the tubular skeleton; wherein, the branch removal processing includes: generating a minimum spanning tree from all skeleton points in the tubular skeleton using a graph algorithm; calculating the shortest path between any two nodes in the minimum spanning tree to obtain a set of shortest paths; and selecting the longest shortest path in the set of shortest paths as the target path; The determination module is used to determine the target skeleton based on the target path; The calculation module is used to calculate the relevant parameters of the target skeleton as tubular parameters; The relevant parameters of the target skeleton are its length and longest diameter; Calculating the relevant parameters of the target skeleton as tubular parameters includes: Based on the original image of the tubular object and the target skeleton, the longest diameter of all vertical surfaces of the tubular object is determined to obtain the set of longest diameters; The longest diameter with the largest value in the set of longest diameters is determined as the longest diameter of the tubular structure. Based on the original image of the tubular structure and the target skeleton, the longest diameter of all vertical surfaces of the tubular structure is determined to obtain the set of longest diameters, including: The vertical plane of all the original images of the tubular objects is obtained by connecting every two adjacent skeleton points in the target skeleton. Obtain the longest diameter for each vertical plane to get the set of longest diameters.