Pulmonary vessel segmentation method, system, and medium based on continuity of centerline and radius

CN123015428APending Publication Date: 2026-10-30BEIJING CHAOYANG HOSPITAL CAPITAL MEDICAL UNIVERSITY
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202611153309.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-31
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

[0008]为了克服现有技术中存在的分叉区域虚假切分、主干连续性被破坏、缺乏伪末端噪声清理、分段结果无法天然扩展至体素级、缺少统一的段级结构化输出等问题,本发明提供了一种基于中心线与半径连续性的肺血管分段方法、系统及介质,能够在保持血管树拓扑表达能力的同时,提升分段结果的连续性、稳定性和可解释性

Benefits of technology

[0059]本发明提供的一种基于中心线与半径连续性的肺血管分段方法、系统及介质,以肺血管三维二值掩膜为输入,先将肺血管体积压缩为中心线拓扑结构,再在段级层面执行分叉聚类、短段合并、主干连续性保护及伪末端删除,最后再将修正后的中心线标签映射回原始血管体积。该方案能够实现以下效果:

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123015428A_ABST
    Figure CN123015428A_ABST
Patent Text Reader

Abstract

The application discloses a lung vessel segmentation method and system based on the continuity of center lines and radii, and a medium, and belongs to the technical field of medical image analysis and computer vision, and comprises the following steps: pre-processing a three-dimensional binary mask of lung vessels; then performing three-dimensional skeletonization; determining a topological type; clustering bifurcation points; forming an initial vessel segment set; performing distance transformation on the pre-processed three-dimensional binary mask of lung vessels, taking the distance value at the center line point as an approximate value of the local vessel radius, and calculating various radii of each vessel segment according to the approximate value; further modifying the initial vessel segment; backfilling the label of the modified center line segment to each vessel voxel in the lung vessel volume to generate a voxel-level three-dimensional segmentation label map; and outputting a structured parameter. The application can reduce the degree of over-segmentation, improve the main stem continuity, and improve the stability of the segmentation result under different cases and different resolution data while maintaining the topological structure expression capability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of medical image analysis and computer vision technology, and in particular to a method, system and medium for pulmonary vascular segmentation based on the continuity of the centerline and radius. Background Technology

[0002] The pulmonary vascular structure exhibits a distinct tree-like branching pattern, with the diameter gradually decreasing from proximal to distal. In scenarios such as pulmonary embolism assessment, pulmonary vascular mapping, interventional pathway planning, vascular morphology statistics, and preoperative and intraoperative auxiliary diagnosis and treatment, it is often necessary not only to obtain the overall segmentation results of the pulmonary vessels, but also to further divide the pulmonary vessels into multiple vascular segments with topological or anatomical significance, and to calculate the structured parameters of each vascular segment, such as length, radius, volume, spatial location, and adjacency relationships.

[0003] Currently, various technical solutions have been proposed for the segmentation and parameter extraction of tubular structures in 3D medical images.

[0004] For example, Chinese patent application CN118261895A proposes a liver vessel segmentation method based on graph neural networks (GNNs). Its core idea is to segment the liver vessel mask from CT images, extract the vessel centerline, construct a vessel tree structure, use a graph neural network (GNN) to classify and segment the vessel segments into arteries and veins, and finally use region growing to backfill the segmentation results into the vessel volume. While this achieves a complete process from centerline segmentation to voxel backfilling, its performance is highly dependent on a large amount of high-quality labeled data, resulting in high training costs and poor model interpretability. More importantly, it deals with liver vessels, which differ significantly from lung vessels in terms of multi-level branching morphology, diameter distribution, and clinical needs, making direct transfer of the model difficult.

[0005] Another type of approach, such as CN121903882A and CN121810536A, focuses on repairing the topology of the vessel centerline or rigid segmentation based on skeleton endpoints and bifurcation points. However, these purely geometric methods have a common drawback: during the 3D voxel skeletonization process, the bifurcation regions of real vessels are often discretized into multiple adjacent bifurcation voxels. Existing techniques treat these voxels as independent bifurcation points for segmentation, which easily generates a large number of false short vessel segments near the real bifurcation points, severely interfering with subsequent quantitative statistics. Furthermore, they do not consider the incorrect segmentation of main vessels due to local topological jitter, or the problem of pseudo-branches in the terminal regions caused by segmentation noise.

[0006] In addition, cardiovascular technical solutions such as CN120953718A use stenosis lesion detection as the core driver for their segmentation strategy. The segmentation boundary is determined by the location of the stenosis, rather than by the natural topology of the vascular tree. Their application scenarios and purposes are different from those in this field.

[0007] In summary, existing technologies for automatically segmenting pulmonary vessels in three dimensions generally face common technical bottlenecks, including false segmentation of bifurcation regions, disruption of trunk continuity, lack of pseudo-terminal cleanup mechanisms, difficulties in voxel-level mapping, and inconsistent output formats. Therefore, there is an urgent need for a systematic solution that can achieve robust and accurate pulmonary vessel segmentation based on the anatomical characteristics of pulmonary vessels through purely regularized and interpretable topological and geometric constraints, and can output structured parameters. Summary of the Invention

