1 Introduction

Centerline, known as skeleton or medial axis, can directly reflect shape feature and topological characteristic of original graphs. In 1964, the concept of centerline was first put forward by Blum [1], defining centerline as the trajectory of the center of maximum inscribed circle of the object. Thereafter, the new research direction on 2D/3D centerline extraction was founded. With advantage of retaining complete information of original models, centerline is extensively used in object detection, feature extraction, path planning, virtual navigation, pattern recognition and so on.

As one of the most common 3D objects, the tubular models are widely applied in industrial design, medical simulation, virtual reality, et al. For example, in industrial design, 3D tubular models are mostly used in design of pipe and tunnel, due to the centerlines could visually display the overall shape of them, which makes it easy to calculate the length of the pipe and tunnel. The centerline information also provides guidance mainly involved in vascular model reconstruction and surgery simulation. In particular, the centerline of the blood vessel is used as the basic path for surgical path planning and virtual blood vessel navigation.

In recent years, centerline extraction becomes a hot research field. There are two impediments making it difficult to extract the centerline of a 3D tubular model accurately: (1) the structures of some 3D tubular models, such as vein, blood vessels, etc., are complex tree-like structures with many small sub-branches. Especially, in the case of the vascular stenosis and occlusion that makes the internal structure of vessels even more complicated do exist in disease vessels (2) traditional centerline extraction approaches usually require lots of manual interventions to obtain accurate results, thus leading to low efficiency, and sometimes even may generate a non single-pixel centerline.

To address the problems above, we first introduce the hydrodynamics theory into centerline extraction and propose a novel approach to extract the centerline of 3D tubular objects. We discover the correlation between the center positions of isobaric surfaces with the center of tube shaped structure. And our algorithm is based on the pressure layer characteristics caused by steady fluid in the tubular model. FVM was adopted to calculate N-S formula to simulate fluid dynamics. The pressure data was structured by Delaunay Tetrahedralization and isobaric surfaces were extracted using Marching Tetrahedra Method by presetting the inlet and outlets boundaries. The tube directed tree was constructed for optimizing the feature points and the continuous and smooth tube centerline was fitted by Catmull-Rom spline. At last, we set two different kinds of experiments to validate the accuracy of our algorithm, and use this algorithm to obtain the centerlines of complex tube structures with good experimental results.

2 Related Work

Among the researches related to centerline extraction, many algorithms aiming at 2D images and 3D models have been proposed. The traditional algorithms can be classified into topological thinning method [2, 3], potential energy field method [4,5,6], distance transformation method [7, 8], etc. Although these methods can extract the centerline of tubular objects accurately, most of them have plenty of shortcomings like requiring manual intervention, high computation complexity, poor robustness and so on.

In recent years, the segmentation-based method, the minimal path method and the Voronoi diagram method have gained widespread attention. In segmentation-based method, Kumar et al. [9] proposed to segment blood vessel and extract centerline by tracking a user-initiated vascular seed cross section. Smistad et al. [10] adopted GPU parallel computing to divide blood vessel model and extract centerline, which greatly improved the extraction speed. Schneider et al. [11] pre-assumed the position of centerline using multivariate Hough voting and oblique random forests and then adopted fast matching method to precisely determine the centerline of the blood vessel. However, these methods require a large amount of computation and manual intervention. With regard to the minimal path method, Wink et al. [12] used Dijikstra algorithm and A* algorithm to calculate the minimum cost path through the pre-defined cost image. Jin et al. [13] introduced a minimum cost path method to extract the centerline of 3D tree-like objects, which avoided spurious branches without requiring post-pruning. In addition, the improved ant colony algorithm was utilized by Gao et al. [14] to extract the centerline of human thigh blood vessel. Jia et al. [15] combined multi-model and multi-resolution within the minimal path framework, enabling the minimal path process to track the key centerline points at different resolution of the images. This kind of methods are mainly used in 2D images, which obtains the centerline by searching the shortest path to certain points in target objects. Even though it can achieve high precision, the method can not guarantee the connectivity and single-pixel of the extracted centerline, furthermore, corners may appear in the places with high curvature. The extraction algorithm based on Voronoi diagram utilized the Voronoi diagram to calculate the nearest neighbor of the spatial point set to achieve the centerline. Yang et al. [16] determined the position of the centerline by using the Voronoi diagram to integrate the minimum path. Bucksch and Lindenbergh [17] proposed a graph-based approach to extract the centerline from point clouds using collapsing and merging procedures in octree-graphs. Ma et al. [18] put forward a nearest neighbor approach to extract the centerline of the points sample on 3D object boundary where each point is associated with a normal vector. However, most of the methods are only suitable for calculating the centerline of simple polyhedron, but not for discrete models. While dealing with internal hollows are also difficult for them.

