Construction method of lung drainage basin map

By extracting the bronchial center line and calculating its average cross-sectional area to impart weight, the impact of bronchial thickness on the generation of lung basin maps is solved, the accuracy of lung basin maps and the accuracy of lung nodules are improved, and the surgical planning is optimized.

CN120543772APending Publication Date: 2025-08-26CHONGQING FUDIMAI DIGITAL TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510410309.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-02
Publication Date
2025-08-26

AI Technical Summary

Technical Problem

In the existing lung basin map construction technology, the impact of bronchial thickness on lung basin volume has not been fully considered, resulting in insufficient generation of lung basin maps, affecting surgical planning and pulmonary nodule positioning accuracy.

Method used

By extracting the bronchial center line, using an undirected graph to mark the bronchial branches, the average cross-sectional area of ​​each bronchial is calculated and weighted, and a voxel allocation algorithm is combined to generate a lung basin map, considering the impact of bronchial thickness on the lung basin.

Benefits of technology

It improves the generation accuracy of lung basin maps, reduces bronchial segmentation errors, optimizes surgical strategies, avoids anatomical blind spots, and improves the accuracy of lung nodule positioning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120543772A_ABST
    Figure CN120543772A_ABST
Patent Text Reader

Abstract

The invention discloses a lung drainage basin map construction method, which comprises the steps of obtaining point cloud data of bronchus, extracting a center line of the bronchus by using the point cloud data, and performing key point identification on the center line to obtain an undirected graph; firstly marking a main airway and first and second branches of the bronchial central line by using the undirected graph, and then marking the rest branches of the bronchial central line to obtain a marked bronchial central line; carrying out voxel distribution on the marked bronchial central line to obtain a first bronchial image; on the basis of the first bronchial image, a virtual branch is generated for the bronchial tube, and a second bronchial image is obtained; and calculating the average sectional area # imgabs0 # of each bronchus in the second bronchus image, calculating the weight # imgabs2 # of the bronchus in the lung drainage basin according to the average sectional area # imgabs1 #, and finally generating a lung drainage basin map in combination with the weight # imgabs3 #. The influence of bronchus thickness on the lung drainage basin is fully considered, and a more accurate lung drainage basin map can be generated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of medical image processing, and in particular relates to a method for constructing a lung watershed map. Background Art

[0002] For the past two decades, lobectomy and systematic lymph node dissection have been the standard surgical approach for early-stage non-small cell lung cancer (NSCLC). However, with the widespread and in-depth development of lung cancer screening, the number of lung nodules detected has increased significantly, and the proportion of early-stage lung cancers with a diameter of ≤2 cm has also gradually increased. This situation places higher demands on thoracic surgeons, who need to comprehensively consider multiple factors for each patient, including imaging manifestations, the patient's physical condition, baseline cardiopulmonary function, tumor size and location, etc., in order to accurately determine the indications for various surgical methods.

[0003] This project can provide doctors with more accurate information on lung anatomy and detailed location of lesions. It can guide doctors' preoperative planning and real-time intraoperative navigation, shorten surgery time, and reduce unexpected risks such as bleeding. Breaking through bottlenecks in clinical practice is primarily reflected in the following three aspects:

[0004] 1. It helps to deeply understand the anatomical variations of lung segment boundaries and customize lung watershed topography. Through a strategic sandbox approach, it guides doctors in preoperative and intraoperative planning, avoiding anatomical blind spots in advance. This not only ensures the safety of the resection margin, but also effectively shortens the operation time and reduces the risk of bleeding.

[0005] 2. Maximize the preservation of the patient's lung function, promote rapid recovery after surgery, reduce hospitalization time, and improve the efficiency of the use of scarce medical resources.

[0006] 3. It provides the possibility for minimally invasive resection of lung nodules in the "forbidden zone" under conventional CT guidance.

[0007] At present, the cooperation between foreign medical device companies and medical institutions is relatively close, and they jointly promote the development of the lung watershed map navigation system. Some well-known medical device companies continue to develop and launch new lung navigation equipment and technologies, and cooperate with medical institutions to conduct clinical trials and application promotion. At the same time, foreign scientific research institutions and medical institutions often conduct cooperative research, share data and experience, and promote the continuous advancement of technology. In recent years, domestic technology in the field of lung watershed map navigation systems has developed rapidly. Some large domestic hospitals and scientific research institutions have made important breakthroughs in lung three-dimensional reconstruction technology, watershed analysis algorithms, and other aspects. For example, by simulating the distribution of lung blood vessels and bronchi through artificial intelligence technology, the location of lung nodules and their relationship with surrounding structures can be accurately located, providing strong support for the diagnosis and treatment of lung diseases. However, the construction of the lung watershed map has a certain technical threshold, and there are the following problems:

[0008] 1. Acquisition of construction materials: It is difficult to obtain images of lung lobes and bronchi. Manual labeling or the use of well-trained AI models are required to obtain effective lung watershed construction materials.

[0009] 2. Bronchial labeling: The construction of the pulmonary watershed map is based on the accurate labeling of the bronchi. The bronchial structure is complex and heterogeneous. Accurately marking all branches of different bronchi requires considering all possible changes in the position and morphology of different bronchi, which requires the algorithm to be highly compatible with the data.

[0010] 3. Pulmonary Watershed Map Construction: Existing pulmonary watershed map generation technologies use a voxel allocation algorithm to assign lung lobe voxels, without considering the size of the bronchi. The bronchial pulmonary watershed represents the functional unit of the lung, and these areas collectively participate in gas exchange. Each watershed is composed of a specific network of bronchi, alveoli, and blood vessels, which work together to maintain normal respiratory function. Therefore, the size and thickness of the bronchus directly influences the volume of the pulmonary watershed it controls. Therefore, the influence of bronchial size on the pulmonary watershed cannot be ignored. Summary of the Invention

