Methods and electronic devices for generating three-dimensional tubular networks

By generating a backbone network through spline branches and performing seed expansion, spline curve interpolation, and bridging path repair, the problems of incomplete topology and insufficient geometric realism in the generation of tubular networks in the prior art are solved, and global connectivity and geometric smoothness of three-dimensional tubular network generation are achieved.

CN123118911APending Publication Date: 2026-11-17BEIJING SIBO HUIYI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611348244.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-01
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

Existing tubular network generation technologies struggle to maintain global connectivity while ensuring rich and varied topologies. They also fail to adequately represent the natural variations in pipe diameter along the path, making it difficult to effectively balance local density control with uniform overall spatial coverage. Furthermore, they lack effective post-processing and repair mechanisms, resulting in incomplete network structures and poor geometric realism.

Method used

A backbone tubular network is generated using spline branching. Tubular path segments are generated through seed expansion, and spline curve interpolation is performed. Combined with connectivity detection and bridging path repair of isolated subgraphs, a globally connected 3D tubular network is generated.

Benefits of technology

The generated 3D tubular network exhibits complex branching characteristics and high connectivity in its topology while maintaining geometric realism, meeting the data quality and consistency requirements of downstream applications such as medical imaging simulation and blood vessel segmentation training.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123118911A_ABST
    Figure CN123118911A_ABST
Patent Text Reader

Abstract

This application discloses a method and electronic device for generating three-dimensional tubular networks, relating to the field of computer-generated anatomical structures. The method involves generating a backbone tubular network in a target space and placing seeds. Starting from the positions of various seeds, graph nodes are expanded to generate tubular path segments. Spline curve interpolation is performed on these tubular path segments to obtain the three-dimensional tubular network. Connectivity detection is performed on the three-dimensional tubular network, and isolated subgraphs are repaired using bridging paths, resulting in a globally connected three-dimensional tubular network. The backbone tubular network provides the main architecture, the mesh-divided seeds ensure spatial coverage during growth, spline curve interpolation guarantees geometric smoothness, and connectivity detection and bridging paths with lateral perturbations and smooth radius changes generate isolated subgraphs, achieving global connectivity. Bridging paths can naturally integrate into the original network, generating a three-dimensional tubular network that possesses complex branching characteristics in its topology while maintaining high connectivity and geometric realism.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer-generated anatomical structures, and more particularly to a method and electronic device for generating three-dimensional tubular networks. Background Technology

[0002] In fields such as medical image analysis, surgical navigation planning, interventional device tracking, and artificial intelligence algorithm training, high-quality and precisely labeled vascular or tubular network data are crucial foundational resources. This type of data is widely used in scenarios such as training image segmentation models, validating image reconstruction algorithms, hemodynamic simulation, and developing virtual endoscopy systems. Currently, the main approach to acquiring this data relies on the acquisition and manual annotation of real patient clinical scan images. To construct large-scale datasets, it is typically necessary to collect a large number of raw images from different pathological states, anatomical locations, and imaging conditions, and then have professional physicians delineate the vessel centerlines and boundaries layer by layer to form standard ground truth labels. Existing technical approaches usually employ statistical shape model-based methods to derive general structures from a small number of samples, or directly utilize real clinical image data for augmentation processing, aiming to meet the downstream tasks' demands for data diversity and quantity.

[0003] However, in practical applications, existing tubular network generation or utilization technologies still face several long-standing technical bottlenecks. First, the generated tubular networks often struggle to maintain global connectivity while ensuring a rich and varied topology, easily resulting in multiple disconnections or isolated components, leading to incomplete network structures. Second, existing technologies are insufficient in simulating the natural changes in pipe diameter along the path; diameter transitions are often too abrupt or lack physiologically consistent random fluctuations, resulting in poor realism in the generated geometry. Furthermore, when faced with complex three-dimensional spatial distributions, existing technologies struggle to effectively balance density control in local areas with uniform coverage of the overall space, easily leading to local overcrowding or large-scale voids. Finally, due to the lack of effective post-processing repair mechanisms, once a topological break occurs during generation, it is difficult to automatically repair it into a single, connected whole, limiting the direct usability of the generated data in downstream tasks requiring strict topological consistency. Summary of the Invention

[0004] To address the aforementioned issues, this application provides a method, system, and electronic device for generating three-dimensional tubular networks. These solutions address the technical problems in existing tubular network generation or utilization technologies, such as difficulty in maintaining global connectivity while ensuring a rich and varied topology, insufficient representation of natural variations in pipe diameter along the path leading to poor geometric realism, difficulty in effectively balancing local density control with uniform overall spatial coverage, and the lack of an effective post-processing repair mechanism that prevents the automatic restoration of disconnected topologies to a single, connected whole.

[0005] To achieve the above objectives, this application provides the following technical solution:

[0006] The first aspect of this application provides a method for generating a three-dimensional tubular network, comprising:

[0007] Within the target space, a main tubular network is generated using spline branching, and at least two seeds are placed according to the grid division.

[0008] Starting from the position of each seed, based on the space occupancy status and the distribution of existing tubular path segments, the target expansion direction is determined, and graph nodes are expanded along the target expansion direction to generate multiple tubular path segments, wherein the existing tubular path segments at least include the main tubular network;

[0009] Spline curve interpolation is performed on the multiple tubular path segments to generate a three-dimensional tubular network;

[0010] Connectivity detection is performed on the three-dimensional tubular network. In response to the detection of isolated subgraphs, bridging paths are generated to connect the isolated subgraphs to the main connected graph, resulting in a globally connected three-dimensional tubular network. The bridging paths are spline curve segments, and at least one of the starting and ending tangents of the bridging paths has a lateral perturbation, and the inner radius changes smoothly between the inner radii of the two endpoints.

[0011] A second aspect of this application provides an electronic device, including at least one processor and a memory connected to the processor, wherein:

[0012] The memory is used to store computer programs;

[0013] The processor is used to execute the computer program to enable the electronic device to implement the method for generating a three-dimensional tubular network according to the first aspect or any implementation thereof.

[0014] A third aspect of this application provides a computer program product including computer-readable instructions that, when executed on an electronic device, cause the electronic device to implement the method for generating a three-dimensional tubular network according to the first aspect or any implementation thereof.

[0015] A fourth aspect of this application provides a computer storage medium carrying one or more computer programs that, when executed by an electronic device, enable the electronic device to generate a three-dimensional tubular network according to the first aspect or any implementation thereof.

[0016] In summary, this application provides a method and electronic device for generating three-dimensional tubular networks. The method involves generating a backbone tubular network and placing seeds within a target space. Starting from the positions of various seeds, graph nodes are expanded to generate tubular path segments. Spline curve interpolation is performed on these tubular path segments to obtain the three-dimensional tubular network. Connectivity detection is performed on the three-dimensional tubular network, and isolated subgraphs are repaired using bridging paths, resulting in a globally connected three-dimensional tubular network. The backbone tubular network provides the main architecture, the mesh-divided seeds ensure spatial coverage during growth, the spatial state-based directional guidance mechanism avoids local congestion, spline curve interpolation guarantees geometric smoothness, and connectivity detection and the generation of bridging paths with lateral perturbations and smooth radius changes eliminate isolated subgraphs, achieving global connectivity. This method allows bridging paths to naturally integrate into the original network, avoiding disconnections and abrupt transitions. The generated three-dimensional tubular network possesses complex branching characteristics in its topology while maintaining high connectivity and geometric realism, meeting the stringent data quality and consistency requirements of downstream applications such as medical imaging simulation and blood vessel segmentation training. Attached Figure Description

[0017] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale.

[0018] Figure 1 This is a flowchart illustrating a method for generating a three-dimensional tubular network according to an embodiment of this application;

[0019] Figure 2 This is a schematic diagram of a Bessel branch generation trunk tubular network provided in an embodiment of this application;

[0020] Figure 3 This is a schematic diagram of the process of placing at least two seeds according to a grid division provided in an embodiment of this application;

[0021] Figure 4 This is a schematic diagram of a seed placement method provided in an embodiment of this application;

[0022] Figure 5 This is a flowchart illustrating the process of determining the target expansion direction based on the space occupancy status and the distribution of existing tubular path segments, as provided in an embodiment of this application.

[0023] Figure 6 This is a schematic diagram illustrating the determination of a target expansion direction provided in an embodiment of this application;

[0024] Figure 7This is a schematic diagram of the process of expanding graph nodes along the target expansion direction to generate multiple tubular path segments, provided in an embodiment of this application.

[0025] Figure 8 This is a schematic diagram of a graph node expansion process provided in an embodiment of this application;

[0026] Figure 9 This is a schematic diagram of the process of connecting the next graph node to the candidate node with a spline curve segment when there is a candidate node within the connection distance threshold provided in the embodiments of this application;

[0027] Figure 10 This is a schematic diagram of the spline curve segment construction process provided in the embodiments of this application;

[0028] Figure 11 This is a schematic diagram of the process provided in the embodiments of this application, which smoothly transitions the inner radius of the tubular path segment from the current radius to the target radius along the spline curve segment;

[0029] Figure 12 This is a schematic diagram of the radius smooth transition process provided in the embodiments of this application;

[0030] Figure 13 This is a flowchart illustrating the process of performing connectivity detection on a three-dimensional tubular network according to an embodiment of this application. In response to the detection of an isolated subgraph, a bridging path is generated to connect the isolated subgraph to the main connected graph, resulting in a globally connected three-dimensional tubular network.

[0031] Figure 14 This is a schematic diagram of the process of constructing spline curve segments based on target endpoint pairs as bridging paths provided in an embodiment of this application;

[0032] Figure 15 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0033] The embodiments of this application are described below with reference to the accompanying drawings. The terminology used in the implementation section of this application is for explaining specific embodiments only and is not intended to limit the scope of this application.

[0034] The embodiments of this application will now be described with reference to the accompanying drawings. Those skilled in the art will recognize that, with technological advancements and the emergence of new scenarios, the technical solutions provided in the embodiments of this application are equally applicable to similar technical problems.

[0035] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such terms are interchangeable where appropriate; this is merely a way of distinguishing objects with the same attributes in the embodiments of this application. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, so that a process, method, system, product, or apparatus that comprises a series of elements is not necessarily limited to those elements, but may include other elements not explicitly listed or inherent to those processes, methods, products, or apparatuses.

[0036] Reference Figure 1 , Figure 1 This is a flowchart illustrating a method for generating a three-dimensional tubular network according to an embodiment of this application. Figure 1 As shown in the embodiment of this application, a method for generating a three-dimensional tubular network may include steps 101 to 104, which are described in detail below.

[0037] 101. Within the target space, generate a main tubular network using spline branching, and place at least two seeds according to the grid division;

[0038] The target space is a bounded three-dimensional volume region used to hold the generated three-dimensional tubular network. Its geometry can be, for example, a cube, a cuboid, or other arbitrarily defined polyhedral space. For example, the target space is a cubic region with dimensions of 200 mm × 150 mm × 180 mm.