[0008] To overcome the problems existing in the prior art, such as false segmentation of bifurcation regions, disruption of trunk continuity, lack of pseudo-terminal noise cleanup, inability of segmentation results to be naturally extended to the voxel level, and lack of unified segment-level structured output, this invention provides a lung vessel segmentation method, system, and medium based on the continuity of the centerline and radius. This method can improve the continuity, stability, and interpretability of segmentation results while maintaining the topological expressive power of the vascular tree.

[0009] To achieve the above objectives, on the one hand, the present invention provides a method for pulmonary vessel segmentation based on the continuity of the centerline and radius, comprising the following steps:

[0010] Step S1: Obtain the three-dimensional binary mask of the lung vessels;

[0011] Step S2, Preprocessing Mask: The three-dimensional binary mask of the lung vessels is preprocessed to improve connectivity and suppress local noise;

[0012] Step S3, 3D skeletonization: Perform 3D skeletonization on the preprocessed 3D binary mask of the lung vessels to obtain the centerline skeleton of the monomer width, and compress the tubular structure into a skeleton map;

[0013] Step S4: Skeleton point topology classification: Count the number of skeleton neighbors of each skeleton point in the three-dimensional neighborhood, and determine the topology type based on the number of neighbors;

[0014] Step S5, Bifurcation Point Clustering Correction: Clustering the bifurcation points can converge local bifurcation regions into a single topological node, fundamentally reducing the generation of false short segments;

[0015] Step S6, Initial centerline segment tracing: Using the endpoints and the representative bifurcation points as boundary nodes, trace the path along the skeleton connection relationship to form an initial set of blood vessel segments;

[0016] Step S7, Distance Transformation and Radius Calculation: Perform distance transformation on the preprocessed three-dimensional binary mask of the lung vessels, use the distance value at the center line point as an approximate value of the local vessel radius, and calculate various radii for each vessel segment accordingly;

[0017] Step S8, Merging of Short Bifurcation Segments: Merging blood vessel segments that are both bifurcation points and are relatively short;

[0018] Step S9, Main trunk continuity protection: Merging unreasonable breaks between candidate segments of the main trunk can reduce the problem of local bifurcation and accidental cutting of the main trunk vessels;

[0019] Step S10, Pseudo-terminal deletion: Delete short terminal branches that do not conform to the true principle of gradual tapering at the terminal;

[0020] Step S11, Voxel-level label backfilling: Backfill the corrected centerline segment labels to each blood vessel voxel in the lung vessel volume to generate a voxel-level three-dimensional segmented label map.

[0021] Step S12: Output structured parameters.

[0022] Further, step S2, preprocessing the mask, specifically includes the following steps:

[0023] Binarization: The input three-dimensional binary mask of the lung vessels is binarized into {0,1};

[0024] Closure operation: Morphological closure operation is performed using three-dimensional structuring elements to fill small holes inside blood vessels and bridge tiny breaks caused by noise in the segmentation model;

[0025] Opening operation: Performs morphological opening operation to remove isolated small burrs and monomeric noise;

[0026] Connected component analysis: Three-dimensional connected component analysis is performed on the processed three-dimensional binary mask of lung vessels. The number of voxels in each foreground connected component is counted, and only the connected component with the largest number of voxels is retained as the final vascular mask to eliminate scattered false positive regions that are not connected to the main vascular tree.

[0027] Furthermore, step S5, the bifurcation point clustering correction, specifically includes:

[0028] Density-based clustering is performed on the bifurcation points, and one representative bifurcation point is retained in each bifurcation cluster, while the remaining bifurcation points are reclassified as path points.

[0029] Furthermore, step S7, distance transformation and radius calculation, specifically includes:

[0030] Perform Euclidean distance transformation on the preprocessed three-dimensional binary mask of the lung vessels to obtain the distance values ​​of each voxel inside the vessel region to the nearest background boundary;

[0031] The distance of the centerline point in the distance field is used as an approximate value of the local blood vessel radius at that location, and the average radius, minimum radius, and maximum radius of each blood vessel segment are calculated based on the approximate value of the local blood vessel radius.

[0032] Further, step S8, merging short fork segments, specifically includes:

[0033] Identify short bifurcation segments with bifurcation points at both ends and a length less than a first length threshold, and find adjacent blood vessel segments that share bifurcation points with the short bifurcation segments;

[0034] If the radius similarity between the short bifurcation segment and the adjacent vessel segment is higher than the first radius threshold, then the short bifurcation segment is incorporated into the best-matching adjacent vessel segment.

[0035] Furthermore, step S9, backbone continuity protection, specifically includes:

[0036] Blood vessel segments with an average radius greater than the main trunk radius threshold and bifurcation points at both ends are selected as candidate main trunk segments.

[0037] For the candidate trunk segments whose length is less than the second length threshold, other candidate trunk segments that share nodes with them are searched and merged based on radius similarity.

[0038] Furthermore, step S10, pseudo-terminal deletion, specifically includes:

[0039] Identify a terminal segment with one end as an endpoint and the other end as a bifurcation point, and whose length is less than a third length threshold, and compare the terminal segment with the parent adjacent blood vessel segment connected to the same bifurcation point;

[0040] If the average radius of the terminal segment is too close to the average radius of the parent adjacent segment, the terminal segment is determined to be a pseudo-terminal segment and deleted.

[0041] Furthermore, step S11, voxel-level label backfilling, specifically includes:

[0042] Each corrected centerline segment is assigned a unique segment label, and for each foreground voxel in the 3D binary mask of the lung vessels, the nearest labeled centerline point is found, and the foreground voxel is labeled with the label value of the vessel segment to which the nearest centerline point belongs, thereby generating a voxel-level 3D segmented label map with the same spatial size as the original mask.

[0043] On the other hand, the present invention also provides a pulmonary vascular segmentation system based on the continuity of the centerline and radius, comprising:

[0044] Preprocessing module: preprocesses the input 3D binary mask of lung vessels to reduce noise, fill in local small holes and preserve the main lung vessel tree;

[0045] Skeleton extraction module: Performs 3D skeletonization on the preprocessed 3D binary mask of lung vessels to obtain the centerline skeleton of the monomer width, and compresses the tubular structure into a skeleton map;

[0046] Topology classification module: Counts the number of skeleton neighbors of each skeleton point in the three-dimensional neighborhood, and divides the skeleton points into endpoints, path points and branch points;

[0047] Bifurcation Clustering Module: Clusters spatially adjacent bifurcation points, merging multiple discrete bifurcation voxels into representative bifurcation points, thereby reducing false segmentation caused by skeleton discretization error;

[0048] Centerline segment tracking module: Using the endpoints and the representative bifurcation points as boundary nodes, the centerline is tracked along the skeleton connection relationship to form an initial set of blood vessel segments with a clear start point, end point and path sequence;

[0049] Radius calculation module: Performs distance transformation on the preprocessed three-dimensional binary mask of the lung vessels, and uses the distance value at the center line point as the local radius approximation value to calculate the average radius, minimum radius and maximum radius of each vessel segment;

[0050] Segment-level correction module: Based on vessel segment length, node type, radius similarity, and topological adjacency, the initial vessel segment is corrected, including:

[0051] Short bifurcation segment merging unit: Merging blood vessel segments that are both bifurcation points and are relatively short in length;

[0052] Main trunk continuity protection unit: merges unreasonable breaks between candidate segments of the main trunk;

[0053] Pseudo-terminal deletion unit: Deletes short terminal branches that do not conform to the true principle of gradual tapering at the terminal end;

[0054] The three correction units mentioned above are all driven by the same radius similarity formula, forming a unified radius continuity constraint framework, which can achieve interpretable segment-level correction without deep learning training.

[0055] Label backfilling module: Based on the principle of nearest centerline point, the corrected centerline segment labels are backfilled to each blood vessel voxel in the lung vessel volume to generate a voxel-level three-dimensional segmented label map; this module uses pure geometric nearest neighbor mapping, which has determinism and reproducibility;

[0056] Parameter output module: Outputs structured parameters for each vessel segment, including segment number, start node type, end node type, centerline length, average radius, minimum radius, maximum radius, number of voxels, physical volume, centroid coordinates, and optional anatomical name field.

[0057] The present invention also provides a computer-readable storage medium storing a computer program that executes the described pulmonary vessel segmentation method based on centerline and radius continuity.

[0058] The beneficial technical effects of this invention compared to existing technologies are as follows:

[0059] This invention provides a lung vessel segmentation method, system, and medium based on the continuity of the centerline and radius. Using a three-dimensional binary mask of the lung vessels as input, the lung vessel volume is first compressed into a centerline topology. Then, at the segment level, bifurcation clustering, short segment merging, trunk continuity protection, and pseudo-terminal deletion are performed. Finally, the corrected centerline labels are mapped back to the original vessel volume. This scheme achieves the following effects:

[0060] 1. Bifurcation clustering eliminates false segments: By clustering spatially adjacent bifurcation points and retaining representative bifurcation points, false segmentation caused by skeleton discretization error is fundamentally reduced.

[0061] 2. A unified framework for radius continuity constraints: based on the radius similarity formula. With this as its core, a unified three-step correction process—short fork segment merging, trunk continuity protection, and pseudo-end deletion—is implemented, forming a segment-level correction system based on interpretable rules that can adapt to different data sources without requiring deep learning training.

[0062] 3. Main vessel continuity: By identifying candidate segments of the main vessel and protecting the continuity of the main vessel chain, the probability of the pulmonary aorta and larger pulmonary vessel branches being mistakenly cut into multiple short segments is reduced. Unlike the topology repair of existing technologies (such as CN121903882A), the protection strategy of this invention combines three-dimensional information of radius, length, and node type.

[0063] 4. Automatic cleaning of pseudo-ends: By using the dual determination of end segment length and end-parent radius ratio, noise and boundary burrs can be effectively filtered to prevent interference with end statistics.

[0064] 5. Centerline-Voxel Consistent Output: Segment labels are backfilled into the 3D vessel volume by mapping the nearest centerline point, while outputting segmentation results that are consistent at both the centerline and voxel levels. Unlike existing technologies (such as CN118261895A) that use GNN-driven region growth and backfilling, this scheme is a purely geometric mapping and has deterministic properties.

[0065] 6. Unified structured parameter output: The output contains complete structured results including fields such as segment number, start and end node type, length, radius, volume, centroid and adjacency relationship, which can directly provide a data foundation for pulmonary vascular map construction, thrombus burden assessment, interventional path planning and subsequent training data preparation.

[0066] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description

[0067] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0068] Figure 1 A flowchart of the lung vessel segmentation method based on the continuity of the centerline and radius provided by the present invention;

[0069] Figure 2 This is a system block diagram provided for the present invention. Detailed Implementation

[0070] 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.