[0011] To solve at least one of the above problems, the present invention provides a method for constructing a lung watershed map, which fully considers the influence of the thickness of the bronchus on the volume of the lung watershed, and is conducive to generating a more accurate lung watershed map.

[0012] The technical solution adopted in the present invention is:

[0013] This application discloses a method for constructing a lung watershed map, comprising:

[0014] Bronchial centerline extraction: Obtaining point cloud data of the bronchus, extracting the bronchial centerline using the point cloud data, and identifying key points on the centerline to obtain an undirected graph; wherein the key points include endpoints, connection points, and bifurcation points;

[0015] Bronchial centerline marking: using the undirected graph, first marking the main airway and the first and second level branches of the bronchial centerline, and then marking the remaining branches of the bronchial centerline to obtain the marked bronchial centerline;

[0016] Bronchial voxel allocation: voxel allocation is performed on the marked bronchial centerline to obtain the first bronchial image;

[0017] Bronchial feature enhancement: Based on the first bronchial image, virtual branches are generated for the bronchi to obtain a second bronchial image; the average cross-sectional area of ​​each bronchus in the second bronchial image is calculated Then according to the average cross-sectional area Calculate the weight of the bronchus in the lung watershed

[0018] Generate lung watershed map: finally combine weights Generate lung watershed maps;

[0019] in, represents the average cross-sectional area of ​​the i-th bronchus, represents the weight of the i-th bronchus in the lung watershed.

[0020] As an optional technical solution, the extraction of the bronchial centerline is performed using the skeletonize tool in the skimage library.

[0021] As an optional technical solution, identifying key points on the center line and obtaining an undirected graph includes:

[0022] Detecting how many neighboring nodes each node on the center line has within a specified threshold range, and classifying the node according to the number of neighboring nodes; when classifying, when the number of neighboring nodes of the node is 1, 2, or greater than or equal to 3, classify the node as an endpoint, a connection point, or a bifurcation point, and set the endpoint, connection point, or bifurcation point to different pixel values;

[0023] Then connect each node to its nearest neighbor node through edges to obtain an undirected graph.

[0024] As an optional technical solution, marking the main airway and the primary and secondary branches of the bronchial centerline includes:

[0025] The endpoint with the largest z value is used as the starting point of the main airway. The neighbor nodes of the current node are searched through the undirected graph, and corresponding operations are performed according to the category of the neighbor nodes: when the neighbor node found is a connection point, the pixel value of the neighbor node is set to the same pixel value as the starting point of the main airway; when the neighbor node found is a bifurcation point, the search is terminated;

[0026] Taking the main airway terminal node as the starting point of the first-level branch, the undirected graph is used to search for neighbor nodes of the current node along the first-level branch, and corresponding operations are performed according to the category of the neighbor nodes: when the neighbor node found is a connection point, the pixel value of the neighbor node is set to the same pixel value as the starting point of the first-level branch; when the neighbor node found is a bifurcation point, it returns to the starting point of the first-level branch and starts searching along another path until all the first-level branch paths have been searched;

[0027] Taking the end node of the first-level branch as the starting point of the second-level branch, the neighbor nodes of the current node are searched along the second-level branch through the undirected graph, and corresponding operations are performed according to the category of the neighbor nodes: when the neighbor node found is a connection point, the pixel value of the neighbor node is set to the same pixel value as the starting point of the second-level branch; when the neighbor node found is a bifurcation point, return to the starting point of the second-level branch and start searching along another path until all second-level branch paths have been searched.

[0028] The starting point of the main airway, the starting point of the first-level branch, and the starting point of the second-level branch are set to different pixel values ​​respectively.

[0029] As an optional technical solution, marking the remaining branches of the bronchial centerline includes:

[0030] Taking the end node of the second-level branch as the starting point of the third-level branch, the algorithm searches for the neighbor nodes of the current node along the third-level branch through the undirected graph and performs corresponding operations according to the category of the neighbor nodes: when the neighbor node found is a connection point, the pixel value of the neighbor node is set to the same pixel value as the starting point of the third-level branch; when the neighbor node found is a bifurcation point or an endpoint, the algorithm returns to the starting point of the third-level branch and starts searching along another path until all the third-level branch paths have been searched;

[0031] Taking the end node of the third-level branch as the starting point of the fourth-level branch, the neighbor nodes of the current node are searched along the fourth-level branch through the undirected graph, and corresponding operations are performed according to the category of the neighbor nodes: when the neighbor node found is a connection point, the pixel value of the neighbor node is set to the same pixel value as the starting point of the fourth-level branch; when the neighbor node found is a bifurcation point or endpoint, return to the starting point of the fourth-level branch and start searching along another path until all four-level branch paths have been searched.

[0032] As an optional technical solution, marking the remaining branches of the bronchial centerline further includes:

[0033] If the end node of a four-level branch is an endpoint, then the four-level branch has no subsequent branches; if the end node of a four-level branch is a bifurcation point, then the four-level branch has subsequent branches, and the search continues along the branch, with the end node of the four-level branch as the starting point of the five-level branch. Through the undirected graph, the neighbor nodes of the current node are searched along the five-level branch, and corresponding operations are performed according to the category of the neighbor nodes: when the neighbor node found is a connection point, the pixel value of the neighbor node is set to the same pixel value as the starting point of the five-level branch; when the neighbor node found is a bifurcation point or an endpoint, return to the starting point of the five-level branch and start searching along another path until all five-level branch paths have been searched;

[0034] If there is a sixth-level branch after the fifth-level branch, continue searching for a mark on the sixth-level branch;

[0035] If there is a seventh-level branch after the sixth-level branch, continue searching for a mark on the seventh-level branch;

[0036] …

[0037] All branches up to the centerline of the bronchus are searched and marked.

[0038] Among them, the starting points of each level of branches are set to different pixel values.