[0039] The backbone tubular network serves as the main skeleton of the entire tubular system. A centerline path is defined by spline curves, and sub-structures are generated along this path through branching operations. The seed position serves as the starting point for graph node expansion; its distribution density and location directly determine the coverage and topological complexity of the generated network.

[0040] The method for generating three-dimensional tubular networks provided in this application can be used to generate any three-dimensional tubular network. This application uses the generation of blood vessels as an example for illustration, but it is not limited to the generation of blood vessels. The same generation concept is also applicable to other branching or tubular structures, such as catheters, airways, root systems, fibers, wires, interventional devices, or synthetic tubular phantoms. Unless otherwise specified in the context, "blood vessels" in this document can also be understood as the generated tubular network structure.

[0041] First, the boundary range of the target space can be defined, such as defining the lower and upper bound coordinates. Then, a spline branching method is used to generate the main tubular network. This process can involve randomly selecting start and end points within the target space to construct Bezier control points and generate curves, or it can involve growing new path segments from existing basic paths using branching logic. For example, in the liver vascular network generation scenario, the start and end points of the main vascular trunk are randomly determined within the target space. The start point is located at the portal vein entrance, and the end points are distributed in the terminal regions of each lobe of the liver. Between the start and end points, spline curves are constructed as the geometric paths of the main vascular trunk by introducing control points with random lateral offsets. Along this spline curve, the vascular diameter is allocated using keyframes: a larger diameter is set at the start point, and a smaller diameter is set at the end point. The diameter of intermediate keyframes is randomly sampled between the start and end point diameters, and the diameters between keyframes are obtained through linear interpolation. Subsequently, branch start points are randomly selected from the existing main vascular paths. The diameter at the branch start point inherits the diameter of the original vascular trunk at that location. The above control point construction and diameter allocation process is repeated to generate secondary branches. This iterative process forms a main tubular network containing branches at various levels.

[0042] In one implementation, a Bezier branching method is used to generate the main tubular network. This process generates multiple vascular curves within a cube centered at the origin. The parameters received include the cube side length, number of curves, minimum curve distance, maximum number of intermediate control points, lateral control point offset range, number of diameter changes, and minimum and maximum internal vessel diameters.

[0043] The first vascular curve is initialized by randomly selecting a start and end point within the cube. If the Euclidean distance between the start and end points is less than the set minimum distance, the end point is resampled to avoid generating a degenerate curve or excessively short branches. Subsequent curves randomly select a point on the existing vascular path as the branch start point, and the vascular diameter at that point is used as the initial diameter of the new branch. The end point is then randomly selected within the cube, and sampling is repeated as necessary until the minimum end-to-end distance requirement is met.

[0044] The generator constructs Bezier control points between the start and end points. First, a local coordinate system is established based on the direction vector from the start to the end point, aligning the first local axis with this direction. Then, the second and third local axes for lateral offset are calculated by performing a cross product with a temporary reference vector. Each intermediate control point has a longitudinal coordinate along the direction from the start to the end point, and a restricted random offset is added in the lateral direction. The control points are clipped to the cube's area and, after being sorted by their longitudinal coordinates, combined with the start and end points to obtain a control polygon that moves along the branching direction while retaining natural lateral curvature.

[0045] Bézier curves are sampled using Bernstein polynomials. Vessel diameters are allocated along the curve using keyframes. The first and last sampling points of the curve serve as keyframes, while internal keyframes are randomly selected based on a set maximum number of diameter changes, with the diameter of each keyframe sampled within an allowable range. For branching curves, the diameter at the branch's starting point is inherited from the original vessel, and the diameters between keyframes are obtained through linear interpolation. Thus, the Bézier branching method can generate a tree-like vascular network, with subsequent branches growing from existing paths and maintaining diameter continuity at the branch's starting point.

[0046] Figure 2 This is a schematic diagram of a Bessel branch-generated backbone tubular network provided in an embodiment of this application. For example... Figure 2 As shown, the starting point 201 and ending point 202 of the main blood vessel are determined in the target space. Control points 203 are constructed between the starting point 201 and ending point 202, and spline curves 204 are generated through control points 203 as the geometric path of the main blood vessel. Subsequently, branch starting points 205 are selected from the main blood vessel path. The diameter at the branch starting point 205 inherits the diameter of the main blood vessel at that location. The process of constructing control points and generating curves is repeated to obtain branch curves 206. Through multiple branch iterations, a tubular network of main blood vessels containing branches at various levels is formed.

[0047] Simultaneously, the target space is discretized into a regular three-dimensional grid, and multiple seeds are placed according to the grid. For example, the target space is divided into 10×8×6 grid cells, each with a size of 20mm×18.75mm×30mm. In this embodiment, a total of 480 seeds are placed.

[0048] The specific process of placing seeds according to the grid will be explained in detail in subsequent embodiments, and will not be described in detail here.

[0049] The backbone tubular network provides the main topological orientation of the system, while the gridded distribution of seeds enables the network to cover the entire space, laying the foundation for subsequent local growth.

[0050] 102. Starting from the position of each seed, based on the space occupancy status and the distribution of existing tubular path segments, determine the target expansion direction, and expand the graph nodes along the target expansion direction to generate multiple tubular path segments. The existing tubular path segments must contain at least the main tubular network.

[0051] The spatial occupancy status reflects the degree to which each region within the target space is occupied by blood vessels, used to assess the congestion or sparseness of the space. The existing tubular path segment distribution is the set of all tubular path segments generated in the space at the current growth moment, including the main tubular network generated in step 101 and other path segments generated during previous growth processes. The target expansion direction is the optimal vector direction guiding the growth of the next graph node from the current seed position. Graph node expansion is the process of moving a preset step size along the target expansion direction, generating new graph nodes, and constructing connecting paths. A tubular path segment consists of two graph nodes and the connecting curve between them, forming the basic module of a three-dimensional tubular network.

[0052] For each seed, the target expansion direction is dynamically calculated based on its surrounding environment. The determination of this direction is based on a comprehensive assessment of the spatial occupancy status and the distribution of existing tubular path segments, with the aim of guiding new path segments to grow into relatively sparse areas and avoiding overcrowding or collisions with existing structures.

[0053] After determining the target expansion direction, the extension is carried out along that direction with the current step size to the next graph node. The relationship between the next graph node and the existing tubular path segment determines whether the extended part should be retained. The part that should not be retained is removed. This process is repeated to iterate and grow multiple tubular path segments. Through this iterative growth process, new tubular path segments are continuously generated from the position of each seed, and a complex tubular network topology is gradually constructed.

[0054] The process of determining the target expansion direction and generating the tubular path segment will be described in detail in subsequent embodiments, and will not be described in detail here.

[0055] 103. Perform spline curve interpolation on multiple tubular path segments to generate a three-dimensional tubular network;

[0056] Spline interpolation is a process of smoothly fitting discrete graph nodes or path segments using spline functions. A 3D tubular network is a complete geometric model composed of multiple tubular path segments that have undergone spline interpolation.

[0057] The spline function can be a cubic Bézier curve, or other functions, but this embodiment does not impose any restrictions.

[0058] After expanding the graph nodes and obtaining a series of discrete tubular path segments, spline curve interpolation is performed on these segments. For each path connecting two graph nodes, control points of the spline curve are calculated based on parameters such as the starting and ending points and tangential direction, generating a smooth curve trajectory. Simultaneously, for different locations on the path, the corresponding inner and outer radii can be calculated to form blood vessels with thickness.

[0059] By performing this operation on all tubular path segments and topologically connecting them, a continuous, smooth 3D tubular network can be generated. This 3D tubular network may contain multiple disconnected subnetworks. This network not only preserves the topological connectivity defined by the graph structure but also obtains a centerline trajectory that conforms to geometric continuity through spline interpolation, providing an accurate geometric basis for subsequent voxelization or meshing processes.

[0060] After generating the tubular path segments, they are converted into a centerline graph. The start and end points of each segment are considered candidate graph nodes. If a candidate endpoint is within the merging tolerance of an existing graph node, the node is reused, and its radius is updated to the larger of the existing radius and the candidate radius; otherwise, a new graph node is created. Each tubular path segment corresponds to an edge in the centerline graph, connecting its start and end nodes. This edge stores the complete sampled polyline and the radius values ​​of each sample point, and can also store the polyline offset, allowing all edge polyline data to be packaged into a continuous array.

[0061] The centerline graph includes arrays of node positions, node radii, edge endpoint indices, edge polyline offsets, edge polyline points, and edge polyline radii. It can be saved in a hierarchical data format, along with metadata such as coordinate system and spatial units. Nodes and edges are stored in separate data groups and compressed. This centerline graph preserves complete topological and geometric information, facilitating graph analysis, path planning, and topology statistics.

[0062] 104. Perform connectivity detection on a three-dimensional tubular network. In response to the detection of isolated subgraphs, generate bridging paths to connect the isolated subgraphs with the main connected graph to obtain a globally connected three-dimensional tubular network. The bridging paths are spline curve segments. At least one of the starting and ending tangents of the bridging paths has a lateral perturbation, and the inner radius changes smoothly between the inner radii of the two endpoints.

[0063] Connectivity detection is the process of performing a graph traversal on a generated 3D tubular network to identify the existence of independent, unconnected components within the network. This graph traversal can employ a traversal algorithm that starts from any graph node, visits all reachable nodes, and marks each node as a connected component. This process is repeated until all graph nodes are marked. The traversal algorithm can use either depth-first search or breadth-first search.

[0064] The main connected graph is the connected component in the 3D tubular network that contains the most tubular path segments, and it usually represents the main part of the network. An isolated subgraph can be an independent connected component in the 3D tubular network that has no path connection to the main connected graph. For example, a 3D tubular network is detected to contain 1 main connected graph and 3 isolated subgraphs. The main connected graph contains 286 tubular path segments, and the 3 isolated subgraphs contain 12, 8, and 5 tubular path segments, respectively.

[0065] A bridging path is a newly added tubular path segment used to connect isolated subgraphs to the main connected graph. Its function is to repair topological breaks in the network and achieve global connectivity. Lateral perturbation is a random offset perpendicular to the original direction superimposed on the initial or final tangential direction of the spline curve, used to increase the natural curvature of the path. Smooth changes in the inner radius can be achieved by gradually transitioning the diameter of the bridging path from one end to the other, avoiding abrupt geometric features.

[0066] The generated 3D tubular network undergoes connectivity traversal detection, identifying all connected components using graph algorithms. If isolated subgraphs are detected outside the main connected graph, a bridging repair process is initiated. For each isolated subgraph, a spline curve segment is constructed as a bridging path connecting it to the main connected graph. To make the bridging path appear more natural, at least one of the starting and ending tangents is subjected to a lateral perturbation during spline curve segment construction, and the inner radius of the bridging path is smoothly varied between its two endpoints, for example, by generating a series of radii along the path using linear or nonlinear interpolation. The generated bridging path is then added to the network, connecting the isolated subgraphs to the main connected graph. This process is repeated until all isolated subgraphs are connected, resulting in a globally connected 3D tubular network. This connectivity detection and bridging repair mechanism effectively solves the network breakage problem that may occur during the generation process, ensuring that the final output 3D tubular network is topologically unified.