[0071] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0072] like Figure 1 As shown, this embodiment provides a lung vessel segmentation method based on the continuity of the centerline and radius. This invention constructs a closed-loop processing scheme for the obtained three-dimensional binary mask of lung vessels, consisting of "preprocessing, skeletonization, topology classification, segment-level correction, voxel-level backfilling, and structured output," thereby improving the continuity, stability, and interpretability of the segmentation results while maintaining the topological expressive power of the vessel tree. The specific scheme is as follows:

[0073] Step S1: Obtain the 3D binary mask for lung vessels

[0074] Specifically, a three-dimensional binary mask of the lung vessels of the object to be processed is obtained. Voxels of the vascular regions are labeled as foreground, and non-vascular regions are labeled as background. This mask can be provided by a pulmonary artery segmentation model, a regular segmentation algorithm, or manually revised segmentation results.

[0075] Furthermore, the three-dimensional binary mask for lung vessels can be derived from CT, CTPA, CBCT, or other three-dimensional medical images, and can be obtained through manual annotation, traditional image processing methods, or deep learning segmentation models.

[0076] Step S2: Pre-processing the mask

[0077] Specifically, the three-dimensional binary mask of the lung vessels is preprocessed to improve connectivity and suppress local noise. The preprocessing procedure is performed in the following order:

[0078] Binarization: Binarizes the input mask into {0,1};

[0079] Closure operation: Morphological closure operation is performed using three-dimensional structuring elements to fill small holes inside blood vessels and bridge tiny breaks caused by noise in the segmentation model;

[0080] Opening operation: Performs morphological opening operation to remove isolated small burrs and monomeric noise;

[0081] Connectivity analysis: Perform three-dimensional connectivity analysis on the processed mask, count the number of voxels in each foreground connected region, and retain only the connected region with the largest number of voxels as the final vascular mask to eliminate scattered false positive regions that are not connected to the main vascular tree.

[0082] Step S3: 3D Skeletonization

[0083] Specifically, the preprocessed 3D binary mask of the lung vessels is subjected to 3D skeletonization, compressing the 3D vessel volume with a certain diameter and thickness into a centerline skeleton with a single-pixel width. The skeletonization algorithm can be the 3D Zhang-Suen thinning algorithm, the topology-preserving skeletonization method based on distance transformation, or other 3D skeletonization algorithms that can generate single-pixel widths while maintaining the original topological connections.

[0084] It should be noted that the segmentation effect of this invention is reasonably dependent on the quality of the input mask: when the pulmonary vascular mask has severe breaks, large areas of missing parts, or complete arteriovenous adhesion, the skeletonization result may be affected, thus affecting the segmentation quality. In such cases, it is recommended to repair the mask or perform arteriovenous separation pretreatment before applying this method. This invention is most effective when processing healthy or mildly diseased pulmonary vessels.

[0085] Step S4: Skeleton point topology classification

[0086] Specifically, the number of skeleton neighbors of each skeleton point in a 26-dimensional neighborhood is counted, and the topology type is determined based on the number of neighbors:

[0087] When the number of skeleton neighbors is ≤ 1, it is determined as an endpoint;

[0088] When the number of skeleton neighbors is 2, it is determined as a path point;

[0089] When the number of skeleton neighbors is greater than 2, it is identified as a branching point.

[0090] Step S5: Bifurcation point clustering correction

[0091] Specifically, since real blood vessel bifurcation regions are often represented as multiple spatially adjacent bifurcation voxels in the voxel framework, this step performs density-based clustering of the bifurcation points and retains one representative bifurcation point in each bifurcation cluster. The remaining bifurcation points are reclassified as path points. This step can converge local bifurcation regions into a single topological node, fundamentally reducing the generation of spurious short segments.

[0092] It should be noted that this invention does not simply perform rigid segmentation of pulmonary vessels based on the original bifurcation points, but further performs bifurcation clustering, trunk protection, and pseudo-terminal cleanup after centerline-level segmentation. Therefore, it can reduce the degree of oversegmentation, improve trunk continuity, and enhance the stability of segmentation results under different cases and different resolution data while maintaining the ability to express the topological structure.

[0093] Step S6: Initial Centerline Segment Tracing

[0094] Specifically, using endpoints and representative bifurcation points as boundary nodes, paths are traced along the skeleton connection relationships to form an initial set of vessel segments. Each initial vessel segment records its segment number, start point, end point, start node type, end node type, and skeleton path point sequence. A vessel segment is retained if the number of path points is at least 3.

[0095] Step S7: Distance Transformation and Radius Calculation

[0096] Specifically, an Euclidean distance transformation is performed on the preprocessed three-dimensional binary mask of the lung vessels to obtain the distance values ​​of each voxel within the vessel region to the nearest background boundary. The distance value of the centerline point in the distance field is used as an approximation of the local vessel radius at that location, and the average radius, minimum radius, and maximum radius of each vessel segment are calculated accordingly.

[0097] For adjacent vascular segments i and j, the following radius similarity formula is used:

[0098]

[0099] in, and Let represent the average radii of the i-th and j-th blood vessel segments, respectively. The closer the value is to 1, the closer the radii of the two blood vessel segments are, and the more likely they belong to the same continuous trunk or the same stable branch structure. This formula provides a unified quantitative basis for the subsequent three-step segment-level correction.

[0100] Step S8: Merge short fork segments