[0039] As an optional technical solution, the bronchial voxel allocation includes: using the marked tracheal centerline to mark each voxel in the trachea, traversing each bronchial voxel, and setting its pixel value to the pixel value of the point on the centerline closest to it.

[0040] As an optional technical solution, generating a virtual branch for the bronchus includes: generating a virtual branch for the bronchus by gradient calculation and DDA straight line algorithm.

[0041] As an optional technical solution, the average cross-sectional area The calculation process is:

[0042] Get the starting point coordinates Point1 and the end point coordinates Point2, where the starting point is the starting point of the bronchial branch and the end point is the first bifurcation point of the bronchus:

[0043]

[0044] Calculate the gradient G between the starting point and the end point, and perform gradient normalization to obtain the normalized gradient NG:

[0045]

[0046] Among them, g x =x1-x2,g y =y1-y2,g z =z1-z2,

[0047] Calculate the orthogonal direction vectors d1 and d2. If NG z ≠0, then:

[0048]

[0049] If NG z =0, then:

[0050]

[0051] in,

[0052] Use vector projection to ensure the orthogonality of d2 and d1, so as to remove the component in the direction of d1 from d2, and obtain d'2. Then, normalize d'2 again to obtain d"2:

[0053]

[0054] For any point on a plane, its coordinates can be expressed as:

[0055] Point plane =P t +d x *d1+d y *d”2

[0056] Among them, P t Indicates the coordinates of the starting point, d x Indicates the x-axis offset, d y Indicates the y-axis offset;

[0057] Calculate the effective bronchial cross-sectional area:

[0058]

[0059] in, Indicates that there is an intersection between the bronchial image and the generated plane;

[0060] Finally, the average of all cross-sectional areas on the same bronchus is regarded as the average cross-sectional area of ​​the bronchus:

[0061]

[0062] Where, l means that the cross-sectional area is calculated l times at different positions on the bronchus. l represents the cross-sectional area calculated for the first time;

[0063] The weight Calculated according to the following formula:

[0064]

[0065] in, α is an influence factor, and the value range of α is [0.15, 0.35]. n represents that there are n bronchi in the second bronchial image.

[0066] The weight Calculated according to the following formula:

[0067]

[0068] in, α is an influence factor, and the value range of α is [0.15, 0.35]. n represents that there are n bronchi in the second bronchial image.

[0069] As an optional technical solution, when generating the lung watershed map, the watershed allocation is performed as follows:

[0070]

[0071] Among them, pixelValue L For each pixel point in the 3D image of the lung lobe Lung The pixel value, d(L, B j ) function represents the Euclidean distance between the lung lobe pixel and the bronchial pixel, min(·) represents the minimum value; Φ is a mapping function that converts the distance information into the corresponding lung lobe pixel value, and calculates Point Lung and each pixel point of the bronchus in the lobe bronchus The distance between them is calculated, and the closest distance points belonging to these bronchi are found. Their weights are added to the calculated distances, and finally a comparison is performed to determine the point Lung The pixel value of the bronchus segment to which it finally belongs is set as the pixel value of the corresponding bronchus segment.

[0072] The beneficial effects of the present invention are as follows: in the existing pulmonary watershed generation technology, the voxel allocation algorithm is used to allocate lung lobe voxels, without taking into account the thickness of the bronchi. The bronchial pulmonary watershed represents the functional unit of the lung, and these areas participate in gas exchange together. Each watershed is composed of specific bronchi, alveoli and vascular networks, which work together to maintain normal respiratory function. Therefore, the thickness and size of the bronchi can directly affect the volume of the pulmonary watershed it controls. In this application, the influence of the thickness of the bronchi is taken into account when generating the pulmonary watershed, and the accuracy of the voxel distance allocation method in the existing pulmonary watershed generation technology is improved by considering the existence of pulmonary fissures. The method of weighted plus virtual branches is used to effectively reduce the impact of bronchial segmentation errors, and can more accurately simulate and locate lung nodules and their surrounding bronchial structures, thereby avoiding anatomical blind spots in preoperative planning and optimizing surgical strategies. BRIEF DESCRIPTION OF THE DRAWINGS

[0073] Figure 1 is a flowchart of a method for constructing a lung watershed map in an exemplary embodiment.

[0074] Figure 2 is a schematic diagram of a lung flow domain constructed in an exemplary embodiment.

[0075] Figure 3 FIG. 4 is a schematic diagram of bronchial centerline extraction in an exemplary embodiment.

[0076] Figure 4 is a schematic diagram of identifying special points on an extracted centerline in an exemplary embodiment.

[0077] Figure 5 Schematic diagram of mislabeling of centerline extraction in an exemplary embodiment.

[0078] Figure 6 In an exemplary embodiment, Figure 5 Schematic diagram after correcting the incorrect labeling in .

[0079] Figure 7 is a schematic diagram of labeled bronchial branches in an exemplary embodiment.

[0080] Figure 8 FIG. 4 is a schematic diagram of bronchial voxel allocation in an exemplary embodiment.

[0081] Figure 9 FIG. 1 is a schematic diagram of generating virtual branches to reduce the impact of errors in an exemplary embodiment.

[0082] Figure 10 This is an example of bronchial diameter calculation.

[0083] Figure 11 This is the second example of bronchial diameter calculation.

[0084] Figure 12 This is the third example of bronchial diameter calculation.

[0085] Figure 13 This is the fourth example of bronchial diameter calculation.

[0086] Figure 14 φ is a pulmonary flow domain formed by excessive weight influence in an exemplary embodiment.

[0087] Figure 15 FIG. 4 is a lung flow map generated in an exemplary embodiment. DETAILED DESCRIPTION

[0088] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. The components and method steps of the embodiments of the present invention generally described and shown in the drawings herein can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0089] Example

