Centerline Planning of Virtual Endoscopy Using B-Snake Model

—A novel centerline planning algorithm for virtual endoscopy is proposed. It can be executed in original images data directly, no longer subjects to the results of segmentation. It is based on B-Snake model, and a moving polyhedron centralize method is defined, which provides a centralizing force as the external force of B-Snake model. And the internal force of the Snake model is removed, so as to control the model easily. With the characteristic of B-spline, a few control points are chosen and the smooth and continuous centerline is got effectively. Error analysis and experimental results show the validity of the proposed method.

INTRODUCTION Virtual endoscopy is the computerized creation of images depicting the inside of patient anatomy reconstructed in a virtual reality environment [1]. It permits interactive, noninvasive, 3-dimensional visual inspection of anatomical cavities or vessels. This can aid in diagnostics, help in the preparation of a surgical intervention, and potentially replacing an actual endoscopic procedure. A virtual endoscopy system usually consists of five key models, including image acquisition, image segmentation, path planning, real-time rendering and navigation [2]. Among these models, navigation is one of the most important ones, which provides the interactive user interface. But manual navigation is very difficult, time-consuming and easy to get lost. To let users as roaming as traditional endoscope, it is need to pre-plan their navigation path, on which the virtual endoscope can get the best viewing position to detect and locate the lesion area. Usually the centerline of tubular structure is extracted as a navigation path.
Recently, many centerline planning algorithms are invented to extract the centerline of tubular organs automatically. In general, they can be divided in three classes: topological thinning, distance mapping and energy model [3,4,5]. However, most of these algorithms are based on the results of segmentation, and have high computational complexity. Centerline planning has become a bottleneck restricting the development of virtual endoscopic techniques [6].
In this paper, a novel centerline planning algorithm based on B-Snake model is proposed, which does not require pre-segmentation, and can be used to extract centerline of anatomical cavities directly in original images. The algorithm makes full use of the advantages of the active contour model and the performance of B-spline function. The internal energy of the traditional Snake model is removed in the B-Snake model, so that the model parameters are easier to control. The outstanding contribution of this paper is to design a moving polyhedron centralize method for providing the B-Snake model external force. By building a polyhedron for each spline node, and minimizing the distance from the spline node to each vertex of the polyhedron, which will move the node to the center of cavity, B-Snake model has the force tending to the cavity center. Taking advantage of the local support of B-spline and its continuity [7], the proposed centerline planning algorithm can choose only a few number of spline control points to obtain a smooth, continuous centerline. The experimental results show that the algorithm is efficient, robust to meet the requirements of the virtual endoscopic navigation.
The architecture of the paper is organized as following: in part II, we give a brief review of the basic B-Snake model theory. In part III, a moving polyhedron centralize method is designed for providing model external force, and the process of the proposed algorithm is descripted in part IV. We test the novel algorithm by artificial and real data respectively in part V. Finally, part VI is the conclusion of this paper.

II. B-SNAKE MODEL
The first two terms of the equation is the internal energy of Snake model used to constrain the contour shape, ( ) s α and ( ) s β are weighting parameters representing the degree of the smoothness and tautness of the contour, respectively. The last one of the equation is external energy from the target image features or external constraints, attracting the model contour evolution to the target feature.
Although the advantages of Snake model are significant, but there are many defects when using it to extract the centerline of tubular structure in virtual endoscopy. First, it is difficult to set the parameters of model, which are usually set by experience. Second, since the gray-scale variation in tubular structure is small, the corresponding model external force based on gradient information is also small; the model curve will shrink into a point by the internal elastic force of model. SPECIAL FOCUS PAPER CENTERLINE PLANNING OF VIRTUAL ENDOSCOPY USING B-SNAKE MODEL From the original philosophy of Snake, an alteration is using a parametric B-Spline representation as the curve descriptor. The energy function of B-Snake model can be described as [9]: where ( ) C t is the model curve which is the linear combination with cubic B-spline curve: Where t means the sampling time, and ( ) i C t is defined as: Compared to traditional point-based Snake, the B-Snake greatly reduces the number of state variables required for a Snake [9]. Due to the local support of Bspline, only a few control points can get effective results, so the computational complexity is greatly reduced. What is more, since the hard constraints of B-spline ensure the model curve is continuous and smooth, so the internal force of Snake model can be removed, the parameters of model are reduced correspondingly. In this case, the total energy of B-Snake model simplifies to: Here we can see the focus is on the model external energy, that is the definition of the external force in B-Snake model. A number of external energy terms have been proposed [10,11]. Most of these approaches use the boundary information of image. However these external energy terms cannot be used efficiently for centerline planning of virtual endoscopy because of the missing of boundary information at the center of tubular structure.