[0101] Specifically, short bifurcation segments with bifurcation points at both ends and a length less than a first length threshold are identified, and adjacent vessel segments sharing the bifurcation point with the short bifurcation segment are found. If the radius similarity between the short bifurcation segment and the adjacent vessel segment is higher than the first radius threshold, the short bifurcation segment is incorporated into the best-matching adjacent vessel segment.

[0102] Step S9: Main trunk continuity protection

[0103] Specifically, to reduce the problem of main blood vessels being accidentally cut by local bifurcation, blood vessel segments with an average radius greater than the main blood vessel radius threshold and bifurcation points at both ends are selected as candidate main blood vessel segments. For candidate main blood vessel segments with a length less than the second length threshold, other candidate main blood vessel segments sharing nodes with them are further searched, and they are merged when the radius similarity requirement is met.

[0104] Step S10: False end deletion

[0105] Specifically, a terminal segment with one end as an endpoint and the other end as a bifurcation point, and a length less than a third length threshold, is identified. This terminal segment is then compared with its parent-adjacent vascular segment connected to the same bifurcation point. If the average radius of this terminal segment is too close to the average radius of its parent-adjacent segment, it indicates that it does not conform to the morphological pattern of a true peripheral blood vessel gradually tapering. In this case, the terminal segment is identified as a pseudo-terminal segment and deleted.

[0106] Step S11: Voxel-level label backfilling

[0107] Specifically, each corrected centerline segment is assigned a unique segment label, and for each foreground voxel in the lung vascular mask, the nearest labeled centerline point is found, and the foreground voxel is labeled with the label value of the vascular segment to which the nearest centerline point belongs, thereby generating a voxel-level three-dimensional segmented label map with the same spatial size as the original mask.

[0108] This invention further backfills centerline-level labels into voxel-level 3D label maps, enabling the segmentation results to be used not only for topology analysis, but also directly for 3D display, volume statistics, doctor interactive annotation, structured database construction, and subsequent artificial intelligence model training.

[0109] In one specific implementation, voxel-level label backfilling is achieved using nearest neighbor mapping based on Euclidean distance transformation:

[0110] First, a sparse label body is constructed on the skeleton coordinate system (each central line voxel carries the segment_id of its respective blood vessel segment).

[0111] Then, an Euclidean distance transformation with indexed return is performed on the label body within the preprocessed mask area (e.g., scipy.ndimage.distance_transform_edt(return_indices=True)) to obtain the nearest skeleton point index corresponding to each blood vessel foreground voxel;

[0112] Finally, each vascular voxel is assigned the segment_id of the nearest skeleton point.

[0113] This process is equivalent to performing Voronoi division based on the skeleton distance within the blood vessel volume, using the centerline points of each segment as seeds. The result is a multi-valued three-dimensional segmented label map that is geometrically aligned with the original image.

[0114] Step S12: Output structured parameters

[0115] Specifically, based on the corrected set of centerline segments and the voxel-level 3D segmented label map, the structured parameters of each vessel segment are output. Output fields include:

[0116] vessel segment number (segment_id);

[0117] Start node type and end node type (start_node_type / end_node_type);

[0118] Centerline length (length_mm, the physical length obtained by taking the modulus of the difference between the centerline point sequence and summing them);

[0119] Average radius, minimum radius, maximum radius (average_radius_mm / min_radius_mm / max_radius_mm);

[0120] Number of voxels and physical volume (volume_voxels / volume_mm³, volume = number of voxels × voxel volume);

[0121] Centroid coordinates (centroid_x / y / z, segment centroid in voxel coordinates);

[0122] Skeleton points;

[0123] An optional anatomical name field (anatomical_name, leave blank for doctors to fill in later).

[0124] In one specific implementation, the data for each patient is output to a separate patient output directory (e.g., output / {patient_id} / ), containing the following files:

[0125] {patient_id}_vessel_segments.nii.gz: Multi-valued 3D segmented label map (0 = background, 1..N = each vessel segment);

[0126] {patient_id}_skeleton.nii.gz: Three-dimensional vascular skeleton diagram;

[0127] {patient_id}_mask_preprocessed.nii.gz: Preprocessed vascular mask;

[0128] {patient_id}_segment_attributes.csv / .xlsx: The vascular segment attribute table for this case.

[0129] Meanwhile, the attribute data of all cases is summarized in the output root directory as an all_patients_combined.csv / .xlsx file, with an additional patient_id column for each record, to facilitate cross-case statistical analysis and batch annotation by doctors. During the entire pipeline's operation, the time consumption and intermediate statistics (number of voxels, number of endpoints, number of bifurcations, and number of vessel segments at each stage) are printed for each step, facilitating monitoring of algorithm behavior.

[0130] This invention also provides a pulmonary vascular segmentation system based on the continuity of the centerline and radius, such as... Figure 2 As shown, the pulmonary vascular three-dimensional automatic segmentation system provided by the present invention can be deployed in workstations, servers, medical image post-processing terminals, or other computing devices with processors and memory, and includes the following functional modules:

[0131] Preprocessing module: Performs binarization, closing operation, opening operation and maximum connected component preservation on the input 3D binary mask of lung vessels to reduce noise, fill local small holes and preserve the main lung vessel tree.

[0132] Skeleton Extraction Module: Performs 3D skeletonization on the preprocessed lung vascular mask to obtain the centerline skeleton of the monomer width, compressing the tubular structure into a skeleton diagram suitable for topology analysis.