[0090] The overall inventive concept of the present application is as follows: first, extract the bronchial centerline, use a threshold algorithm to identify special points, and use all special points on the bronchial centerline to create an undirected graph, and then use the undirected graph and depth-first algorithm to mark the bronchial centerline, wherein the bronchial branches are marked by using different pixel values, and the pixels on the same branch have the same pixel value. Then use the voxel distance allocation algorithm to mark the bronchial image. Afterwards, use multiple planes to intercept the cross-sectional area of ​​the bronchus to calculate the weight of the size of the watershed dominated by a bronchus in the current lung lobe. Finally, select to create a virtual branch combined with the weight, and use the voxel distance allocation algorithm to generate a lung watershed map. The method of the present application is described in detail below with reference to the accompanying drawings.

[0091] like Figure 1 As shown, the present application discloses a method for constructing a lung watershed map, comprising the following steps:

[0092] S1. Extraction of bronchial centerline: Obtain point cloud data of the bronchus, extract the centerline of the bronchus using the point cloud data, identify key points of the centerline and obtain an undirected graph; wherein the key points include endpoints, connection points and bifurcation points.

[0093] It should be noted that bronchial centerlines were extracted using the skeletonize tool in the skimage library. Scikit-image (often referred to as skimage) is a Python-based image processing library focused on image processing and analysis tasks. Built on scientific computing libraries such as NumPy, SciPy, and Matplotlib, it provides a rich set of image processing tools and algorithms. Scikit-image is an open-source project widely used in fields such as computer vision, medical image processing, and remote sensing image analysis.

[0094] Furthermore, identifying key points of the center line and obtaining an undirected graph includes:

[0095] S101, detecting how many neighboring nodes each node on the center line has within a specified threshold range, and classifying the node according to the number of neighboring nodes; when classifying, when the number of neighboring nodes of the node is 1, 2, or greater than or equal to 3, classifying the node as an endpoint, a connection point, or a bifurcation point, and setting different pixel values ​​for the endpoint, connection point, or bifurcation point;

[0096] S102. Then connect each node to its nearest neighbor node through an edge, thereby obtaining an undirected graph.

[0097] S2. Bronchial centerline marking: using the undirected graph, first mark the main airway and the first and second level branches of the bronchial centerline, and then mark the remaining branches of the bronchial centerline to obtain the marked bronchial centerline.

[0098] Specifically, marking the main airway and primary and secondary branches of the bronchial centerline includes:

[0099] S201. Use the endpoint with the largest z value as the starting point of the main airway, search for neighbor nodes of the current node through the undirected graph, and perform corresponding operations based on the category of the neighbor nodes: when the neighbor node found is a connection point, set the pixel value of the neighbor node to the same pixel value as the starting point of the main airway; when the neighbor node found is a bifurcation point, end the search;

[0100] S202: Using the main airway terminal node as the starting point of the first-level branch, search for neighbor nodes of the current node along the first-level branch through the undirected graph, and perform corresponding operations based on the category of the neighbor nodes: when the neighbor node found is a connection point, set the pixel value of the neighbor node to the same pixel value as the starting point of the first-level branch; when the neighbor node found is a bifurcation point, return to the starting point of the first-level branch and start searching along another path until all first-level branch paths have been searched;

[0101] S203. Taking the end node of the first-level branch as the starting point of the second-level branch, search for the neighbor nodes of the current node along the second-level branch through the undirected graph, and perform corresponding operations according to the category of the neighbor nodes: when the neighbor node found is a connection point, set the pixel value of the neighbor node to the same pixel value as the starting point of the second-level branch; when the neighbor node found is a bifurcation point, return to the starting point of the second-level branch and start searching along another path until all second-level branch paths have been searched.

[0102] It should be noted that the starting point of the main airway, the starting point of the first-level branch, and the starting point of the second-level branch are respectively set to different pixel values.

[0103] Furthermore, marking the remaining branches of the bronchial centerline includes:

[0104] S204: Using the end node of the second-level branch as the starting point of the third-level branch, search for neighbor nodes of the current node along the third-level branch through the undirected graph, and perform corresponding operations based on the category of the neighbor nodes: when the neighbor node found is a connection point, set the pixel value of the neighbor node to the same pixel value as the starting point of the third-level branch; when the neighbor node found is a bifurcation point or an endpoint, return to the starting point of the third-level branch and start searching along another path until all the third-level branch paths have been searched;

[0105] S205. Taking the end node of the third-level branch as the starting point of the fourth-level branch, search for the neighbor node of the current node along the fourth-level branch through the undirected graph, and perform corresponding operations according to the category of the neighbor node: when the neighbor node found is a connection point, set the pixel value of the neighbor node to the same pixel value as the starting point of the fourth-level branch; when the neighbor node found is a bifurcation point or endpoint, return to the starting point of the fourth-level branch and start searching along another path until all four-level branch paths have been searched.

[0106] Furthermore, marking the remaining branches of the bronchial centerline also includes:

[0107] S206. If the end node of a fourth-level branch is an endpoint, the fourth-level branch has no subsequent branches; if the end node of a fourth-level branch is a bifurcation point, the fourth-level branch has subsequent branches, and the search continues along the branch, with the end node of the fourth-level branch as the starting point of the fifth-level branch. Through the undirected graph, the neighbor nodes of the current node are searched along the fifth-level branch, and corresponding operations are performed according to the category of the neighbor nodes: when the neighbor node found is a connection point, the pixel value of the neighbor node is set to the same pixel value as the starting point of the fifth-level branch; when the neighbor node found is a bifurcation point or an endpoint, return to the starting point of the fifth-level branch and start searching along another path until all the five-level branch paths have been searched;

[0108] S207: If there is a sixth-level branch after the fifth-level branch, continue searching for a mark for the sixth-level branch;

[0109] S208: If there is a seventh-level branch after the sixth-level branch, continue searching for a mark for the seventh-level branch;