[0067] In practice, after further converting the generated tubular path segments into a 3D tubular mesh, the system receives the skeleton points and corresponding diameters, determines the local path direction at each location based on adjacent skeleton points, and updates the local coordinate frame to match the cross-sectional direction with the path direction. Then, using the local radius as the scale, a ring of vertices is generated around each skeleton point. Adjacent vertex rings are connected by quadrilateral faces to form a continuous tubular surface, and end caps can also be generated at the beginning and end vertex rings. The resulting mesh is exported in a format suitable for rendering, projection simulation, or geometric analysis. The tubular mesh representation is convenient for direct use in 3D visualization, collision detection, and integration with rendering engines.

[0068] Tubular path segments can also be rasterized into dense three-dimensional voxel data, which can represent vascular attenuation, occupied area, vascular wall geometry or other label information, and saved as a three-dimensional image file, or used as input for projection simulation, reconstruction algorithms or machine learning processes.

[0069] Volume data is defined by the lower spatial boundary, upper spatial boundary, and voxel shape. Voxel size is calculated from the boundary range and the number of voxels. For each tubular path segment, the generator samples along the path between adjacent centerline points, with the sampling step size set as a portion of the minimum voxel size, while not less than the specified minimum physical step size. At each sampling location, the corresponding outer radius is obtained by interpolation based on the radii of adjacent centerline points. For each sampling point, the corresponding spherical neighborhood is determined based on the physical radius and voxel size. The physical coordinates of each voxel within this local voxel block are calculated, and it is determined whether the distance from the voxel to the sampling centerline point is less than or equal to the radius. Voxels that meet the condition are written with attenuation or occupancy values. Overlapping regions are updated using the maximum value method.

[0070] In this embodiment, a backbone tubular network is generated in the target space and seeds are placed. Starting from the positions of various seeds, graph nodes are expanded to generate tubular path segments. Spline curve interpolation is performed on the tubular path segments to obtain a 3D tubular network. Connectivity detection is performed on the 3D tubular network, and isolated subgraphs are repaired through bridging paths, resulting in a globally connected 3D tubular network. The backbone tubular network provides the main architecture, the mesh-divided seeds ensure spatial coverage during growth, the spatial state-based directional guidance mechanism avoids local congestion, spline curve interpolation ensures geometric smoothness, and connectivity detection and the generation of bridging paths with lateral perturbations and smooth radius changes eliminate isolated subgraphs, achieving global connectivity. This method allows bridging paths to naturally integrate into the original network, avoiding disconnections and abrupt transitions. The resulting 3D tubular network possesses complex branching characteristics in its topology while maintaining high connectivity and geometric realism, meeting the stringent data quality and consistency requirements of downstream applications such as medical imaging simulation and blood vessel segmentation training.

[0071] Figure 3 This is a flowchart illustrating the process of placing at least two seeds according to a grid division provided in this application embodiment. It may include steps 301 to 303, which are described in detail below.

[0072] 301. Divide the target space into a three-dimensional mesh, and generate an initial seed position at the center of each mesh cell;

[0073] The target space is structurally divided according to the set grid spacing parameters to construct a three-dimensional mesh covering the entire area to be generated. This three-dimensional mesh is composed of multiple cubic grid cells of a defined size. The grid spacing must be selected to match the desired density of the target vascular network, for example, set to 80 mm, to ensure that only a limited number of branches grow within each grid cell.

[0074] For each individual mesh cell, its geometric center coordinates are calculated to generate an initial seed position, which represents the average position of the mesh cell in the target space. By synchronously deploying the initial seed positions at the centers of all mesh cells, a uniform distribution of seeds at the macroscopic level can be ensured, thereby ensuring that the subsequently generated 3D tubular network can uniformly cover the entire target space and avoid large blank areas or overly concentrated local areas.

[0075] For example, the target space is a cubic region with dimensions of 200mm × 150mm × 180mm. This target space is uniformly divided into a three-dimensional mesh, for example, into 10 × 8 × 6 mesh cells, each with dimensions of 20mm × 18.75mm × 30mm. An initial seed position is generated at the center of each mesh cell, representing the three-dimensional coordinates of the geometric center of that mesh cell. This results in 480 initial seed positions, which are distributed in a regular array within the target space.

[0076] 302. After applying a jitter perturbation to the initial seed position, the target seed position is obtained, and each target seed position is constrained within the target space;

[0077] To incorporate the anatomical variability unique to biological tissues, a spatial jittering operation is performed based on the initial seed position. This jittering process does not involve completely random position sampling within the target space, but rather a restricted random offset centered on the initial seed position of each grid cell within a preset perturbation range.

[0078] The perturbation range can be set to a spherical or cubic neighborhood of ±30% of the grid spacing (i.e., ±0.3 × grid spacing). By randomly selecting an offset vector within this range, the initial seed position is translated and transformed to obtain the target seed position.

[0079] This constrained jittering method retains the spatial coverage advantage of grid division while introducing sufficient randomness locally, eliminating the mechanical feeling of strictly aligning the seed position with the grid center, making the generated vascular network branches more natural.

[0080] After generating the target seed locations, a boundary constraint check is performed to ensure that the coordinates of each target seed location are within the physical boundary of the target space. For target seed locations that exceed the target space boundary due to jitter offset, their locations are either cropped to the nearest boundary point or resampled randomly to ensure that all valid growth starting points are within the predefined simulation volume.

[0081] 303. Place the seed at the target seed location.

[0082] Each seed occupies one target seed position. This completes the placement of seeds within the target space; these seeds will serve as the starting points for subsequent graph node expansion.

[0083] In one possible implementation, random seed positions are obtained by uniformly and randomly sampling within the target space, and the number of these random seed positions is less than the number of target seeds.

[0084] Based on the target seed location, multiple random seed locations are obtained by uniformly and randomly sampling within the target space. These random seed locations do not depend on grid division but are completely randomly distributed within the target space to supplement areas that grid seeds may not cover, thereby further improving the spatial coverage diversity of seeds.

[0085] For example, there are 480 target seed positions and 120 random seed positions.

[0086] Figure 4 This is a schematic diagram of a seed placement method provided in an embodiment of this application. The diagram shows a plane where the target space is divided into regular grid cells 401. An initial seed position 402 (represented by hollow dots in the diagram) is generated at the center of each grid cell 401. After applying a jitter perturbation to each initial seed position 402, a target seed position 403 (represented by solid dots in the diagram) is obtained. Figure 4 As can be seen, the initial seed positions 402 are distributed in a regular array, while the target seed positions 403 are randomly offset near the initial seed positions 402, forming a distribution pattern that is both regular and random. Random seed positions 404 (represented by triangles in the figure) are obtained by uniformly and randomly sampling within the target space. The number of these random seed positions 404 is less than the number of target seed positions 403. The random seed positions 404 are independent of grid division and are completely randomly distributed within the target space, supplementing areas that grid seeds may not cover. Simultaneously, all target seed positions 403 and random seed positions 404 are located within the boundary 405 of the target space, with no instances of exceeding the boundary. Finally, seeds are placed on these target seed positions 403 and random seed positions 404, completing the seed placement.

[0087] In this embodiment, the target space is divided into a three-dimensional grid, and an initial seed position is generated at the center of each grid cell. Then, a jitter perturbation is applied to the initial seed positions to obtain the target seed positions. Each target seed position is constrained within the target space, and the seeds are placed at these target seed positions. Grid division ensures uniform spatial coverage of the seeds, avoiding the problem of too many or too few seeds in local areas. The jitter perturbation breaks the grid artifacts that may be caused by regular arrangement, making the seed distribution closer to a natural random state. Boundary constraints ensure that all seeds are within the effective area, providing a reliable starting position for subsequent graph node expansion, thus constructing a seed set that satisfies both global coverage requirements and possesses local random characteristics. This method can introduce appropriate randomness while ensuring uniform spatial coverage, improving the diversity and realism of the generated network.

[0088] Figure 5 This is a flowchart illustrating the process of determining the target expansion direction based on the space occupancy status and the distribution of existing tubular path segments, as provided in this application embodiment. It may include steps 501 to 503, which are described in detail below.

[0089] 501. Based on the local node density of the existing tubular path segments around the current expansion node, the local congestion index is evaluated.

[0090] The local congestion index is used to quantify the density of existing blood vessels in the neighborhood of the current expansion node, reflecting the spatial competition relationship at the microscale.

[0091] One approach is to first determine the existing tubular path segments around the current expansion node, and then use this density to assess the local congestion index.

[0092] This local congestion index is positively correlated with the degree of congestion in the local environment surrounding the current expansion node. The higher the value of the local congestion index, the more congested the local environment around the current node. By using this local congestion index, the local microenvironment in which the current node is located can be identified, providing a basis for decision-making to avoid neighboring blood vessels.

[0093] The local congestion index is evaluated based on the local node density of the existing tubular path segments around the current expansion node. This includes: defining a preset neighborhood range centered on the current expansion node and counting the number of nodes in the existing tubular path segments within the neighborhood range; calculating the local node density based on the number of nodes in the neighborhood and the volume of the neighborhood space; and mapping the local node density to the local congestion index, which is positively correlated with the local node density.

[0094] Once the current expansion node is determined, a spherical or cubic detection region is constructed centered on that node as a preset neighborhood range. This preset neighborhood range is used to capture the microscopic topological distribution around the node, and its radius or side length can be set, for example, according to the desired density of the vascular network or a preset minimum segment length.

[0095] The existing set of tubular path segments is traversed, and it is checked whether the sampling nodes or control nodes on each segment fall within the preset neighborhood range. The nodes falling within the range are counted to obtain the number of nodes in the neighborhood. The number of nodes in the neighborhood directly reflects the degree of blood vessel aggregation around the current node.

[0096] Calculate the spatial volume encompassed by a predefined neighborhood. For example, for a spherical neighborhood, the volume is 4 / 3 (πr). 3 For example, for a cube neighborhood, the volume is a cube with a side length of 1.

[0097] The local node density is obtained by dividing the number of nodes in the neighborhood by the volume of that neighborhood space. This local node density eliminates the influence of changes in neighborhood size and is a standardized spatial distribution characteristic value used to objectively measure the density of vascular nodes per unit space.

[0098] To transform the calculated physical density into a preference index usable for directional decisions, a mapping relationship between local node density and local congestion index is established. This mapping relationship is configured as a positive correlation function, meaning that the higher the local node density, the larger the corresponding local congestion index value, indicating that the area is more congested; conversely, the lower the local node density, the smaller the local congestion index value.

[0099] The mapping process can be, for example, linear proportional mapping, piecewise function mapping, or exponential function mapping, and the specific form of the mapping function can be configured according to the actual morphological requirements of angiogenesis.