[0133] Topology classification module: Counts the number of skeleton neighbors of each skeleton point in the three-dimensional neighborhood and divides the skeleton points into endpoints, path points and branch points.

[0134] Bifurcation Clustering Module: Clusters spatially adjacent bifurcation points, merging multiple discrete bifurcation voxels into representative bifurcation points, thereby reducing spurious segmentation caused by skeleton discretization errors.

[0135] Centerline segment tracing module: Using endpoints and representative bifurcation points as boundary nodes, it traces the centerline along the skeleton connection relationship to form an initial set of vascular segments with a clear start point, end point, and path sequence.

[0136] Radius calculation module: Performs distance transformation on the preprocessed lung vascular mask and uses the distance value at the center line point as a local radius approximation to calculate the average radius, minimum radius, and maximum radius of each vascular segment.

[0137] Segment-level correction module: Based on vessel segment length, node type, radius similarity, and topological adjacency, further corrects the initial vessel segment, including:

[0138] Short bifurcation segment merging unit: Merging blood vessel segments that are both bifurcation points and are relatively short in length;

[0139] Main trunk continuity protection unit: merges unreasonable breaks between candidate segments of the main trunk;

[0140] Pseudo-terminal deletion unit: Deletes short terminal branches that do not conform to the true law of gradual tapering at the terminal.

[0141] All three correction units mentioned above are based on the same radius similarity formula. Driven by this, a unified framework for radius continuity constraints is formed, enabling interpretable segment-level corrections without deep learning training.

[0142] Label backfilling module: Based on the nearest centerline point principle, the corrected centerline segment labels are backfilled to each blood vessel voxel in the lung vessel volume, generating a voxel-level three-dimensional segmented label map. Unlike the region growing backfilling based on GNN inference results in existing technologies (such as CN118261895A), this module uses pure geometric nearest neighbor mapping, which is deterministic and reproducible.

[0143] Parameter output module: Outputs structured parameters for each vessel segment, including segment number, start node type, end node type, centerline length, average radius, minimum radius, maximum radius, number of voxels, physical volume, centroid coordinates, and optional anatomical name field.

[0144] The present invention also provides a computer-readable storage medium storing a computer program that executes the steps of the pulmonary vascular segmentation method based on centerline and radius continuity.

[0145] The present invention also provides the following specific embodiments:

[0146] Example 1: Implementation of Automated Three-Dimensional Segmentation of Pulmonary Vascular System Based on Fixed Parameters

[0147] The method takes a 3D mask dataset of lung vessels (NIfTI format) as input, and the physical spacing of the voxels in the input data is obtained from the image header information (e.g., by reading the NIfTI header using `get_zooms()` via NiBabel). The entire method is implemented in a Python environment, primarily relying on NumPy, SciPy (scipy.ndimage), scikit-image (skimage.morphology.skeletonize_3d), scikit-learn (DBSCAN), NiBabel, and pandas.

[0148] The input mask is first binarized to {0,1}, and then morphological closing operation is performed twice and morphological opening operation is performed once using 3D 6-connected (18 neighborhood) structuration. Subsequently, the number of voxels in each foreground connected region is counted through three-dimensional connected region analysis (scipy.ndimage.label), and only the connected region with the largest number of voxels is retained as the preprocessed lung vascular mask.

[0149] After completing the 3D skeletonization, the adjacency count of all skeleton points in the 26-neighborhood of the 3D system is performed. Skeleton points with ≤ 1 neighbor are determined as endpoints, skeleton points with 2 neighbor are determined as path points, and skeleton points with > 2 neighbor are determined as branch points.

[0150] Next, density-based clustering is performed on the set of bifurcation points, with the cluster radius parameter set to 4.0 voxels, and a representative bifurcation point is retained in each bifurcation cluster. Using the endpoints and representative bifurcation points as boundary nodes, the centerline skeleton is traced to obtain the initial set of vessel segments.

[0151] A Euclidean distance transformation is performed on the preprocessed lung vascular mask, and the distance value corresponding to the centerline point is used as an approximation of the local radius. For the initial set of vascular segments, the following segment-level corrections are performed sequentially:

[0152] Blood vessel segments with bifurcation points at both ends and a length of less than 5.0 mm are considered short bifurcation segments as candidates;

[0153] When the ratio of the average radius of the short bifurcation segment to that of the adjacent vessel segment is not less than 0.55, the best merging object is selected by the comprehensive score S_merge = S_r(i,j) × r_nbr (radius similarity multiplied by the average radius of the adjacent segment), the short bifurcation segment is merged into the adjacent vessel segment, and the start and end point type and radius attributes of the merged vessel segment are refreshed; the above process is iterated for up to 3 rounds until there are no more segments to merge;

[0154] The bifurcation point segment with an average radius of not less than 2.5 mm and a length of less than 8.0 mm is considered as a candidate segment of the main trunk;

[0155] When the ratio of the average radius of a candidate trunk segment to that of an adjacent candidate trunk segment is not less than 0.5, the candidate trunk segments are merged continuously.

[0156] Endpoint segments with a length less than 3.0 mm and whose average radius is greater than 0.70 compared to the maximum average radius of the parent adjacent segment are considered pseudo-endpoint segments and deleted.