[0110] …

[0111] All branches up to the centerline of the bronchus are searched and marked.

[0112] Among them, the starting points of each level of branches are set to different pixel values.

[0113] S3. Bronchial voxel allocation: voxel allocation is performed on the marked bronchial centerline to obtain the first bronchial image.

[0114] Specifically, each voxel in the trachea is marked using the marked tracheal centerline, and each bronchial voxel is traversed to set its pixel value to the pixel value of the point on the centerline closest to it.

[0115] S4. Enhancement of bronchial features: Based on the first bronchial image, generate virtual branches for the bronchi to obtain a second bronchial image; calculate the average cross-sectional area of ​​each bronchus in the second bronchial image Then according to the average cross-sectional area Calculate the weight of the bronchus in the lung watershed in, represents the average cross-sectional area of ​​the i-th bronchus, represents the weight of the i-th bronchus in the lung watershed.

[0116] Specifically, virtual branches of the bronchus are generated using gradient calculation and the DDA line algorithm. The DDA (Digital Differential Analyzer) algorithm is a classic algorithm in computer graphics used to generate a straight line between two points. It draws a line by gradually calculating the pixels along the line.

[0117] Furthermore, the average cross-sectional area The calculation process is:

[0118] Get the starting point coordinates Point1 and the end point coordinates Point2, where the starting point is the starting point of the bronchial branch and the end point is the first bifurcation point of the bronchus:

[0119]

[0120] Calculate the gradient G between the starting point and the end point, and perform gradient normalization to obtain the normalized gradient NG:

[0121]

[0122] Among them, g x =x1-x2,g y =y1-y2,g z =z1-z2,

[0123] Calculate the orthogonal direction vectors d1 and d2. If NG z ≠0, then:

[0124]

[0125] If NG z =0, then:

[0126]

[0127] in,

[0128] Use vector projection to ensure the orthogonality of d2 and d1, so as to remove the component in the direction of d1 from d2, and obtain d'2. Then, normalize d'2 again to obtain d"2:

[0129]

[0130] For any point on a plane, its coordinates can be expressed as:

[0131] Point plane =P t +d x *d1+d y *d”2

[0132] Among them, P t Indicates the coordinates of the starting point, d x Indicates the x-axis offset, d y Indicates the y-axis offset;

[0133] Calculate the effective bronchial cross-sectional area:

[0134]

[0135] in, Indicates that there is an intersection between the bronchial image and the generated plane;

[0136] Finally, the average of all cross-sectional areas on the same bronchus is regarded as the average cross-sectional area of ​​the bronchus:

[0137]

[0138] Where, l means that the cross-sectional area is calculated l times at different positions on the bronchus. l represents the cross-sectional area calculated for the first time;

[0139] Furthermore, the weight Calculated according to the following formula:

[0140]

[0141] in, α is an influence factor, and the value range of α is [0.15, 0.35]. n represents that there are n bronchi in the second bronchial image.

[0142] S5. Generate lung watershed map: finally combine weights Generate lung watershed maps, such as Figure 2 is an example of a generated lung watershed map.

[0143] Specifically, when generating the lung watershed map, the watershed is allocated as follows:

[0144]

[0145] Among them, pixelValue L For each pixel point in the 3D image of the lung lobe Lung The pixel value, d(L, B j ) function represents the Euclidean distance between the lung lobe pixel and the bronchial pixel, min(·) represents the minimum value; Φ is a mapping function that converts the distance information into the corresponding lung lobe pixel value, and calculates Point Lung and each pixel point of the bronchus in the lobe bronchus The distance between them is calculated, and the closest distance points belonging to these bronchi are found. Their weights are added to the calculated distances, and finally a comparison is performed to determine the point Lung The pixel value of the bronchus segment to which it finally belongs is set as the pixel value of the corresponding bronchus segment.

[0146] In order to better understand the present application, the following is another explanation using an example of using the method of the present application to generate a lung watershed map.

[0147] The first step is to input the point cloud data of the trachea to be segmented, and use the skeletonize tool in the skimage library to extract the centerline of the trachea, such as Figure 3 As shown, Figure 3Figure a in the middle is the trachea to be segmented, and Figure b is the extracted centerline. Then, the number of "neighbors" within the specified threshold range of each point is detected, and each node is divided into three categories: points with one "neighbor" are set as the "endpoint" of the bronchial terminal, and the pixel value of the "endpoint" is set to 2; points with two "neighbors" are set as "connection points", and the pixel value of the "connection point" is set to 1; points with three or more "neighbors" are set as "bifurcation points", and the pixel value of the "bifurcation point" is set to 3, as shown in the figure. Figure 4 Then, each key point is connected to its nearest "neighbor" through an "edge". In this way, the bronchial skeleton with key points is obtained.

[0148] The second step is to mark the entire branch of the bronchus as follows: the "endpoint" with the largest z value (i.e., the coordinate value along the Z axis in spatial coordinates) is used as the starting point of the bronchus. Then, through the undirected graph, a "neighbor" of the current node whose pixel value has not been set is searched. Each time a "neighbor" is found, its type determines the next step: if it is a "connection point," its pixel value is set to the same as the starting point; if it is a "bifurcation point" or "endpoint," the type of the starting point is checked. If it is an "endpoint," the search ends; if it is a "bifurcation point," the search returns to the starting point and continues until all paths around the starting point have been searched.

[0149] It should be noted that the centerline extraction algorithm in the first step may have mislabeling, such as Figure 5 As shown in the figure, there are cases where non-bifurcation points are marked as bifurcation points in the area indicated by the red circle. Based on clinical prior knowledge, during the marking process, this embodiment sets the primary and secondary branches to not allow "endpoints" to appear. If "endpoints" appear, the algorithm will automatically correct the marking. And after finding a bifurcation point, it will be checked whether there are two valid (unprocessed) paths at the bifurcation point. In this way, the tracheal centerline of the primary and secondary bronchial markings is obtained, as shown in the figure. Figure 6 .