III. DEFINITION OF EXTERNAL FORCE
In order to let a virtual endoscope get as broad vision as possible when navigation, the centerlines of tubular structures are usually extracted as navigation paths of virtual endoscopy, and the centerlines are usually expressed as the medial axis of lumen. The medial axis refers to a set of points, which are center points of a series of largest spheres tangent to the boundary of tubular structures. Figure 1 shows a sketch map of centerline, the dotted line represents the trajectory of the medial axis.
The ideal centerline getting by path planning technology should be the medial axis, but when using the traditional distance mapping or the simple Dijkstra shortest path algorithm to extract centerline [12], the results usually tent to hug the corner, especially at the sharp turn (Fig.2). In this part, we will propose a moving polyhedron centralize method, which can provide the external force for B-Snake model to pull the model curve around boundary to the center of tubular structures.
Assuming the model curve is initialized already, which is just located inside the tubular structures (Fig.2), and j q is any point on it, l is the cross-sectional radius of  Fig.3. Taking j q as center and l as radius can form a sphere, if it intersects with the surfaces of tubular organs, the intersecting part should be replaced with the internal surface of lumen, thereby forming a spheroid, which has an elastic force tend to the center of tubular organs. Since it is complex to create a sphere and to determine whether it intersects with the surface of lumen, a sphere is instead with its' within polyhedron. From the point j q , 6n (n>1, 6 means the neighborhood of a point) lines are radiated equiangular, where the maximum length of a ray is radius l . All rays will intersect with the spheroid, and 6n cross points form a polyhedron. Supposing the distance from j q to any cross points is i l ， [1,6 ] i n ∈ , to minimize the value of The principle of moving polyhedron centralize method can be described based on mechanical engineering. Supposing the built polyhedron has uniform density, only when it be a regular polyhedron, its' centroid would be consistent with its' geometric center, where the sum of distance to every vertex is shortest. We can presume the point j q as centroid, when a line's length radiated from j q is larger than the distance to the boundary of object, as shown in Figure 1, the line would be truncated by the boundary, and the constructed polyhedron should not be a regular one, so the value of 6 1 n i l  is no longer the minimum one. In order to get the minimum value, the point j q has to move to the geometric center of polyhedron, from which a new series lines will be radiated, and a new polyhedron is created. And so on, the series of moving polyhedron make the point j q moving to the medial axis of tubular structure. Since j q is any point on the model curve, when it is the center of tubular structures, the model curve is consistent with the medial axis. Then defining the B-Snake model external force as: where i w is scaling factor, and i C is spline node.
Supposing the number of spline nodes is m , the discrete form of B-Snake model can be described as: IV. ALGORITHM DESCRIPTION The proposed B-Snake model is very simple to initialize. It is only require the initial curve located in the interior of objects according to previous section. So we can connect start and end points directly as the initial path in case of smaller curvature region, where tubular structure is relatively straight. As for the higher curvature region, the Dijkstra shortest path method is provided to obtain the initial spline curve.
Our centerline planning algorithm can be executed in original images data directly, where the image grayscale information among different organs is used to determine whether the line radiated from any spline node is intersect with the boundary of objects. The gray information inside lumen, including the maximum and minimum gray value, can be provided by user, and also can be obtained according to the gray range of initial spline curve. To radiate a line from any spline node, if the gray value on the line exceeds the gray range inside lumen, which means the line reaches the boundary of lumen, then stop growing the line, and save the length of it, if not, the maximum length of the line is the cross-sectional radius l of tubular organs. Here, the value of l is set by user. Obviously, setting a larger radius can fast the initial spline node close to the lumen center. But if too larger, it will lead the final spline node deviate from the actual lumen center.
The number of spline control points is set adaptively according to the curve curvature. More spline control points are set for high curvature curve, few ones are set for low curvature curve, so that it is not only ensuring the realistic of spline curve, but also improving the efficiency of the proposed algorithm. First, few spline control points are selected uniformly in the initial model curve. The curvature of a spline control point i P is defined as: where is the vector from point 1 i P − to point i P , is the vector from point i P to point 1 i P + , If the curvature i K is greater than a given threshold value, then to insert two control points between 1 i P − and i P , i P and 1 i P + respectively, and then to recalculate the curvature at every spline control point, until the curvature at all control points is less than the given threshold value. The steps of our algorithm are summarized as follows: 1) Using moving polyhedron centralize method, to move the initial and end points entered by the user to the center of the cavity as the start and end points of the spline curve.