[0157] Finally, a unique segment label is assigned to the corrected set of centerline segments, and the segment labels are backfilled to the lung vessel voxels using a nearest centerline point mapping method based on Euclidean distance transformation (equivalent to performing skeleton-based Voronoi partitioning within the vessel volume), resulting in a voxel-level 3D segmented label map geometrically aligned with the original image. Simultaneously, structured results such as segment number, start and end node type, length, average radius, minimum radius, maximum radius, number of voxels, volume, centroid, and number of skeleton points for each vessel segment are output.

[0158] Example 2: Parametric Example Based on Adaptive Adjustment of Voxel Spacing

[0159] In another embodiment, for data from different scanning devices and with different reconstruction resolutions, the clustering radius and length-related thresholds for bifurcation points can be scaled according to the physical spacing of voxels. Specifically, when the overall voxel spacing of the input data increases, the clustering radius parameter and length threshold can be increased proportionally; when the overall voxel spacing of the input data decreases, the parameters can be decreased proportionally to maintain the consistency of bifurcation clustering and short segment recognition in physical space.

[0160] For example, in high-resolution data, a relatively small cluster radius and length threshold can be selected to avoid excessive merging of small true branches; in low-resolution data, a relatively large cluster radius and length threshold can be selected to suppress bifurcation and short-segment fragmentation caused by voxelization errors.

[0161] Example 3: System Deployment Example

[0162] The system of this invention can be deployed on a medical image post-processing workstation or a server-side processing system. The system includes a processor, a memory, and a display terminal. The memory stores program instructions. When the program instructions are executed by the processor, they complete the three-dimensional automatic segmentation of lung vessels and output the generated voxel-level segmentation label map and structured parameter table to a local disk, database, or image post-processing interface.

[0163] The system can output the following files or data objects:

[0164] Three-dimensional segmented labeling of pulmonary vessels;

[0165] Central vascular skeleton diagram of the lungs;

[0166] Pre-treated pulmonary vascular mask;

[0167] A vessel segment attribute table, wherein the attribute table includes CSV, Excel, or database record formats.

[0168] Therefore, this invention provides a lung vessel segmentation method, system, and medium based on the continuity of the centerline and radius. Using a three-dimensional binary mask of the lung vessels as input, it first compresses the lung vessel volume into a centerline topology. Then, at the segment level, it performs bifurcation clustering, short segment merging, trunk continuity protection, and pseudo-end deletion. Finally, it maps the corrected centerline labels back to the original vessel volume, constructing a closed-loop processing scheme of "preprocessing, skeletonization, topology classification, segment-level correction, voxel-level backfilling, and structured output." This maintains the topological expressive power of the vascular tree while... This improves the continuity, stability, and interpretability of segmentation results, enabling the reduction of false segments and short pseudo-segments caused by multiple adjacent bifurcation voxels near the true bifurcation, maintaining the continuity of the main pulmonary vessel trunk and larger branches in the presence of local topological jitter, identifying and deleting pseudo-terminal branches introduced by noise, spurs, or local protrusions, stably mapping centerline-level segmentation results back to three-dimensional vessel volume to form voxel-level segmentation label maps that can be directly used for three-dimensional display and statistical analysis, and outputting vessel segment attribute data that can be used for structured analysis after segmentation is completed.

[0169] Specific examples have been used to illustrate the principles and implementation methods of this invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this invention. Furthermore, those skilled in the art will recognize that, based on the ideas of this invention, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this invention.

Claims

1. A method for segmenting pulmonary vessels based on the continuity of the centerline and radius, characterized in that, Includes the following steps: Step S1: Obtain the three-dimensional binary mask of the lung vessels; Step S2, Preprocessing the mask: Preprocess the three-dimensional binary mask of the lung vessels; Step S3, 3D skeletonization: Perform 3D skeletonization on the preprocessed 3D binary mask of the lung vessels to obtain the centerline skeleton of the monomer width, and compress the tubular structure into a skeleton map; Step S4: Skeleton point topology classification: Count the number of skeleton neighbors of each skeleton point in the three-dimensional neighborhood, and determine the topology type based on the number of neighbors; Step S5, Bifurcation Point Clustering Correction: Cluster the bifurcation points; Step S6, Initial centerline segment tracing: Using the endpoints and the representative bifurcation points as boundary nodes, trace the path along the skeleton connection relationship to form an initial set of blood vessel segments; Step S7, Distance Transformation and Radius Calculation: Perform distance transformation on the preprocessed three-dimensional binary mask of the lung vessels, use the distance value at the center line point as an approximate value of the local vessel radius, and calculate various radii for each vessel segment accordingly; Step S8, Merging of Short Bifurcation Segments: Merging blood vessel segments that are both bifurcation points and are relatively short; Step S9, Main Trunk Continuity Protection: Merge unreasonable breaks between candidate main trunk segments; Step S10, Pseudo-terminal deletion: Delete short terminal branches that do not conform to the true principle of gradual tapering at the terminal; Step S11, Voxel-level label backfilling: Backfill the corrected centerline segment labels to each blood vessel voxel in the lung vessel volume to generate a voxel-level three-dimensional segmented label map. Step S12: Output structured parameters.