[0150] The third step is to further mark the bronchial tree using the bronchial centerline marked in the previous step. Starting from the last "bifurcation point" of the secondary branch, continue to search for each path. After one or two searches, compare the coordinates of the last bifurcation point on the searched path to identify them and use this to determine whether to continue searching or mark the bronchial tree in the next step. Use a large number of patients' bronchi for testing. During this process, continuously optimize the algorithm, find a more compatible method, and add various exception handling to make the algorithm robust enough. Use recursion and depth-first algorithms to mark the bronchial tree, so that the bronchial centerline marked step by step is obtained, such as Figure 7 .

[0151] Step 4: Use the marked tracheal centerline (i.e. Figure 7 In Figure d), each voxel in the trachea is labeled, and each bronchial voxel is traversed and its pixel value is set to the pixel value of the point on the center line closest to it. This process is a very intensive task. Constructing a KDTree to improve the efficiency of this process, so that a step-by-step labeled bronchial image is obtained, such as Figure 8 KDTree (k-dimensional tree) is a data structure used to organize data points in k-dimensional space. It is widely used in computer vision and image processing, especially in efficient search (such as nearest neighbor search) and space partitioning tasks.

[0152] Step 5. Due to the large differences in the length of bronchial branches, there may be human errors and systematic errors in the process of obtaining bronchial masks. In order to reduce the impact of these errors, the starting point, the first "bifurcation point" and each "end point" of a specific bronchial branch are collected during the process of marking the bronchial centerline. These points are used to generate virtual branches for the bronchus through gradient calculation and DDA line generation algorithm. This method can effectively reduce the impact of human errors and systematic errors on the distortion of bronchial length, such as Figure 9 .

[0153] In the sixth step, since the length and diameter of the bronchi vary, the effect of the length difference has been initially reduced in the fifth step. Now we need to consider the effect of the diameter, so that bronchi of different diameters can obtain watershed areas corresponding to the bronchial diameter, that is, thicker bronchi can obtain more watershed areas and thinner bronchi can obtain less watershed areas. The watershed allocation method is as follows:

[0154]

[0155] Each pixel point in the 3D image of the lung lobe Lung The pixel value is pixelValue L , Ф is a mapping function that converts distance information into corresponding lung lobe pixel values ​​and calculates Point Lung Points for each pixel that exists in the bronchus in the lung lobe bronchus The distance between them is calculated, and the closest distance points belonging to these bronchi are found. Their weights are added to the calculated distances, and finally a comparison is performed to determine the point Lung The pixel value of the bronchus segment to which it finally belongs is set as the pixel value of the corresponding bronchus segment.

[0156] The calculation process of bronchial effective cross-sectional area is as follows:

[0157] enter:

[0158] gradient:

[0159] Orthogonal direction vector:

[0160] Ensure orthogonality: d'2 = d2 - (d2 * d1) d1,

[0161] Get a point on the plane: Point plane =P t +d x *d1+d y *d”2

[0162] Calculate the effective bronchial cross-sectional area:

[0163] Among them, g x =x1-x2,g y =y1-y2,g z =z1-z2,

[0164]

[0165] Indicates that the bronchial image intersects the generated plane; * represents the dot product operation of the vector, and ||·|| represents the modulus of the vector.

[0166] Specifically, we first use the starting point of the bronchial branch and the first "bifurcation point" collected in the third step. In order to make the cross-sectional area more accurate, we select a point every ten points between the starting point and the first "bifurcation point". First, we calculate the gradient G of the line between the two points by subtracting the starting point coordinates from the end point coordinates. x1, y1, z1 represent the coordinates of the pixel points, G represents the gradient between the two points, g x 、g y 、g z Represents the difference in corresponding coordinates, and then divide the gradient by the Euclidean distance between the connected points to obtain the normalized gradient NG, that is, the gradient normal vector. When the difference in the z values ​​of the two point coordinates is close to zero, the generated plane is regarded as a horizontal plane, and d1 and d2 represent the unit vectors in the x-axis and y-axis directions, respectively. Otherwise, the x and y axes are used as references to calculate the directions d1 and d2 that are orthogonal to the normal vector, and then the calculated orthogonal directions are standardized, and then the vector projection method is used to ensure the orthogonality of d2 and d1. This step ensures that the component in the d1 direction is removed from d2 to obtain d'2, and then d'2 is standardized again to obtain d"2. These two directions are then used as offset directions, and the position of each point on the plane is calculated through parametric equations. The coordinates of each point on the plane can be expressed as Pointplane =P t +d x *d1+d y *d”2, where P t Indicates the coordinates of the starting point, d x Indicates the x-axis offset, d1 indicates the offset direction, d y The y-axis offset is represented by d2, and the offset direction is represented by d2. Finally, the average of all cross-sectional areas on the same bronchus is regarded as the average cross-sectional area of ​​the bronchus. like Figure 10-13 After that, the thickness of the marked bronchi belonging to the same lobe is combined to calculate the weight W when they allocate the watershed. S .

[0167] in

[0168] However, the impact of directly using this weight to allocate watersheds is too large, such as Figure 14 Therefore, an impact factor is added to the weight distribution basin, using the average cross-sectional area of ​​a bronchus in the same lobe The average cross-sectional area A of the bronchus in the lung lobe was obtained by summing and averaging. L , the impact factor α multiplied by the average bronchial cross-sectional area A b The average cross-sectional area of ​​the bronchus in the lung lobe is A L The difference, plus The relative area of ​​the bronchus is obtained and then divided by the total average area S to finally generate the true weight of the bronchial distribution basin Finally, the lung watershed map is obtained, such as Figure 15 .

[0169]

[0170] in,