Different from the above-mentioned approaches, we utilize the characteristics of isobaric surface under the circumstances when the object filled with steady fluid and present a novel centerline extraction algorithm, which can accurately extract the centerline of 3D tubular objects with only a little of manual intervention and is able to solve most problems of the traditional approaches.

3 Centerline Extraction Algorithm

3.1 Method Overview

Figure 1 depicts a block diagram of the proposed centerline extraction method, mainly including steady fluid simulation and centerline extraction. In our method, a 3D tubular model is adopted as the input for the following algorithm. Firstly, after definition the inlet and outlets of 3D tubular model, we adopt the advancing-front method for the generation of tetrahedral mesh inner this model, and the FVM based fluid method iteratively executes over this meshed model until the pressure of fluid tends to stable. Secondly, the discrete pressure point clouds data are processed by delaunay tetrahedralization and the isobaric surface set in the 3D tubular model is generated. Thirdly, the center points of isobaric surfaces are calculated for constructing the direct tree as the control points. Then the directed tree is optimized by removing the wrong bifurcation, repairing deficiency and removing dense feature points. Finally, the final 3D tubular model with the centerline result fitted by Catmull-Rom spline is output.

Fig. 1.
figure 1

Block diagram of centerline extraction method

3.2 Steady Fluid Computation

The simulation of the object fully filled with steady fluid will be executed before extracting the isobaric surfaces. There may be subtle differences on the distribution of isobaric surfaces under the circumstances of injecting different fluid. Therefore, Newtonian fluid is utilized in our experiment and simulated by adopting viscous incompressible Navier-Strokes (N-S) formula. The momentum equations of three dimensions in space and the continuity equation are:

$$ {x:\rho \left( {\frac{\partial u}{\partial t} + u\frac{\partial u}{\partial x} + v\frac{\partial u}{\partial y} + w\frac{\partial u}{\partial z}} \right) = \mu \left( {\frac{{\partial^{2} u}}{{\partial x^{2} }} + \frac{{\partial^{2} u}}{{\partial y^{2} }} + \frac{{\partial^{2} u}}{{\partial z^{2} }}} \right) - \mu \frac{\partial }{\partial x}\left( {\frac{\partial u}{\partial x} + \frac{\partial v}{\partial y} + \frac{\partial w}{\partial z}} \right) - \frac{\partial p}{\partial x} }$$
(1)
$$ {y:\rho \left( {\frac{\partial v}{\partial t} + u\frac{\partial v}{\partial x} + v\frac{\partial v}{\partial y} + w\frac{\partial v}{\partial z}} \right) = \mu \left( {\frac{{\partial^{2} v}}{{\partial x^{2} }} + \frac{{\partial^{2} v}}{{\partial y^{2} }} + \frac{{\partial^{2} v}}{{\partial z^{2} }}} \right) - \mu \frac{\partial }{\partial x}\left( {\frac{\partial u}{\partial x} + \frac{\partial v}{\partial y} + \frac{\partial w}{\partial z}} \right) - \frac{\partial p}{\partial y}} $$
(2)
$$ {z:\rho \left( {\frac{\partial w}{\partial t} + u\frac{\partial w}{\partial x} + v\frac{\partial w}{\partial y} + w\frac{\partial w}{\partial z}} \right) = \mu \left( {\frac{{\partial^{2} w}}{{\partial x^{2} }} + \frac{{\partial^{2} w}}{{\partial y^{2} }} + \frac{{\partial^{2} w}}{{\partial z^{2} }}} \right) - \mu \frac{\partial }{\partial x}\left( {\frac{\partial u}{\partial x} + \frac{\partial v}{\partial y} + \frac{\partial w}{\partial z}} \right) - \frac{\partial p}{\partial z} }$$
(3)
$$ \frac{\partial \rho }{\partial t} + \frac{\partial (\rho u)}{\partial x} + \frac{\partial (\rho v)}{\partial y} + \frac{\partial (\rho w)}{\partial z} = 0 $$
(4)