2. The pulmonary vascular segmentation method based on centerline and radius continuity according to claim 1, characterized in that, Step S2, preprocessing the mask, specifically including: Binarization: The input three-dimensional binary mask of the lung vessels is binarized into {0,1}; Closing operation: Morphological closing operation is performed using three-dimensional structuring elements; Opening operation: Perform morphological opening operation; Connected component analysis: Three-dimensional connected component analysis is performed on the processed three-dimensional binary mask of lung vessels. The number of voxels in each foreground connected component is counted, and only the connected component with the largest number of voxels is retained as the final vascular mask.

3. The pulmonary vascular segmentation method based on the continuity of the centerline and radius according to claim 1, characterized in that, Step S5, Bifurcation Point Clustering Correction, specifically includes: Density-based clustering is performed on the bifurcation points, and one representative bifurcation point is retained in each bifurcation cluster, while the remaining bifurcation points are reclassified as path points.

4. The pulmonary vascular segmentation method based on centerline and radius continuity according to claim 1, characterized in that, Step S7, distance transformation and radius calculation, specifically includes: Perform Euclidean distance transformation on the preprocessed three-dimensional binary mask of the lung vessels to obtain the distance values ​​of each voxel inside the vessel region to the nearest background boundary; The distance of the centerline point in the distance field is used as an approximate value of the local blood vessel radius at that location, and the average radius, minimum radius, and maximum radius of each blood vessel segment are calculated based on the approximate value of the local blood vessel radius.

5. The pulmonary vascular segmentation method based on the continuity of the centerline and radius according to claim 1, characterized in that, Step S8, merging short forks, specifically includes: Identify short bifurcation segments with bifurcation points at both ends and a length less than a first length threshold, and find adjacent blood vessel segments that share bifurcation points with the short bifurcation segments; If the radius similarity between the short bifurcation segment and the adjacent vessel segment is higher than the first radius threshold, then the short bifurcation segment is incorporated into the best-matching adjacent vessel segment.

6. The pulmonary vascular segmentation method based on centerline and radius continuity according to claim 1, characterized in that, Step S9, Main trunk continuity protection, specifically includes: Vessel segments with an average radius greater than the main trunk radius threshold and bifurcation points at both ends are selected as candidate main trunk segments. For the candidate trunk segments whose length is less than the second length threshold, other candidate trunk segments that share nodes with them are searched and merged based on radius similarity.

7. The pulmonary vascular segmentation method based on the continuity of the centerline and radius according to claim 1, characterized in that, Step S10, pseudo-terminal deletion, specifically includes: Identify a terminal segment with one end as an endpoint and the other end as a bifurcation point, and whose length is less than a third length threshold, and compare the terminal segment with the parent adjacent blood vessel segment connected to the same bifurcation point; If the average radius of the terminal segment is too close to the average radius of the parent adjacent segment, the terminal segment is determined to be a pseudo-terminal segment and deleted.

8. The pulmonary vascular segmentation method based on the continuity of the centerline and radius according to claim 1, characterized in that, Step S11, voxel-level label backfilling, specifically includes: Each corrected centerline segment is assigned a unique segment label, and for each foreground voxel in the 3D binary mask of the lung vessels, the nearest labeled centerline point is found, and the foreground voxel is labeled with the label value of the vessel segment to which the nearest centerline point belongs, thereby generating a voxel-level 3D segmented label map with the same spatial size as the original mask.

9. A pulmonary vascular segmentation system based on the continuity of the centerline and radius, characterized in that, include: Preprocessing module: preprocesses the input 3D binary mask of lung vessels; Skeleton extraction module: Performs 3D skeletonization on the preprocessed 3D binary mask of lung vessels to obtain the centerline skeleton of the monomer width, and compresses the tubular structure into a skeleton map; Topology classification module: Counts the number of skeleton neighbors of each skeleton point in the three-dimensional neighborhood, and determines the topology type based on the number of neighbors; Bifurcation Clustering Module: Clusters spatially adjacent bifurcation points, merging multiple discrete bifurcation voxels into representative bifurcation points; Centerline segment tracking module: Using the endpoints and the representative bifurcation points as boundary nodes, it tracks the centerline along the skeleton connection relationship to form an initial set of blood vessel segments; Radius calculation module: Performs distance transformation on the preprocessed three-dimensional binary mask of the lung vessels, and uses the distance value at the center line point as the local radius approximation value to calculate various radii for each vessel segment; Segment-level correction module: Based on vessel segment length, node type, radius similarity, and topological adjacency, the initial vessel segment is corrected, including: Short bifurcation segment merging unit: Merging blood vessel segments that are both bifurcation points and are relatively short in length; Main trunk continuity protection unit: merges unreasonable breaks between candidate segments of the main trunk; Pseudo-terminal deletion unit: Deletes short terminal branches that do not conform to the true principle of gradual tapering at the terminal end; Label backfilling module: Based on the principle of nearest centerline point, the corrected centerline segment labels are backfilled to each blood vessel voxel in the lung vessel volume to generate a voxel-level three-dimensional segmented label map. Parameter output module: Outputs structured parameters for each blood vessel segment.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that executes the pulmonary vessel segmentation method based on centerline and radius continuity as described in any one of claims 1-8.

Citation Information

Patent Citations

  • Full-automatic liver segmentation method and system based on portal vein tree

    CN118261895A

  • Angiocardiography image intelligent classification method and system

    CN120953718A

  • Method, device and equipment for repairing blood vessel fracture in CAT blood vessel segmentation image

    CN121810536A

  • Vascular repair method and device, storage medium and equipment

    CN121903882A