[0171] The results of the tests using various methods are compared below, as shown in Table 1.

[0172] Table 1. Comparison of test results using various methods

[0173]

[0174] Table 1 compares the performance of the original voxel classification algorithm with the accelerated classification algorithm after introducing weighted branching and virtual branching. The original accelerated classification algorithm achieved an average DSC coefficient of 0.8540 and an average IoU coefficient of 0.7578. With the addition of virtual branches and weighted branching, the average DSC coefficient increased to 0.8695 and the average IoU coefficient increased to 0.7780. This demonstrates that the introduction of virtual branches and weighted branching significantly improves classification results, validating their effectiveness and feasibility.

[0175] The method of this embodiment is compared with other methods, as shown in Table 2.

[0176] Table 1. Comparison with other methods

[0177]

[0178] Table 2 compares the method of this embodiment with other methods proposed by Kuang et al. In Kuang et al.'s method, the highest average DSC coefficient achieved using the ImPulSe deep learning model was 0.846. However, the method of this embodiment achieved an average DSC coefficient of 0.870, demonstrating its significant performance advantage and further demonstrating its effectiveness and feasibility.

[0179] It should be noted that the Dice Similarity Coefficient (DSC) is a commonly used metric for measuring the similarity between two sets, particularly in the field of image segmentation, where it is used to assess the degree of overlap between the predicted and true results. The IoU coefficient (Intersection over Union) is a metric for measuring the degree of overlap between two regions and is commonly used in object detection and image segmentation tasks. It represents the ratio of the intersection of the predicted and true regions to their union. The references in Table 2 are as follows:

[0180] [1]EMvan Rikxoort, B.de Hoop, S.van de Vorst, M.Prokop and B.vanGinneken, "Automatic Segmentation of Pulmonary Segments From Volumetric ChestCT Scans," in IEEE Transactions on Medical Imaging, vol.28, no.4, pp.621-630, April 2009,doi:10.1109 / TMI.2008.2008968.

[0181] [2]Kuhnigk JM,Dicken V,Zidowitz S,et al.Informatics in radiology(infoRAD):new tools for computer assistance in thoracic CT.Part 1.Functionalanalysis of lungs,lung lobes,and bronchopulmonary segments.Radiographics2005;25:525-36.

[0182] [3]Kuhnigk JM,Dicken V,Zidowitz S,et al.Informatics in radiology(infoRAD):new tools for computer assistance in thoracic CT.Part 1.Functionalanalysis of lungs,lung lobes,and bronchopulmonary segments.Radiographics2005;25:525-36.

[0183] [4]Stoecker C,Welter S,Moltz JH,Lassen B,Kuhnigk JM,Krass S,PeitgenHO.Determination of lung segments in computed tomography images using theEuclidean distance to the pulmonary artery.Med Phys2013;40:091912.

[0184] [5]Chen Z,Wo BWB,Chan OL,Huang YH,Teng X,Zhang J,Dong Y,Xiao L,Ren G,Cai J.Deep learning-based bronchial tree-guided semi-automatic segmentationof pulmonary segments in computed tomography images.Quant Imaging MedSurg.2024Feb 1。

[0185] The above is only a specific implementation method of the present application, but the scope of protection of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or replacements within the technical scope disclosed in the present application, which should be included in the scope of protection of the present application. Any technical solution that falls within the scope defined by the claims of the present invention falls within the scope of protection of the present invention.

Claims

1. A method for constructing a lung watershed map, characterized in that: include: Bronchial centerline extraction: Obtaining point cloud data of the bronchus, extracting the bronchial centerline using the point cloud data, and identifying key points on the centerline to obtain an undirected graph; wherein the key points include endpoints, connection points, and bifurcation points; Bronchial centerline marking: using the undirected graph, first marking the main airway and the first and second level branches of the bronchial centerline, and then marking the remaining branches of the bronchial centerline to obtain the marked bronchial centerline; Bronchial voxel allocation: voxel allocation is performed on the marked bronchial centerline to obtain the first bronchial image; Bronchial feature enhancement: Based on the first bronchial image, virtual branches are generated for the bronchi to obtain a second bronchial image; the average cross-sectional area of ​​each bronchus in the second bronchial image is calculated Then according to the average cross-sectional area Calculate the weight of the bronchus in the lung watershed Generate lung watershed map: finally combine weights Generate lung watershed maps; in, represents the average cross-sectional area of ​​the i-th bronchus, represents the weight of the i-th bronchus in the lung watershed.

2. The method for constructing a lung watershed map according to claim 1, characterized in that: The extraction of the bronchial centerline is performed using the skeletonize tool in the skimage library.

3. The method for constructing a lung watershed map according to claim 1, wherein: The identifying key points of the center line and obtaining an undirected graph comprises: Detecting how many neighboring nodes each node on the center line has within a specified threshold range, and classifying the node according to the number of neighboring nodes; when classifying, when the number of neighboring nodes of the node is 1, 2, or greater than or equal to 3, classify the node as an endpoint, a connection point, or a bifurcation point, and set the endpoint, connection point, or bifurcation point to different pixel values; Then connect each node to its nearest neighbor node through edges to obtain an undirected graph.