A. Error Analysis
In order to verify the effectiveness of the proposed algorithm, we first use it to extract center path in synthetic image, where the centerline is already known, so that, the error can be quantitatively analyzed, by measuring the approximation of the extracted spline curve and the actual centerline. The shortest distance between the two curves reflects the approximation. Here, we calculate the Euclidean distance from any point in the extracted spline curve to its' nearest point in the actual centerline, and choose the minimum value as the shortest distance. Euclidean distance is a straight line distance between two points in image space: where , x y p p and , x y q q are coordinate value of two points in image space. Figure 4 shows the experimental results in two-dimensional space, where the number of radial lines is 2 6 × , the solid line near the boundary is the initial curve, the dotted line in the middle of the cavity is the extracted center path, and the solid line in the middle is the actual centerline of the cavity.
The proposed algorithm is implemented in Matlab and the execution time is statistic on a PC Intel Duo Core 2.4 GHz CPU and 2 GB RAM. Table 1 provides the error statistics between the extracted center path and the actual centerline, when the moving polygon has different sides. In order to comparison, the number of the spline nodes is all selected as 8. Table 1 shows that along with the increase of the number of polygon sides, the error reduces, but at the same time the computing time increases. From the average distance error statistics, we can see when the number of sides is 12, the error is already the sub-pixel level. Taking into account the computational complexity, we select the number of polygon sides as 4 6 × in experiments.

B. Centerline Planning
According to the curvature of the lumen, two initialization methods for B-Snake model are provided. To a relatively flat tubular structure, the model curve is initialized as the line segment connecting start and end points. Figure 5a shows a MIP image ( 96 115 × ) from liver CT image. The curve in it is the model initial curve which is directly connected the start point( × ) and the end point( * ). And the two points are moved by the moving polyhedron centralize method from the initial and end points entered by the user respectively. By experience, we set the maximum radius of the blood vessels with 5mm, and the maximum and minimum gray values in the blood vessels with 255 and 180 respectively. The number of moving polygon sides is 4 6 × , and 6 spline nodes are selected by interpolation. The final center path is shown in Figure 3b, and the total processing time is 1.23 seconds. Figure 6 shows the process of extracting centerline of blood vessels from a two-dimensional pulmonary reconstruction image. Since it has high curvature, the model curve is initialized by the Dijkstra shortest path method. And by analysis of the gray information on the initial curve, the maximum and minimum gray values inside the blood vessels are set with 255 and 170 respectively. The maximum radius of the blood vessels is set with 9mm by user. When sampled the initial spline curve with equation (8), the curvature threshold is 0.15, which is the curvature at the vertex of parabola. And 16 spline nodes are obtained finally. Figure 4b shows the final center path from start point to end point, and the total processing time is 1.92 seconds.

C. Development Application
Our proposed algorithm not only applies in the centerline planning of virtual endoscopy, but also can be used to segment tubular organs. Since by the moving polyhedron centralize method, the spline nodes on the final curve is the geometry center of polyhedron, where the sum of distance to every vertex is shortest, so it can be considered as the medial axis point. And the average distance of the sum can be regarded as the radius of the organ at the spline nodes. Known each center point of lumen and its radius at the point, it is easy to reconstruct the corresponding lumen. In experiment, B-spline interpolation is used to smooth the radius of each spline node, so as to obtain the smooth surface of the segmentation results of tubular organs from the starting point to the end point. Fig. 7 shows a section of thoracic aortic reconstruction results by our method, where the dotted line is the center path.

VI. CONCLUSION
The path planning is one of the key technologies of the virtual endoscopy. The proposed B-Snake model for centerline planning is an effective complement to the path planning technology. Our algorithm can directly extract the center path of the organ in original images. There is no need of pre-segmented tubular organs, so expanding the application environment for path planning technology. A moving polyhedron centralize method was defined to provide the external force of B-Snake model for spline node tending to the center of cavity. Taking advantage of the continuity and smoothness of B-spline, B-Snake model removed the internal energy of traditional Snake model, so it was easier to set the model parameters.
What's more, based on the local support of spline function, the less spline control points were used to extract the center path, so it is more efficient than traditional Snake model.