[0100] 502. Based on the global space occupancy distribution within the target space, the global sparsity index is evaluated and obtained;

[0101] The global sparsity index is used to quantify the resource occupancy of each macro-region within the target space, reflecting the overall filling status of the space.

[0102] This involves first determining the global spatial occupancy distribution within the current target space, and then using this global spatial occupancy distribution to evaluate and obtain a global sparsity index. This macroscopically identifies uncovered void regions, thereby driving the tubular network to extend into these regions and improving the uniformity of spatial coverage.

[0103] The process involves evaluating a global sparsity index based on the global spatial occupancy distribution within the target space. This includes: dividing the target space into several evaluation sub-grids, statistically analyzing the occupancy of tubular path segments within each evaluation sub-grid, and generating a global occupancy grid map; reading the occupancy degree of the target sub-grid for the candidate direction to be evaluated; and mapping the occupancy degree of the sub-grid to a global sparsity index, with the global sparsity index being negatively correlated with the occupancy degree of the sub-grid.

[0104] The target space (typically a cube or cuboid region defined by a bounding box) to be used to generate the 3D tubular network is uniformly discretized in three dimensions, dividing it into multiple evaluation sub-mesh of the same size. The evaluation sub-mesh can be divided uniformly or non-uniformly based on the importance of the spatial region.

[0105] For example, the granularity of the division can be set to 5×4×3 rectangular subgrids covering the entire space, or it can be 10×10×10 rectangular subgrids.

[0106] The existing tubular path segments are traversed, and the number of nodes, path length, or volume percentage falling into each evaluation sub-grid is counted. This data is used as the occupancy data for that sub-grid, thereby constructing a global occupancy grid map reflecting the distribution of blood vessels throughout the target space. This global occupancy grid map is a three-dimensional data structure that records the degree to which each evaluation sub-grid is occupied by blood vessels.

[0107] When selecting a direction, several candidate expansion directions are generated starting from the current expansion node (e.g., uniform sampling on a unit sphere). For each candidate direction, the evaluation sub-grid, i.e., the target sub-grid, is calculated at a certain distance in front of its ray. By querying the previously generated global occupancy grid map, the occupancy value corresponding to the target sub-grid is quickly read, thereby characterizing the spatial fullness of the region pointed to by the candidate direction.

[0108] To guide blood vessel growth towards insufficiently filled areas, the occupancy of sub-grids is converted into a global sparsity index. This mapping is configured as a negative correlation function: the higher the occupancy of a sub-grid (indicating denser blood vessels in that region), the lower the corresponding global sparsity index value, indicating less sparseness in that direction; conversely, the lower the occupancy of a sub-grid, the higher the global sparsity index value, indicating that the sparse region pointed to in that direction is more worthwhile to expand. This negative correlation mapping effectively identifies and favors growth directions that can fill spatial gaps, thereby avoiding excessive stacking of blood vessels in local areas.

[0109] Figure 6This is a schematic diagram illustrating the determination of a target expansion direction according to an embodiment of this application. The diagram shows a plane, with the current expansion node 601 located within the target space. A neighborhood range 602 (represented by a dashed circle in the diagram) is defined centered on the current expansion node 601. The number of nodes in the existing tubular path segments 603 within the neighborhood range 602 is counted, and the local node density is calculated based on the volume of the neighborhood range 602, which is then mapped to a local congestion index. Simultaneously, the target space is divided into multiple evaluation sub-grids 604 (represented by dashed rectangular grids in the diagram). Each sub-grid records the occupancy degree of its internal tubular path segments, forming a global occupancy grid map. When evaluating a candidate direction, the occupancy degree of the target sub-grid 605 it points to is read and mapped to a global sparsity index. The local congestion index and the global sparsity index are used together to determine the target expansion direction (as shown by the solid arrows).

[0110] The determination of local crowding and global sparsity indices is based on an evaluation method that combines micro-neighborhood statistics and macro-grid occupancy, quantifying the crowding and sparsity of space from both local and global dimensions. This dual-indicator approach allows the directional heuristic rules to avoid local collisions while also ensuring the uniformity of the overall spatial distribution, thereby guaranteeing that the final generated 3D tubular network has a more natural topological structure and good spatial coverage.

[0111] 503. Determine the target expansion direction based on local congestion index and global sparsity index.

[0112] The determined target expansion direction is the final growth vector that takes into account both micro-avoidance and macro-exploration.

[0113] Based on the local crowding index, multiple candidate directions are generated on a unit sphere. For each candidate direction, the aforementioned local crowding score is calculated, and the direction with the lowest score is selected as the locally optimal direction, representing the least crowded direction. Combining this with the global sparsity index, if a globally sparse region exists that meets a distance condition (e.g., the distance between the center of the evaluation sub-grid and the current node is greater than a preset minimum distance), the direction pointing towards the center of this sparse region is set as the global guiding direction. Finally, the locally optimal direction and the global guiding direction are weighted and mixed. The direction with the best overall score is selected and then smoothly merged with the growth direction from the previous time step to obtain the mixed target direction vector. This target expansion direction tends to avoid locally crowded regions and head towards globally sparse regions, thereby achieving a balanced distribution of space occupancy.

[0114] In this embodiment, a local congestion index is obtained by evaluating the local node density of existing tubular path segments around the current expansion node, and a global sparsity index is obtained by evaluating the global spatial occupancy distribution within the target space. The target expansion direction is then determined based on both the local congestion index and the global sparsity index. The local congestion index reflects the density near the current expansion node, preventing newly generated path segments from being overly concentrated in already congested areas. The global sparsity index reflects the overall occupancy of each region within the target space, guiding path segments to grow towards less covered areas. The combination of these two indices allows the expansion direction to adapt to both the local environment and the overall spatial distribution, thereby generating a uniformly distributed and topologically sound tubular network.

[0115] Figure 7 This is a flowchart illustrating the process of expanding graph nodes along the target expansion direction to generate multiple tubular path segments, provided in an embodiment of this application. It may include steps 701 to 704, which are described in detail below.

[0116] 701. Extend along the target expansion direction to the next graph node with the current step size;

[0117] In each iteration of graph growth, starting from the current expansion node, spatial extension is performed according to the determined target expansion direction.

[0118] The current step size, as a pre-set growth parameter, controls the displacement of a single expansion, and its value directly determines the particle size of the generated tubular path segments. For example, this step size is set to 3 mm.

[0119] The displacement vector is obtained by multiplying the target expansion direction vector by the current step size, and then superimposed on the coordinates of the current node. This results in a new spatial coordinate point in three-dimensional space, which is the next graph node. This next graph node is the target position of this expansion operation.

[0120] The vector-based extension method ensures the continuity and directional consistency of path growth, enabling the node sequence to advance strictly along the desired sparse region or the direction guided by the main trunk.

[0121] 702. Detect the distance between the node in the next graph and each candidate node on the existing tubular path segment;

[0122] After generating a new node in the next graph, it is necessary to determine the adjacency relationship between the new node and the existing network structure to decide whether to extend the node as an isolated endpoint or to connect it to the existing network.

[0123] Existing tubular pathway segments encompass all vessels generated in previous growth steps, including the main tubular network and other branches that have formed; candidate nodes refer to endpoints, inflection points, or pre-marked connectable key points on these existing tubular pathway segments.

[0124] After obtaining the location of the next node in the graph, all nodes on the existing tubular path segment are traversed, and these nodes are selected as candidate nodes. The Euclidean distance between the next node and each candidate node in the three-dimensional coordinate system is calculated one by one to quantify spatial proximity. This distance detection process simulates the physiological characteristics of finding and connecting neighboring blood vessels in biological angiogenesis, providing a quantitative basis for subsequent topology merging.

[0125] 703. When there are candidate nodes within the connection distance threshold, connect the next graph node to the candidate node with a spline curve segment, and make the inner radius of the tubular path segment smoothly transition from the current radius to the target radius along the spline curve segment;

[0126] A connection distance threshold is preset. This threshold serves as a critical parameter for determining whether two nodes can establish a valid connection, and is typically set based on the smallest blood vessel diameter or a preset tolerance range. For example, it could be set to 5mm.

[0127] If at least one candidate node is detected to be less than or equal to a preset connection distance threshold with the next node, then the two nodes are considered to be able to be connected, triggering a branching operation. At this point, the branching does not continue to extend outward, but instead constructs a new tubular path segment between the next node (as the starting point of the new path segment) and the selected candidate node (as the ending point).

[0128] To simulate the smooth, tortuous natural morphology of real blood vessels, this connection segment is generated using spline curve segments. Its shape is determined by the coordinates of the start and end points and the tangential vector. The ending tangential vector can be based on the original direction at the candidate node or by introducing lateral perturbations to increase morphological randomness. Simultaneously, to ensure geometric continuity and the rationality of hydrodynamic properties, radius interpolation is performed: the inner radius along the spline curve segment follows linear or nonlinear interpolation logic, gradually transitioning from the current radius at the beginning of the path segment (i.e., the growth radius corresponding to the node in the next image) to the target radius at the end of the path segment (i.e., the radius of the existing blood vessel at the candidate node). This smooth radius transition avoids abrupt diameter step changes at the connection points, resulting in a smooth geometric morphology of the newly generated network.

[0129] 704. When there are no candidate nodes within the connection distance threshold, add the next graph node to the existing tubular path segment set and continue to expand the graph nodes along the updated target expansion direction.

[0130] If the distance between all candidate nodes and the next graph node exceeds the connection distance threshold, it indicates that there are no existing structures that can be connected near the current growth point. In this case, the currently generated next graph node is treated as a new free endpoint and added to the existing set of tubular path segments, thereby updating the coverage of the network structure. Subsequently, the growth process enters the next iteration, re-evaluating and calculating the updated target expansion direction based on the current environmental parameters.

[0131] The update process refers to the directional heuristic rules in the aforementioned embodiments and dynamically adjusts them by combining local crowding and global sparsity indices.

[0132] After determining the new expansion direction, the next graph node is used as the new current expansion node. The operations of extension, detection, judgment and connection or extension are repeated until the termination condition is met (such as reaching the boundary space or reaching the maximum growth step).

[0133] This cyclical process of growth, detection, connection / extension enables the three-dimensional tubular network to automatically fill empty spaces and bridge adjacent structures, thus forming a dense and interconnected three-dimensional tubular network.

[0134] By performing adjacency detection and radius adaptive transition in real time during the growth phase, the transformation from discrete node distribution to a continuous and smooth tubular network is achieved. The spline curve segment connection method enables a smooth geometric connection between the new path and the existing structure, while the smooth transition of the inner radius eliminates the geometric discontinuity at the connection point. The combination of these two factors allows the generated 3D tubular network to maintain topological connectivity while possessing a highly realistic geometric shape and physical coherence.