4. The method for constructing a lung watershed map according to claim 1, wherein: The marking of the main airway and the first and second level branches of the bronchial centerline includes: The endpoint with the largest z value is used as the starting point of the main airway. The neighbor nodes of the current node are searched through the undirected graph, and corresponding operations are performed according to the category of the neighbor nodes: when the neighbor node found is a connection point, the pixel value of the neighbor node is set to the same pixel value as the starting point of the main airway; when the neighbor node found is a bifurcation point, the search is terminated; Taking the main airway terminal node as the starting point of the first-level branch, the undirected graph is used to search for neighbor nodes of the current node along the first-level branch, and corresponding operations are performed according to the category of the neighbor nodes: when the neighbor node found is a connection point, the pixel value of the neighbor node is set to the same pixel value as the starting point of the first-level branch; when the neighbor node found is a bifurcation point, it returns to the starting point of the first-level branch and starts searching along another path until all the first-level branch paths have been searched; Taking the end node of the first-level branch as the starting point of the second-level branch, the neighbor nodes of the current node are searched along the second-level branch through the undirected graph, and corresponding operations are performed according to the category of the neighbor nodes: when the neighbor node found is a connection point, the pixel value of the neighbor node is set to the same pixel value as the starting point of the second-level branch; when the neighbor node found is a bifurcation point, return to the starting point of the second-level branch and start searching along another path until all second-level branch paths have been searched. The starting point of the main airway, the starting point of the first-level branch, and the starting point of the second-level branch are set to different pixel values ​​respectively.

5. The method for constructing a lung watershed map according to claim 1, wherein: The marking of the remaining branches of the bronchial centerline at all levels includes: Taking the end node of the second-level branch as the starting point of the third-level branch, the algorithm searches for the neighbor nodes of the current node along the third-level branch through the undirected graph and performs corresponding operations according to the category of the neighbor nodes: when the neighbor node found is a connection point, the pixel value of the neighbor node is set to the same pixel value as the starting point of the third-level branch; when the neighbor node found is a bifurcation point or an endpoint, the algorithm returns to the starting point of the third-level branch and starts searching along another path until all the third-level branch paths have been searched; Taking the end node of the third-level branch as the starting point of the fourth-level branch, the neighbor nodes of the current node are searched along the fourth-level branch through the undirected graph, and corresponding operations are performed according to the category of the neighbor nodes: when the neighbor node found is a connection point, the pixel value of the neighbor node is set to the same pixel value as the starting point of the fourth-level branch; when the neighbor node found is a bifurcation point or endpoint, return to the starting point of the fourth-level branch and start searching along another path until all four-level branch paths have been searched.

6. The method for constructing a lung watershed map according to claim 5, characterized in that: The marking of the remaining branches of the bronchial centerline at all levels also includes: If the end node of a four-level branch is an endpoint, then the four-level branch has no subsequent branches; if the end node of a four-level branch is a bifurcation point, then the four-level branch has subsequent branches, and the search continues along the branch, with the end node of the four-level branch as the starting point of the five-level branch. Through the undirected graph, the neighbor nodes of the current node are searched along the five-level branch, and corresponding operations are performed according to the category of the neighbor nodes: when the neighbor node found is a connection point, the pixel value of the neighbor node is set to the same pixel value as the starting point of the five-level branch; when the neighbor node found is a bifurcation point or an endpoint, return to the starting point of the five-level branch and start searching along another path until all five-level branch paths have been searched; If there is a sixth-level branch after the fifth-level branch, continue searching for a mark on the sixth-level branch; If there is a seventh-level branch after the sixth-level branch, continue searching for a mark on the seventh-level branch; …… All branches up to the centerline of the bronchus are searched and marked. Among them, the starting points of each level of branches are set to different pixel values.

7. The method for constructing a lung watershed map according to claim 1, wherein: The bronchial voxel allocation includes: using the marked tracheal centerline to mark each voxel in the trachea, traversing each bronchial voxel, and setting its pixel value to the pixel value of the point on the centerline closest to it.

8. The method for constructing a lung watershed map according to claim 1, wherein: Generating a virtual branch for the bronchus includes: generating a virtual branch for the bronchus by gradient calculation and DDA straight line algorithm.

9. The method for constructing a lung watershed map according to claim 1, wherein: The average cross-sectional area A bi The calculation process is: Get the starting point coordinates Point1 and the end point coordinates Point2, where the starting point is the starting point of the bronchial branch and the end point is the first bifurcation point of the bronchus: Calculate the gradient G between the starting point and the end point, and perform gradient normalization to obtain the normalized gradient NG: Among them, g x =x1-x2,g y =y1-y2,g z =z1-z2, Calculate the orthogonal direction vectors d1 and d2. If NG z ≠0, then: If NG z =0, then: in, Use vector projection to ensure the orthogonality of d2 and d1, so as to remove the component in the direction of d1 from d2, and obtain d'2. Then, normalize d'2 again to obtain d"2: For any point on a plane, its coordinates can be expressed as: Point plane =P t +d x *d1+d y *d”2 Among them, P t Indicates the coordinates of the starting point, d x Indicates the x-axis offset, d y Indicates the y-axis offset; Calculate the effective bronchial cross-sectional area: in, Indicates that there is an intersection between the bronchial image and the generated plane; Finally, the average of all cross-sectional areas on the same bronchus is regarded as the average cross-sectional area of ​​the bronchus: Where, l means that the cross-sectional area is calculated l times at different positions on the bronchus. l represents the cross-sectional area calculated for the first time; The weight Calculate according to the following formula: in, α is an influence factor, and the value range of α is [0.15, 0.35]. n represents that there are n bronchi in the second bronchial image.

10. The method for constructing a lung watershed map according to claim 1, wherein: When generating the lung watershed map, the watershed is allocated as follows: Among them, pixelValue L For each pixel point in the 3D image of the lung lobe Lyng The pixel value, d(L, B j ) function represents the Euclidean distance between the lung lobe pixel and the bronchial pixel, min(·) represents the minimum value; Φ is a mapping function that converts the distance information into the corresponding lung lobe pixel value, and calculates Point Lung and each pixel point of the bronchus in the lobe bronchus The distance between them is calculated, and the closest distance points belonging to these bronchi are found. Their weights are added to the calculated distances, and finally a comparison is performed to determine the point Lung The pixel value of the bronchus segment to which it finally belongs is set as the pixel value of the corresponding bronchus segment.

Citation Information

Cited By

  • Path planning device of bronchoscope

    CN121196730A