Where u, v, w are the fluid flow velocity components in the x-y-z directions respectively; \( \rho \), \( \mu \), \( p \) are density, viscosity coefficient, and pressure of the fluid field respectively.

The wall of tube object is then set as a Lipschitz continuous boundary, the fluid motion equation satisfies the no-slip condition and the velocity on the boundary is zero. When the above-mentioned conditions satisfied, a fluid velocity field \( u_{unflow} \) perpendicular to the boundary plane is set at the inlet position, meanwhile the pressure at boundary of the outlets position is set as zero.

There are commonly three approaches to calculate numerical solution of control equation based on Eulerian grid: Finite Difference Method (FDM), Finite Element Method (FEM) and Finite Volume Method (FVM). FDM can not achieve high precision although it is simple and easy to calculate; FEM, having high accuracy but also high computational complexity, thus is suitable for complicated shape, but has bad real-time performance. While FVM is a combination of these two methods, making it suitable for fluid simulation and irregular grids. Taking into account these considerations, FVM is chosen to discretize the control equation, of which the basic idea is to divide the computational domain into several non-overlapping control volumes to surround each node of grids, and integrate each control volumes to obtain a discrete set of equations.

The prerequisite of using FVM to solve the N-S equation is to divide the Eulerian grids of fluid flow space inside the objects. We adopt the advancing-front method [19] to perform tetrahedral meshing in spatial domain. To guarantee the calculation accuracy, we set more dense grids in the position close to the object wall. In addition, we use the staggered grid method to compute the pressure and velocity on the meshed space and set the control volume distribution around the grid nodes. Finally, by setting the grids to control the volume side length, fluid coefficient, etc., we can iterate the calculation of the pressure distribution inside objects.

3.3 Isobaric Surface Extraction

We acquire isobaric surfaces in the object through isosurface extraction. Foremost, the discrete pressure point clouds data is processed by delaunay tetrahedralization. This step can be accomplished by TetGen [20], an available tetrahedral generation tool. It is then necessary to remove the wrong and abnormal tetrahedrons from the generated tetrahedron set, using the following tetrahedral quality formula to eliminate the useless tetrahedrons [21]:

$$ q_{tetrahedron} = \frac{12}{\sqrt 2 }\frac{V}{{l_{rms}^{3} }} $$
(5)
$$ l_{rms} = \sqrt {\frac{{l_{1}^{2} + l_{2}^{2} + l_{3}^{2} + l_{4}^{2} + l_{5}^{2} + l_{6}^{2} }}{6}} $$
(6)

Where V is the volume of tetrahedron, \( l_{rms} \) is the square root of the six edges of tetrahedron.

A quality threshold \( q^{\prime} \) is set to reserve the tetrahedron satisfying \( q_{tetrahedron} > q^{\prime} \), by which we could remove those wrong tetrahedrons being flat and slender. The structure of tetrahedron data set we reserve are shown in Fig. 2, where Fig. 2(a) represents the tetrahedralized and optimized pressure data in elbow-like tube, and Fig. 2(b) in Y-type tube.

Fig. 2.
figure 2

Result of tetrahedralization and optimization of tetrahedrons: the left side is the original tetrahedralized data, the right side is the optimized data.

After removing the false tetrahedrons, we execute isosurface extraction on the reserved tetrahedrons by means of the Marching Tetrahedra Method. Firstly, we calculate the pressure on each isosurface, then stratify the pressure according to the predefined maximum pressure \( P_{\hbox{max} } \) and the minimum pressure \( P_{\hbox{min} } \). Suppose that n layers pressure need being extracted. The \( P_{\hbox{max} } \) and \( P_{\hbox{min} } \) are ignored due to too little data, hence, the pressure of the m layer is:

$$ P_{m} = \frac{{P_{\hbox{max} } - P_{\hbox{min} } }}{n + 1}*m + P_{\hbox{min} } ,1 \le m \le n $$
(7)

Then we can extract \( n \) isobaric surfaces according to the value \( P_{m} \) obtained from the previous step. Multiple isobaric surfaces may be extracted under the same pressure, thus need to be separated in a certain way. To be specific, we select a triangular patch from the extracted isobaric surfaces and find all the triangular patches being connected with it according to the characteristics of successive triangular patches on the same isobaric surface. The triangular patches found in the previous step should be treated equally to form recursive operation until no adjacent triangular patches can be found, that is to say, we can separate this isobaric surface from others that own the same pressure value. Repeating the previous steps until all the triangular patches extracted under the same pressure are searched, which means the separation of the isobaric surfaces under the same pressure are finished. The isobaric surfaces extracted from elbow and Y-type tube are shown in Fig. 3(a) and (e).

Fig. 3.
figure 3

The whole centerline extraction process of elbow-like tube and Y-type tube.

3.4 Centerline Extraction

Following the isobaric surface extraction is the generation of centerline. The first step is to calculate the center points of all isobaric surfaces as the control points of the centerline, of which the formula is as follows:

$$ P_{c} (x,y,z) = \frac{{\sum\nolimits_{i = 0}^{n} {P_{i} (x_{i} ,y_{i} ,z_{i} )} }}{n + 1} $$
(8)

Where, \( P_{i} (x_{i} ,y_{i} ,z_{i} ) \) is the center point of the \( i_{th} \) triangular patch on the isobaric surface. While the pressure of the center point is equal to the isobaric surface. The result is shown in Fig. 3(b) and (f).

The connection of centerline is conditional on building the directed tree of the center points according to the order of the pressure layer. As the order of pressure from large to small, that is, beginning to traverse from the control points at the inlet where fluid being injected, we search the control point \( P_{i + 1} (x_{i + 1} ,y_{i + 1} ,z_{i + 1} ) \) in the next pressure layer \( P_{i + 1} \) which is continuously connected to the control point \( P_{i} (x_{i} ,y_{i} ,z_{i} ) \) till the last layer. Chances are that there will be multiple tube branches containing pressure layer \( P_{i + 1} \), leads to more than one control point under the same pressure layer. Thus we set a distance threshold \( R^{\prime} \):

  • When the distance between \( P_{i + 1} (x_{i + 1} ,y_{i + 1} ,z_{i + 1} ) \) and \( P_{i} (x_{i} ,y_{i} ,z_{i} ) \) is less than \( R^{\prime} \), we determine that \( P_{i + 1} (x_{i + 1} ,y_{i + 1} ,z_{i + 1} ) \) and \( P_{i} (x_{i} ,y_{i} ,z_{i} ) \) are in the same branch and they are continuous in the directed tree. And the former is set as the child node of the latter.

  • When the distance between \( P_{i + 1} (x_{i + 1} ,y_{i + 1} ,z_{i + 1} ) \) and \( P_{i} (x_{i} ,y_{i} ,z_{i} ) \) is more than \( R^{\prime} \), we determine that \( P_{i + 1} (x_{i + 1} ,y_{i + 1} ,z_{i + 1} ) \) and \( P_{i} (x_{i} ,y_{i} ,z_{i} ) \) are in the different branches and they are discontinuous in the directed tree. The directed tree of the elbow and Y-type tube is shown as Fig. 3(c) and (g).

3.5 Centerline Optimization

From the above approaches, we can generate a centerline directed tree. However, there may be some flaws in the structure, due to which we need to optimize its structure. Optimization is needed in the following situations:

Situation 1: As a result of the instability of the steady-state fluid isobaric surfaces, there might be redundant branches of the centerline. Through the determination of the outlet position of tube, we retrieve the tree to see whether the terminal node position is corresponding to the outlet. If not, this branch is deleted.

Situation 2: Some deficiency may exist on the centerline at the inlet and outlet position. Detecting whether the leaf node of directed tree is accurately at the inlet or outlet position, if not, connecting the leaf node to the center of the nearest inlet or outlet to complement the centerline.