[0135] Figure 8 This is a schematic diagram of a graph node expansion process provided in an embodiment of this application. The current expansion node 801 is located at the end of an existing tubular path segment 802. It extends along the target expansion direction with the current step size to the next graph node 803 / 806. The distance between the next graph node 803 and each candidate node 804 on the existing tubular path segment 802 is detected. Two cases are shown in the figure: In the first case, the distance between the next graph node 803 and the candidate node 804 is less than the connection distance threshold. In this case, the next graph node 803 is connected to the candidate node 804 by a spline curve segment 805 to form a new tubular path segment (as shown by the dashed line), and the inner radius smoothly transitions from the current radius to the target radius along the spline curve segment 806. In the second case, the distance between the next graph node 806 and all candidate nodes is greater than the connection distance threshold. In this case, the next graph node 806 is added to the existing tubular path segment set, and expansion continues along the updated target expansion direction.

[0136] In this embodiment, by extending along the target expansion direction to the next graph node with the current step size, the distance between the next graph node and each candidate node on the existing tubular path segment is detected. When a candidate node exists within the connection distance threshold, it is connected by a spline curve segment with a smooth transition of the inner radius. When no candidate node exists, the next graph node is added to the existing set and the expansion continues along the updated direction. During the graph node expansion process, continuous detection is performed, and the decision to connect or continue extending is made based on the detection results. This allows newly generated path segments to automatically connect when they encounter adjacent structures and continue to grow forward when there are no adjacent structures, achieving network structure merging while maintaining growth continuity. The spline curve segment connection method allows the new path to smoothly connect with the existing structure geometrically, and the smooth transition of the inner radius avoids abrupt diameter changes at the connection point. The combination of these two methods allows the generated 3D tubular network to maintain good geometric continuity and morphological realism while possessing a complex branching structure.

[0137] Figure 9 This is a schematic diagram of the process of connecting the next graph node to the candidate node with a spline curve segment when there is a candidate node within the connection distance threshold provided in the embodiments of this application. It may include steps 901 to 904, which are described in detail below.

[0138] 901. Obtain the first position and first tangent of the node in the next graph, and the second position and second tangent of the candidate node;

[0139] During graph growth, when the distance between the next graph node and a candidate node on an existing tubular path segment falls within a preset connection distance threshold range, the geometric elements required to construct the connection segment are extracted.

[0140] The spatial coordinates of the next graph node can be read from the current growth state and the generated graph structure data as the first position, and the current direction vector of the node on the growth path can be extracted as the first tangent. In addition, the spatial coordinates of the selected candidate node can be read as the second position, and the tangent direction of the candidate node on the existing tubular path segment can be extracted as the second tangent.

[0141] The first and second positions define the start and end boundaries of the connection segment in three-dimensional space, while the first and second tangents are used to constrain the direction of the spline curve at the two endpoints, thereby ensuring that the subsequently generated connection segments maintain geometric continuity with the overall network.

[0142] 902. Select a random vector and orthogonalize the first tangent and the second tangent respectively to obtain the first perturbation direction perpendicular to the first tangent and the second perturbation direction perpendicular to the second tangent;

[0143] To ensure that the generated tubular path has a natural curved shape and prevents rigid straight lines or arcs in a single plane, a perturbation is applied to the tangential direction using a random vector.

[0144] A random vector is selected in three-dimensional space, for example, by uniformly sampling points on a unit sphere. A vector orthogonalization algorithm can then be used to perform operations on this random vector with the first and second tangents.

[0145] Specifically, for the first tangential direction, a vector perpendicular to it is calculated and defined as the first perturbation direction; for the second tangential direction, a vector perpendicular to it is calculated and defined as the second perturbation direction.

[0146] This orthogonalization process ensures that the disturbance direction is strictly within the normal plane of the endpoint tangent, so that the disturbance only changes the bending direction of the curve without introducing unnecessary offset in the original tangential direction, thereby maintaining the logical coherence of path growth.

[0147] There are several ways to perform orthogonalization, such as through cross product operations or Gram-Schmidt orthogonalization, as long as a direction perpendicular to the original tangential direction can be obtained. This perturbation direction provides a randomized offset reference for subsequent tangential adjustments.

[0148] 903. Normalize the first tangential direction by combining it with the first disturbance direction at a preset ratio to obtain the first disturbance tangential direction; normalize the second tangential direction by combining it with the second disturbance direction at a preset ratio to obtain the second disturbance tangential direction.

[0149] After determining the vertical perturbation direction, the original tangential direction is fused with the perturbation direction to generate an actual tangential direction with controlled random bending characteristics.

[0150] Specifically, a first tangential direction is linearly combined with a first perturbation direction, the weight of which is controlled by a preset proportional coefficient. Similarly, a second tangential direction is linearly combined with a second perturbation direction of a preset proportion. This coefficient can be set according to the desired degree of vascular curvature. The size of the preset proportion controls the perturbation intensity; the larger the proportion, the greater the deviation of the perturbation tangential direction from the original tangential direction, and the greater the curvature of the curve.

[0151] The preset scaling factor can be set between 0.1 and 0.3 to avoid excessive distortion.

[0152] To maintain the unit length characteristics of the tangential direction and facilitate subsequent curve calculations, the two combined vectors are normalized to obtain the first and second perturbation tangential directions. The resulting final tangential direction retains the basic trend of the original growth direction while incorporating a definite but random lateral deflection, allowing the connecting segment to exhibit a natural and non-repetitive three-dimensional bending shape.

[0153] 904. Based on the first position, the second position and the corresponding perturbation tangent, construct spline curve segments, and connect the nodes of the next graph to the candidate nodes.

[0154] Based on the determined endpoint locations and the perturbed tangent, a spline curve construction operation is performed to generate physical connections.

[0155] The first position and the first perturbation tangent are used as the starting constraints of the spline curve, and the second position and the second perturbation tangent are used as the ending constraints. Using a spline interpolation algorithm, under the premise of fixed endpoint positions and guiding endpoint tangents, the sequence of curve control points or interpolation points located between the two endpoints is calculated.

[0156] The generated spline curve segments pass sequentially through the control points or interpolation point sequence of the curve, geometrically connecting the nodes of the next graph with the candidate nodes to form a continuous tubular path segment.

[0157] The spline interpolation algorithm can use cubic Bézier curves or B-spline curves, etc., and this application does not impose any restrictions.

[0158] Because the tangential direction has undergone lateral perturbation, the curve segment connecting the first and second positions has a natural curvature, which enhances the geometric realism and visual complexity of the generated three-dimensional tubular network.

[0159] Figure 10This is a schematic diagram of the spline curve segment construction process provided in this application embodiment. The first position and first tangent of node 1001 (indicated by solid arrows), and the second position and second tangent of candidate node 1002 (indicated by solid arrows) are obtained. A random vector is selected and orthogonalized with the first and second tangents respectively to obtain a first disturbance direction perpendicular to the first tangent (indicated by dashed arrows) and a second disturbance direction perpendicular to the second tangent (indicated by dashed arrows). The first tangent is combined with the first disturbance direction of a preset ratio and normalized to obtain the first disturbance tangent (indicated by dotted arrows); the second tangent is combined with the second disturbance direction of a preset ratio and normalized to obtain the second disturbance tangent (indicated by dotted arrows). Based on the first position, second position, first disturbance tangent, and second disturbance tangent, spline curve segment 1003 is constructed. This spline curve segment 1003 connects node 1001 in the next figure to candidate node 1002, presenting a natural curved shape.

[0160] In this embodiment, the positions and tangents of the next node and candidate nodes are obtained. A random vector is selected to orthogonalize the tangent to obtain the perturbation direction. The tangent and perturbation direction are combined and normalized to obtain the perturbation tangent. Then, spline curve segments are constructed based on the positions and perturbation tangents. Randomized lateral perturbations are introduced into the start and end tangents of the spline curve segments, making the connection path no longer a simple straight line or fixed curve, but exhibiting a random natural curvature. This simulates the natural deflection of real blood vessels caused by the influence of the local environment during growth, improving the geometric realism and diversity of the generated tubular network.

[0161] Figure 11 This is a flowchart illustrating how the inner radius of a tubular path segment smoothly transitions from its current radius to a target radius along the spline curve segment, as provided in this application embodiment. It may include steps 1101 to 1105, which are described in detail below.

[0162] 1101. Interpolate between the starting and ending radii of the spline curve segment to obtain the basic radius profile;

[0163] Based on the aforementioned node connection relationship, that is, when the current node establishes a connection with the candidate node, the radius parameters at both ends of the spline curve segment are extracted.

[0164] The starting radius corresponds to the current radius of the tubular path segment of the current node, and the ending radius corresponds to the target radius of the tubular path segment of the candidate node. Using the starting and ending radii as interpolation endpoints, multiple interpolation points are evenly distributed along the parameter variation direction of the spline curve segment. A series of continuously changing radius values ​​are calculated through linear interpolation, thereby constructing the basic radius profile.

[0165] This linear baseline profile establishes a continuous transition datum from the starting radius to the ending radius, ensuring the radius continuity of the tubular structure at the connection points and avoiding abrupt changes in the physical structure. This baseline radius profile reflects the basic trend of radius variation along the path.

[0166] 1102. Accumulate random incremental noise at sampling points inside the basic radius profile and smooth it. The noise amplitude is positively correlated with the pipe diameter.

[0167] To simulate the irregular and natural variations in blood vessel thickness in real anatomical structures, random perturbations are introduced on the basis of the aforementioned linear basic contour.

[0168] For each internal sampling point in the basic radius profile, excluding the endpoints, a pseudo-random number generator is used to generate random incremental noise. The amplitude of this noise is not a fixed value, but rather shows a positive correlation with the basic radius value of the current sampling point. That is, a larger pipe diameter corresponds to a larger range of variation, and a smaller pipe diameter corresponds to a smaller range of variation, which conforms to the anatomical rules of organisms.

[0169] For example, the noise amplitude can be set to 5% to 15% of the radius of the current sampling point.

[0170] After the generated random incremental noise is superimposed on each internal sampling point, the superimposed radius data is smoothed using methods such as moving average filtering, Gaussian smoothing, or SG (Savitzky-Golay) filtering. This smoothing process eliminates jagged edges or unnatural high-frequency oscillations that may be caused by noise superposition, so that the radius contour retains random texture details while possessing visual smoothness and physically smooth transition characteristics.

[0171] 1103. Limit the processed basic radius profile within a preset range related to the starting and ending radii to obtain the in-process radius sequence;

[0172] The radius profile after noise superposition and smoothing needs to be further constrained within a reasonable physical size range to prevent abnormal expansion or excessive contraction of the generated tubular structure.

[0173] Set a preset range related to the start radius and the end radius, such as floating up or down by a certain percentage around the weighted average of the start radius and the end radius, or using the maximum and minimum values ​​of the two as boundaries.

[0174] The algorithm iterates through the values ​​of each sampling point in the processed base radius contour. If a value exceeds a preset range, it is cropped to the corresponding boundary value; otherwise, it remains unchanged. This avoids abnormally large or small values.

[0175] This constraint yields a sequence of radii distributed along the spline curve segment. This sequence preserves the natural morphological details introduced by random noise while strictly adhering to the dimensional constraints required by engineering specifications.

[0176] 1104. Calculate the outer radius sequence along the path based on the inner radius sequence and the preset wall thickness;

[0177] The external profile is determined based on the wall thickness parameters of the tubular structure.

[0178] The preset wall thickness can be set to a fixed value or a variable parameter depending on the application scenario (such as the accuracy of medical image simulation). Each inner radius value in the sequence of inner radii along the path is iterated and added to the preset wall thickness to calculate the corresponding sequence of outer radii along the path. This establishes a geometric mapping relationship between the inner and outer diameters of the tubular structure with thickness.

[0179] The preset wall thickness can be a fixed value or dynamically adjusted according to the pipe diameter.

[0180] 1105. Combine the spline curve segment, the inner radius sequence along the path, and the outer radius sequence along the path into a tubular path segment.

[0181] By integrating geometric path information and radius attribute information, a complete tubular path segment object is constructed.

[0182] The spline curve segment defines the centerline path coordinates and geometry of the tubular structure, while the inner and outer radius sequences along the path assign cross-sectional dimension attributes to each point on the path. These three data components are encapsulated and combined to form a tubular path segment with complete geometric definition and dimensional information. This tubular path segment not only contains topological connectivity information but also fine geometric details, providing a data foundation for subsequent voxelization, mesh generation, or connectivity analysis.

[0183] While ensuring connectivity at both ends of the tubular path segment, a natural radius transition along the path is achieved by utilizing random noise positively correlated with the tube diameter and a smoothing algorithm. This overcomes the geometric distortion problem caused by traditional linear transitions or fixed radius patterns, and improves the anatomical realism of the synthetic vascular network.

[0184] Figure 12This is a schematic diagram of the radius smoothing transition process provided in the embodiments of this application. The spline curve segment 1201 has a starting radius d1 and an ending radius d2 at its starting end. Interpolation is performed between the starting radius d1 and the ending radius d2 to obtain the basic radius profile 1202 (represented by a dashed line in the figure). Random incremental noise is accumulated at the sampling points inside the basic radius profile 1202 and smoothed to obtain the processed radius profile 1203 (represented by a solid line in the figure). This radius profile naturally fluctuates near the basic radius profile, and the fluctuation amplitude is positively correlated with the pipe diameter. The processed radius profile 1203 is restricted to a preset range to obtain the inner radius sequence along the pipe. Based on the inner radius sequence 1204 along the pipe and the preset wall thickness d, the outer radius sequence 1205 along the pipe is calculated. The spline curve segment 1201, the inner radius sequence 1204 along the pipe, and the outer radius sequence 1205 along the pipe are combined to form a complete tubular path segment 1206.

[0185] In this embodiment, a basic radius profile is obtained by interpolating between the starting and ending radii of the spline curve segment. Random incremental noise positively correlated with the pipe diameter is accumulated at sampling points within the basic radius profile and smoothed. The processed profile is then constrained within a preset range related to the starting and ending radii to obtain an inner radius sequence. Based on the inner radius sequence and a preset wall thickness, an outer radius sequence is calculated. Finally, the spline curve segment, the inner radius sequence, and the outer radius sequence are combined to form a tubular path segment. This method, while ensuring connectivity at both ends of the tubular path segment, utilizes random noise positively correlated with the pipe diameter and smoothing to achieve a natural radius transition along the path. This overcomes the geometric distortion problems caused by traditional linear transitions or fixed radius patterns, improving the anatomical realism of the synthesized tubular network.

[0186] Figure 13 This application provides a schematic diagram of a process for performing connectivity detection on a three-dimensional tubular network. In response to the detection of an isolated subgraph, a bridging path is generated to connect the isolated subgraph to the main connected graph to obtain a globally connected three-dimensional tubular network. The process may include steps 1301 to 1306, which are described in detail below.

[0187] 1301. Perform connectivity traversal detection on the generated three-dimensional tubular network to obtain several connected components;

[0188] In this system, there is no connection between any two connected components, and several connected components correspond to a main connected graph and multiple isolated subgraphs. The number of tubular path segments in the main connected graph is not less than the number of tubular path segments in any isolated subgraph.

[0189] Topology analysis of a 3D tubular network is performed based on graph traversal to identify independent connected regions in the network.

[0190] An undirected graph is constructed using tubular nodes in a 3D tubular network as vertices and tubular path segments as edges, and connectivity traversal detection is performed using depth-first search or breadth-first search algorithms.

[0191] During the traversal, if it is impossible to reach all other nodes in the network from a certain node, it is determined that there are multiple independent subgraphs in the network, and each subgraph is considered a connected component.

[0192] These connected components are topologically isolated from each other, with no path connections between them. Based on the number of tubular path segments contained in each connected component, the component with the most tubular path segments is defined as the main connected graph, and the remaining connected components are defined as isolated subgraphs. This partitioning ensures that the main connected graph occupies a dominant position in the network structure, and its size is no smaller than any isolated subgraph.

[0193] For example, a 3D tubular network was detected to contain one main connected graph and two isolated subgraphs. The main connected graph contains 286 tubular path segments, while the two isolated subgraphs contain 12 and 8 tubular path segments, respectively.

[0194] 1302. Extract the open endpoints from each isolated subgraph as the first endpoint set, and extract the open endpoints from the main connected graph as the second endpoint set. Open endpoints are the free endpoints at the end of the tubular path segment that are not connected to other tubular nodes.

[0195] This step involves identifying candidate connection points for constructing bridging paths and extracting the free boundaries of each connected component.

[0196] For each isolated subgraph, traverse all tubular path segments it contains and check whether the first and last nodes of each tubular path segment are connected nodes. If the last node of a tubular path segment is only connected to the tubular path segment itself and has no connection relationship with other tubular nodes, then the last node is identified as a free endpoint, i.e., an open endpoint.

[0197] Similarly, perform the same detection operation on the main connected graph to obtain all open endpoints in the main connected graph.

[0198] The open endpoints of each isolated subgraph are aggregated to form the first endpoint set. The open endpoints of the main connected graph are aggregated to form the second endpoint set. Through the above processing, the bridging connection problem is transformed into a point pair matching problem between sets, providing a data foundation for subsequently finding the optimal connection pairs.

[0199] 1303. Traverse all endpoint pairs in the first endpoint set and the second endpoint set, and calculate the spatial distance between each endpoint pair. Each endpoint pair contains one endpoint from the first endpoint set and one endpoint from the second endpoint set.

[0200] The ease or difficulty of establishing connections between different connected components can be assessed by quantifying the potential cost of doing so.

[0201] By iterating through each endpoint in the first endpoint set using a double loop and pairing it with each endpoint in the second endpoint set, a set of endpoint pairs is formed that covers all possible cross-component connection combinations.

[0202] For each pair of endpoints, calculate the spatial distance between the two corresponding endpoints. This distance can be Euclidean distance, which is the straight-line distance between the two endpoints in the three-dimensional coordinate system.

[0203] This traversal calculation process yields a distance matrix that describes the spatial proximity between each isolated subgraph and the main connected graph. This matrix reflects the geometric cost required to connect each isolated subgraph back to the main connected graph.

[0204] 1304. Determine the target endpoint pair among all endpoint pairs, where the spatial distance between the target endpoint pairs is less than the spatial distance between any non-target endpoint pairs;

[0205] By selecting the optimal connection pairs to determine the start and end points of the bridging path, the length of the bridging path is minimized.

[0206] Based on the spatial distances of each endpoint pair obtained from the aforementioned steps, a minimum value search algorithm is executed to find the pair with the smallest spatial distance among all endpoint pairs as the target endpoint pair.

[0207] This target endpoint pair represents the shortest spatial path that needs to be traversed to connect the corresponding isolated subgraph to the main connected graph in the current state.

[0208] Selecting target endpoint pairs as the basis for connection can effectively avoid generating excessively long or circuitous bridging paths, thereby ensuring the geometric compactness and structural rationality of the generated 3D tubular network and reducing redundant connection structures.

[0209] 1305. Construct spline curve segments based on target endpoint pairs to serve as bridging paths;

[0210] After determining the two ends of the connection, a geometric path connecting the two endpoints is generated by constructing spline curve segments.

[0211] This spline curve segment not only connects the two endpoints of the target endpoint pair in terms of position, but also incorporates the tangential information at the endpoints to ensure a smooth transition between the curve and the original tubular path segment.

[0212] Moreover, the inner radius of the bridging path changes smoothly between the inner radii of the two endpoints, ensuring that the bridging path is continuously connected to the radius of the tubular path segments at both ends.

[0213] By using spline curves for bridging, the newly added bridging paths are made to be geometrically consistent with the surrounding existing tubular networks, simulating the natural curvature of real anatomical structures or tubular systems.

[0214] 1306. Connect each isolated subgraph to the main connected graph to form a globally connected three-dimensional tubular network.

[0215] The above extraction, calculation, determination, and construction processes are executed iteratively to gradually eliminate isolated components in the network.

[0216] Each time a bridging path is constructed based on a target endpoint pair, the corresponding isolated subgraph is physically and topologically connected to the main connected graph through this bridging path. The isolated subgraph is then merged into the main connected graph, and the total number of connected components in the network decreases accordingly. The remaining isolated subgraphs are repeatedly checked, and new target endpoint pairs are continuously searched to generate bridging paths until no isolated subgraphs remain.

[0217] Through this gradual repair method, all the separated tubular path segments are eventually connected into a single whole, resulting in a globally connected three-dimensional tubular network that is topologically complete.

[0218] In this embodiment, the main connected graph and isolated subgraphs are obtained by performing connectivity traversal detection on the generated 3D tubular network. Open endpoints of the isolated subgraphs and the main connected graph are extracted. All endpoint pairs are traversed to find the target endpoint pair with the smallest distance. Spline curve segments are constructed based on the target endpoint pairs as bridging paths, connecting each isolated subgraph to the main connected graph, forming a globally connected 3D tubular network. This method accurately identifies disconnected regions in the network through graph traversal algorithms, determines the optimal connection position using the nearest endpoint matching strategy, and then repairs the connection using spline curve segments. This effectively solves the network breakage problem that may occur during the generation process, ensuring that the final output 3D tubular network is a topologically unified whole, and improving the usability of the generated data in downstream tasks.

[0219] Figure 14 This is a flowchart illustrating the process of constructing spline curve segments based on target endpoint pairs as bridging paths, as provided in the embodiments of this application. It may include steps 1401 to 1404, which are described in detail below.

[0220] 1401. Extend the two endpoints of the target endpoint pair outwards by a preset extension length along the output tangent of their respective endpoints to obtain the extended endpoints;

[0221] The output tangential characterization represents the natural extension direction of the vascular path at each endpoint of the target endpoint pair, which inherits the geometric orientation information of the original vascular segment at that point.