Situation 3: The nodes of centerline generated by previous steps may be too dense in local, which will cause the fitting speed slow and some local fluctuation on the fitting curve. In Fig. 4, \( p_{i - 2} \), \( p_{i - 1} \), \( p_{i} \), \( p_{i + 1} \), \( p_{i + 2} \) are the five continuous feature nodes, the angle \( \theta \) is the included angle of \( \widehat{{p_{i - 2} p_{i - 1} }} \) and \( \widehat{{p_{i + 1} p_{i + 2} }} \). If \( \theta \) > Thres1 (Thres1 is a threshold), the node \( p_{i} \) needs to be removed. If \( dist(p_{i - 1} ,p_{i} ) \) < Thres2 (Thres2 is a threshold), node \( p_{i} \) needs to be removed. The value of Thres1 and Thres2 depends on the input model.

Fig. 4.
figure 4

Feature nodes optimization

The Catmull-Rom spline is adopted to match the control points in order that the final path is smoother.

After completing the optimization steps, the final directed tree is connected and we can achieve the centerline of three-dimensional tubular objects. The centerline directed tree and the final result of extraction are shown as Fig. 3(d) and (h).

4 Experiment Results

4.1 Validation

In order to verify the correctness of our algorithm, we extract the centerline of two regular tubular structures (Straight tube and C-type tube), and calculate the errors between the standard centerline and our results.

Regular Straight Tube Structure.

In this experiment, we compare and analyze the accuracy error of the extracted centerline in regular straight tube under different number of pressure level. Figure 5(a) shows the original isobaric surface extraction result with 20 levels, Fig. 5(b) shows the optimized center point, and Fig. 5(c) shows the final fitting centerline.

Fig. 5.
figure 5

Centerline extraction result of regular straight and C-type tube.

Then we try to extract the centerline of regular straight tube under different pressure levels. The number of points which C-R spline generates each time is 50. We make a comparison between the extracted centerline and the ground truth of centerline, and consider the error of each spline point as the nearest distance to the ground truth, the validation result under different pressure levels are indicated in Table 1, where the Average Error is average error of all spline points. From the result we can see that the more pressure levels we divide, the higher precision of generated centerline we will get.

Table 1. The error value of straight tube.

Regular C-Type Tube Structure.

Applying our algorithm on the regular C-Type tube, and the extraction result under 80 levels is shown in Fig. 5(e), (f) and (g). The number of points which C-R spline generates each time is still 50 and the errors under different pressure levels are indicated in Table 2. From which we can draw the same conclusion as regular straight tube, and the accuracy of centerline tends to be stable when reaching the certain pressure levels.

Table 2. The error value of C-type tube.

4.2 Complex Tubular Structure

In this section, we apply our algorithm on some tubular structures that are more complex. We first extract the centerline of a complex regular tube which has several bends with high curvature, and it still performs well, the result is shown as Fig. 6(a). Then a segment of human vessel with several branches is extracted, of which the surface is also rough and not regular, the result is shown in Fig. 6(b).

Fig. 6.
figure 6

Centerline extraction result of complex regular tube and human vessel.

From the results of these two experiments, we confirm that our algorithm is universal and robust, which can be used to extract the centerline of complex tubular object with high accuracy.

5 Conclusion

In this paper, a novel approach of 3D tubular object centerline extraction based on steady-state fluid dynamics is proposed. In fluid simulation, we adopt the Finite Volume Method to compute the N-S formula to simulate the steady-state fluid in the objects and obtain the pressure point clouds data. In isobaric surface extraction, the Marching Tetrahedra Method is used to extract the isobaric surfaces from the tetrahedralized pressure data. In directed tree construction, the construction of the directed tree and the removal of the excess branches are carried out by using the characteristics of the pressure distribution as well as the inlet and outlets positions. Finally, a smooth, single-pixel centerline is fitted through the C-R spline.

In the future work, we will apply this centerline extraction method to the path planning and navigation of minimally invasive vascular surgery to achieve a high-precision, eye-coordinated surgical path planning system.