[0222] This preset extension length is a pre-configured distance parameter used to define the extent by which the endpoints are pre-extended before attempting to construct the bridging path. This length can be set as a specific percentage of the target space's side length (e.g., 5%~10%), or it can be dynamically calculated based on the spatial distance between the two endpoints; it can also be set based on the pipe diameter, such as setting it to 1 to 2 times the pipe diameter, so that the start and end points of the bridging path slightly exceed the original endpoint positions, providing greater adjustment space for subsequent curve construction.

[0223] At each endpoint, the distance of the preset extension length is extrapolated outward along the respective output tangential vector to calculate the new spatial coordinates. These two new coordinates are the extended endpoints.

[0224] The purpose of this extension operation is to avoid geometric unnaturalness caused by the endpoints being too close or the direction changing abruptly when the bridging path starts directly from the original endpoint, thereby providing a buffer space for subsequent boundary detection.

[0225] After determining the target endpoint pair, obtain the position coordinates of the two endpoints and their respective output tangents. The output tangent refers to the extension direction of the tubular path segment at the endpoint. Extend each endpoint outward along its respective output tangent direction by a preset extension length to obtain two new position points, i.e., the extended endpoints.

[0226] 1402. Using the extended endpoint as a reference, detect the positional relationship between the extended path and the target spatial boundary;

[0227] Obtain the geometric definition of the target space boundary, which is typically an axis-aligned bounding box or an arbitrary closed surface defined by the lower and upper limits of the coordinates.

[0228] Determine whether the extension path from the original endpoint to the extended endpoint intersects with the target space boundary or exceeds the volume range defined by the boundary.

[0229] The coordinates of each sampling point along the extended path can be calculated and compared with the minimum and maximum values ​​of the target space boundary on the corresponding coordinate axes; alternatively, a fast collision detection can be performed using an intersection algorithm between line segments and bounding boxes. The detection result of this positional relationship determines whether the endpoint positions need to be corrected, which is a crucial preliminary judgment to ensure that the bridging path is strictly located within the target space.

[0230] If the extended endpoint is still within the target space and the extended path does not exceed the boundary, the extended endpoint can be used directly as the start and end points of the bridging path; otherwise, proceed to step 1403.

[0231] 1403. If the extended path exceeds the target space boundary, reduce the extension step size and perform boundary clipping to restrict the tubular path within the target space, thus obtaining the corrected bridge start and end points located inside the target space.

[0232] When the detection results indicate that any part of the extended path lies outside the target space boundary, it means that if the extended endpoints are directly connected, the resulting tubular path will extend beyond the set spatial range, constituting an illegal geometric state. Therefore, the extended path needs to be corrected.

[0233] It can reduce the extension step size to achieve the back extension distance or reduce the step size of the extension attempt; and combine it with the boundary trimming operation.

[0234] Boundary clipping can be achieved using the ray intersection method, which calculates the first valid intersection point between the ray emitted along the output tangential direction and the surface of the target space boundary, and then uses the coordinates of this intersection point as the new endpoint position.

[0235] By reducing the extension step size and performing pruning operations, endpoints originally located outside the boundary are forcibly pulled back to the boundary surface, resulting in corrected bridging start and end points located inside the target space. This ensures that regardless of the initial extension attempts, the final determined start and end points are always strictly constrained by the target space boundary, guaranteeing the geometric compliance of the generated network.

[0236] 1404. Based on the modified bridging start and end points and their corresponding tangents, construct spline curve segments as bridging paths.

[0237] After determining the start and end points of the modified bridging located within the spatial boundary, the final bridging curve segment is constructed by further combining the tangential information corresponding to these points (i.e., the direction vectors that are maintained or adjusted after extension or trimming operations).

[0238] The starting and ending points of the bridge and their corresponding tangents are modified as geometric constraints for constructing the spline curve. For example, parametric curve models such as cubic Bézier curves or B-spline curves can be used for fitting.

[0239] Taking a cubic Bézier curve as an example, the modified start and end point coordinates are used as the start and end points of the curve. Combined with the tangential vectors of the start and end points and the rules for generating control points, such as determining the position of internal control points based on the chord length ratio, the control polygon of the curve is calculated, and a spline curve segment smoothly connecting the two endpoints is generated. This spline curve segment, as a bridging path, not only lies entirely within the target space, but also maintains tangential continuity and smooth transition at the connection point, thus effectively connecting the isolated subgraph and the main connected graph into a globally connected three-dimensional tubular network.

[0240] In this embodiment, the two endpoints of the target endpoint pair are extended outward by a preset length along their respective output tangent directions. The positional relationship between the extended path and the target space boundary is detected. If the path exceeds the boundary, the extension step size is reduced and boundary clipping is performed to obtain corrected bridging start and end points located within the target space. Finally, spline curve segments are constructed based on the corrected bridging start and end points and their corresponding tangent directions as the bridging path. This method ensures that the bridging path always remains within the effective range of the target space, avoiding the problem of the path exceeding the space boundary due to the extension operation. At the same time, the extension operation provides greater construction freedom for the bridging path, allowing the bridging path to connect isolated subgraphs and the main connected graph in a more natural form.

[0241] The above describes a method for generating a three-dimensional tubular network according to an embodiment of this application. The following will introduce application scenario examples of the above-described method for generating a three-dimensional tubular network.

[0242] This example aims to generate a segment of vascular network in the right lobe region of the human liver, using a combination of Bezier branching and graph growth methods, and includes the following five steps.

[0243] Step 1: Set the target space and global parameters;

[0244] The target space is defined as a cubic region with dimensions of 200mm × 150mm × 180mm, representing the approximate volume range of the right lobe of the liver. Global parameters are set as follows: intravascular diameter ranging from 2mm to 10mm, vessel wall thickness of 0.5mm, voxel resolution of 512 × 512 × 512, and voxel size approximately 0.39mm × 0.29mm × 0.35mm. The random number generator seed is fixed at 42 to ensure reproducible results.

[0245] Step 2: Generate the main vascular tree using Bezier branching;

[0246] A Bezier branching method was used to generate the main vascular tree. Within the target space, the portal vein entrance was designated as the main trunk starting point, with coordinates (100mm, 0mm, 90mm); three scattered points in the right lobe distal region of the liver were designated as the main trunk ending points, with coordinates (180mm, 120mm, 160mm), (160mm, 135mm, 140mm), and (170mm, 105mm, 165mm), respectively. Bezier curves were constructed from the starting point to each ending point, with 4 to 6 intermediate control points set for each curve. The control points were randomly offset laterally within ±15mm. Six branch starting points were randomly selected on the main trunk curves. The diameter of each branch starting point inherited the diameter of the main trunk at that location. Secondary branch curves were generated from these branch starting points, with the endpoints of the secondary branches randomly distributed within the target space. Through three-level branching iterations, a total of 25 vascular curves were generated, forming a tree-like vascular network containing the main trunk and branches at various levels. The diameters on each curve are allocated using keyframes, with larger diameters at the starting point (8mm to 10mm) and smaller diameters at the end point (2mm to 4mm). The diameters between keyframes are obtained through linear interpolation.

[0247] Step 3: Placement of grid seeds and graph growth;

[0248] Grid seeds are placed within the target space. The target space is divided into 10×8×6 grid cells, each with dimensions of 20mm×18.75mm×30mm. Initial seed positions are generated at the center of each grid cell, totaling 480. A jitter perturbation is applied to each initial seed position, with a jitter amplitude of ±20% of the grid cell size, to obtain the target seed position. Simultaneously, 120 additional random seed positions are uniformly sampled within the target space to supplement areas that the grid seeds may not cover. All seed positions are cropped to within the target space boundary.

[0249] Graph growth begins from the position of each seed, with a maximum growth step of 50 steps per seed, a current step size of 3mm, and a connection distance threshold of 5mm. In each step, a directional heuristic rule is used to determine the target expansion direction: a spherical neighborhood with a radius of 15mm is defined centered on the current expansion node; the number of nodes with existing tubular path segments within the neighborhood is counted, and the local node density is calculated and mapped to a local congestion index; simultaneously, the target space is divided into 5×4×3 evaluation sub-grids, and the occupancy degree of tubular path segments within each sub-grid is counted to generate a global occupancy grid map; for candidate directions, the occupancy degree of the target sub-grid is read and mapped to a global sparsity index; the target expansion direction is determined by combining the local congestion index and the global sparsity index, ensuring that the growth direction tends to avoid congested areas and move towards sparse areas.

[0250] After extending along the target expansion direction to the next node, the distance between this node and each candidate node on the existing tubular path segment is detected. If a candidate node exists within the connection distance threshold of 5mm, the next node is connected to it using a spline curve segment, and the inner radius smoothly transitions from the current radius to the target radius along the spline curve segment. Simultaneously, random noise positively correlated with the pipe diameter is introduced to improve geometric realism. If no candidate node exists, the next node is added to the existing tubular path segment set, and expansion continues along the updated target expansion direction. Through this process, approximately 800 tubular path segments are generated.

[0251] Step 4: Connectivity detection and bridging repair;

[0252] The generated set of tubular path segments is subjected to connectivity traversal and testing, resulting in one main connected graph and three isolated subgraphs. The main connected graph contains 752 tubular path segments, and the three isolated subgraphs contain 28, 15, and 10 tubular path segments, respectively. The open endpoints of each isolated subgraph are extracted as the first endpoint set, and the open endpoints of the main connected graph are extracted as the second endpoint set. All endpoint pairs are traversed to find the target endpoint pair with the smallest distance. For each endpoint of the target endpoint pair, the two endpoints are extended outwards along their respective output tangents by a preset length (set as 1.5 times the pipe diameter). It is checked whether the extended path exceeds the target space boundary. If it does, the extension step size is reduced and boundary clipping is performed to obtain the corrected bridging start and end points located inside the target space. Based on the corrected bridging start and end points and their corresponding tangents, spline curve segments are constructed as bridging paths. The starting and ending tangents of the bridging paths both have lateral perturbations, and the inner radius changes smoothly between the inner radii of the two endpoints. The three isolated subgraphs are processed sequentially, generating a total of 3 bridging paths. All isolated subgraphs are then incorporated into the main connected graph, forming a globally connected 3D tubular network.

[0253] Step 5: Output in multiple formats;

[0254] The generated globally connected 3D tubular network is exported as three data representations:

[0255] (1) Centerline graph: Extract the start and end points of all tubular path segments as graph nodes, merge the endpoints with a distance of less than 5 mm, construct an undirected graph, each tubular path segment corresponds to an edge, the edge carries the complete sampling polyline and the radius sequence along the path, and save it as a hierarchical data format.

[0256] (2) Voxel data: The voxel size is set to 0.39mm×0.29mm×0.35mm. Samples are taken at a step size of 0.2mm along the center line of the tubular path segment. A spherical neighborhood is determined at each sampling position based on the outer radius. Attenuation values ​​are written for voxels that fall into the neighborhood. The maximum value is used to update the overlapping area. A 512×512×512 three-dimensional volume data is generated and saved in NIfTI (Neuroimaging Informatics Technology Initiative) format.

[0257] (3) Tubular mesh: Using the center line and diameter along the tubular path segment as input, a cross-sectional vertex ring is generated at each skeleton point according to the local path direction. Adjacent vertex rings are connected by quadrilateral surfaces. End caps are generated at the first and last vertex rings and exported as a 3D mesh model in OBJ (Wavefront Object) format.

[0258] Through the above process, a globally connected 3D vascular network, including a main vascular tree, a fine branch network, and bridging paths, was generated in the target space of the right lobe of the liver. This network contains approximately 850 tubular path segments, with the inner diameter of the vessels smoothly transitioning from 10 mm at the main trunk to 2 mm at the terminal end, and a wall thickness of 0.5 mm. The generated three data representations can be directly used for training data augmentation of the vascular segmentation algorithm, input for CT simulation projection, and 3D visualization.

[0259] The above describes a method for generating a three-dimensional tubular network according to an embodiment of this application. The following describes an electronic device that performs the above-described method for generating a three-dimensional tubular network.

[0260] Please see Figure 15 , Figure 15 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 15 As shown, the electronic device 1500 includes: at least one processor 1501 and a memory 1502 connected to the processor, wherein:

[0261] Memory 1502 is used to store computer programs;

[0262] The processor 1501 is used to execute a computer program to cause the electronic device to perform any of the three-dimensional tubular network generation methods provided in the embodiments of this application.

[0263] Electronic devices may also include a communication bus for enabling communication between the processor and memory. The processor may be a CPU (Central Processing Unit), GPU (Graphics Processing Unit), DSP (Digital Signal Processor), ASIC (Application Specific Integrated Circuit), FPGA (Field Programmable Gate Array), or other programmable logic devices. The memory may be RAM (Random Access Memory), flash memory, ROM (Read Only Memory), EPROM (Erasable Programmable Read Only Memory), EEPROM (Electrically Erasable Programmable Read Only Memory), registers, hard disks, external hard disks, optical discs, or other forms of storage media.

[0264] In this embodiment, the processor executes a computer program stored in the memory, enabling the electronic device to perform the three-dimensional tubular network generation method described in the preceding claims. This method generates a backbone tubular network in the target space, places seeds, expands graph nodes, performs spline curve interpolation, and repairs connectivity, ultimately obtaining a globally connected three-dimensional tubular network. This electronic device transforms each step in the method claims into executable computer instructions, achieving automated generation of synthetic vascular networks and providing an efficient computing platform for downstream applications such as medical image simulation and segmentation training.

[0265] This application also provides a computer program product including computer-readable instructions, which, when executed on an electronic device, cause the electronic device to implement any of the three-dimensional tubular network generation methods provided in this application.

[0266] This application also provides a computer-readable storage medium that carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement any of the three-dimensional tubular network generation methods provided in this application.

[0267] It is understood that before using the technical solutions disclosed in the various embodiments of the present invention, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in the present invention and their authorization should be obtained in accordance with relevant laws and regulations through appropriate means.

[0268] For example, upon receiving a user's active request, a prompt message is sent to the user to explicitly inform them that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the software or hardware, such as the electronic device, application program, server, or storage medium executing the operation of this invention, based on the prompt message.

[0269] It is understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and related provisions.

[0270] It should also be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. In addition, in the accompanying drawings of the device embodiments provided in this application, the connection relationship between modules indicates that they have a communication connection, which can be implemented as one or more communication buses or signal lines.

[0271] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware, or it can be implemented by special-purpose hardware including application-specific integrated circuits, special-purpose CPUs, special-purpose memory, special-purpose components, etc. Generally, any function performed by a computer program can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be diverse, such as analog circuits, digital circuits, or special-purpose circuits. However, for this application, software program implementation is more often the preferred implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a readable storage medium, such as a computer floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk, or optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, training equipment, or network device, etc.) to execute the methods of the various embodiments of this application.

[0272] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product.

[0273] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, training device, or data center to another website, computer, training device, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives (SSDs)).

Claims

1. A method of generating a three-dimensional tubular network, characterized by, include: Within the target space, a main tubular network is generated using spline branching, and at least two seeds are placed according to the grid division. Starting from the position of each seed, based on the space occupancy status and the distribution of existing tubular path segments, the target expansion direction is determined, and graph nodes are expanded along the target expansion direction to generate multiple tubular path segments, wherein the existing tubular path segments at least include the main tubular network; Spline curve interpolation is performed on the multiple tubular path segments to generate a three-dimensional tubular network; Connectivity detection is performed on the three-dimensional tubular network. In response to the detection of isolated subgraphs, bridging paths are generated to connect the isolated subgraphs to the main connected graph, resulting in a globally connected three-dimensional tubular network. The bridging paths are spline curve segments, and at least one of the starting and ending tangents of the bridging paths has a lateral perturbation, and the inner radius changes smoothly between the inner radii of the two endpoints.

2. The method of generating a three-dimensional tubular network of claim 1, wherein, The placement of at least two seeds according to the grid division includes: The target space is divided into a three-dimensional grid, and an initial seed position is generated at the center of each grid cell. The target seed position is obtained by applying a jitter perturbation to the initial seed position, and each target seed position is constrained within the target space; Place the seed at the target seed location.

3. The method of claim 1, wherein, The determination of the target expansion direction based on the space occupancy status and the distribution of existing tubular path segments includes: The local congestion index is evaluated based on the local node density of the existing tubular path segments around the current expansion node. The global sparsity index is evaluated based on the global space occupancy distribution within the target space. The target expansion direction is determined based on the local congestion index and the global sparsity index.

4. The method of claim 3, wherein, The assessment of local congestion indices based on the local node density of existing tubular path segments surrounding the current extended node includes: A preset neighborhood is defined centered on the current expanding node, and the number of nodes in the existing tubular path segments within the neighborhood is counted. Based on the number of nodes in the neighborhood and the volume of the neighborhood space, the local node density is calculated. The local node density is mapped to a local congestion index, and the local congestion index is positively correlated with the local node density. The step of evaluating the global sparsity index based on the global space occupancy distribution within the target space includes: The target space is divided into several evaluation sub-grids, and the occupancy of tubular path segments in each evaluation sub-grid is statistically analyzed to generate a global occupancy grid map. For the target sub-grid pointed to by the candidate direction to be evaluated, the occupancy degree of the target sub-grid is read. The occupancy degree of the sub-grid is mapped to a global sparsity index, and the global sparsity index is negatively correlated with the occupancy degree of the sub-grid.

5. The method of claim 1, wherein, The process of expanding graph nodes along the target expansion direction to generate multiple tubular path segments includes: Extend along the target expansion direction to the next graph node at the current step size; Detect the distance between the next node in the graph and each candidate node on the existing tubular path segment; When there is a candidate node within the connection distance threshold, the next graph node is connected to the candidate node by a spline curve segment, and the inner radius of the tubular path segment is smoothly transitioned from the current radius to the target radius along the spline curve segment; When there are no candidate nodes within the connection distance threshold, the next graph node is added to the existing tubular path segment set, and graph node expansion continues along the updated target expansion direction.

6. The method for generating a three-dimensional tubular network according to claim 5, characterized in that, When a candidate node exists that is within the connection distance threshold, connecting the next graph node to the candidate node using a spline curve segment includes: Obtain the first position and first tangent of the next graph node, and the second position and second tangent of the candidate node; Select random vectors and orthogonalize the first tangent and the second tangent respectively to obtain a first perturbation direction perpendicular to the first tangent and a second perturbation direction perpendicular to the second tangent; The first tangential direction is combined with the first disturbance direction of a preset ratio and then normalized to obtain the first disturbance tangential direction; the second tangential direction is combined with the second disturbance direction of a preset ratio and then normalized to obtain the second disturbance tangential direction. Based on the first position, the second position, and the corresponding perturbation tangent, a spline curve segment is constructed, which connects the next graph node to the candidate node.

7. The method for generating a three-dimensional tubular network according to claim 5, characterized in that, The process of smoothly transitioning the inner radius of the tubular path segment from the current radius to the target radius along the spline curve segment includes: Interpolation is performed between the starting radius and the ending radius of the spline curve segment to obtain the basic radius profile; Random incremental noise is accumulated at sampling points inside the basic radius profile and smoothed, and the amplitude of the noise is positively correlated with the pipe diameter; The processed basic radius profile is restricted to a preset range related to the starting radius and the ending radius to obtain the in-process radius sequence; Based on the inner radius sequence along the path and the preset wall thickness, calculate the outer radius sequence along the path; The spline curve segment, the inner radius sequence along the path, and the outer radius sequence along the path are combined into a tubular path segment.

8. The method for generating a three-dimensional tubular network according to claim 1, characterized in that, Connectivity detection is performed on the three-dimensional tubular network. In response to the detection of isolated subgraphs, bridging paths are generated to connect the isolated subgraphs to the main connected graph, resulting in a globally connected three-dimensional tubular network, including: The generated 3D tubular network is subjected to connectivity traversal detection to obtain several connected components. There is no connection between any two connected components. The several connected components correspond to a main connected graph and multiple isolated subgraphs. The number of tubular path segments in the main connected graph is not less than the number of tubular path segments in any isolated subgraph. The open endpoints in each isolated subgraph are extracted as the first endpoint set, and the open endpoints in the main connected graph are extracted as the second endpoint set. The open endpoints are the free endpoints at the end of the tubular path segment that are not connected to other tubular nodes. Iterate through all endpoint pairs in the first endpoint set and the second endpoint set, and calculate the spatial distance between each endpoint pair, wherein each endpoint pair contains one endpoint from the first endpoint set and one endpoint from the second endpoint set; Among all endpoint pairs, a target endpoint pair is identified, wherein the spatial distance between the target endpoint pairs is less than the spatial distance between any non-target endpoint pairs. Spline curve segments are constructed based on the target endpoints to serve as bridging paths; Each isolated subgraph is connected to the main connected graph to form a globally connected three-dimensional tubular network.

9. The method for generating a three-dimensional tubular network according to claim 8, characterized in that, The construction of spline curve segments based on the target endpoints as bridging paths includes: Extend the two endpoints of the target endpoint pair outward by a preset extension length along the output tangent of their respective endpoints to obtain the extended endpoints; Using the extended endpoint as a reference, detect the positional relationship between the extended path and the target spatial boundary; If the extended path exceeds the target space boundary, reduce the extension step size and perform boundary clipping to restrict the tubular path within the target space, thus obtaining the corrected bridging start and end points located inside the target space. Based on the modified bridging start and end points and their corresponding tangents, spline curve segments are constructed as bridging paths.

10. An electronic device, characterized in that, It includes at least one processor and a memory connected to the processor, wherein: The memory is used to store computer programs; The processor is configured to execute the computer program to cause the electronic device to perform the method for generating a three-dimensional tubular network as described in any one of claims 1 to 9.