1 Introduction

In the context of medical applications, the development of new image modalities and medical treatments is a source of interesting mathematical problems. The current available 3D scans of the human body allow the implantation of stents in the vascular system. A critical issue in stent implantation is the length of the stent required for the treatment. This length is usually measured based on the length of the centerline of the artery between 2 points, but the estimation of this centerline is usually noised which can provide an inaccurate estimation of the length of the stent. Inspired by this practical problem we study in this paper the regularization of 3D curves connecting 2 points. We will use an extension to 3D of the geodesic active contour energy formulation introduced by Caselles et al. in the seminal paper [1].

Let \(\mathcal {\tilde{C}}:[0,1]\rightarrow R^{3}\) be a 3D curve satisfying the following boundary condition:

$$\begin{aligned} \mathcal {\tilde{C}}(0)=p_{0}\qquad \mathcal {\tilde{C}}(1)=p_{1}, \end{aligned}$$
(1)

for some \(p_{0},p_{1}\in R^{3}\). We consider the minimization problem given by the energy:

$$\begin{aligned} {\mathcal {E}}(\mathcal {\tilde{C}})\equiv \int _{0}^{1}g(\mathcal {\tilde{C} }(q))\Vert \mathcal {\tilde{C}}_{q}(q)\Vert dq, \end{aligned}$$
(2)

where \(g:R^{3}\rightarrow R,\)\( \mathcal {\tilde{C}}_{q}(q)\) is the tangent vector to the curve \( \mathcal {\tilde{C}}\) at the point \( \mathcal {\tilde{C}}(q)\) given by the first derivative of \( \mathcal {\tilde{C}}(q)\) at q, and \(\Vert . \Vert \) is the \(L^2\) norm. In the context of 3D curve regularization, given an original curve \(\mathcal {\tilde{C}}^{0},\) we define \(p_0=\mathcal {\tilde{C}}^{0}(0)\), \(p_1=\mathcal {\tilde{C}}^{0}(1)\) and g as

$$\begin{aligned} g(x)=d(x,\mathcal {\tilde{C}}^{0})+w, \end{aligned}$$
(3)

where \(d(x,\mathcal {\tilde{C}}^{0})\) is the Euclidean distance of a 3D point x to \(\mathcal {\tilde{C}}^{0}\) and \(w\ge 0\) is a regularization parameter. Notice that for all \(w\ge 0\) the function g(.) is nonnegative and in the case \(w=0\), the global minimum of the energy \({\mathcal {E}}(\mathcal {\tilde{C}})\) is attained in \(\mathcal {\tilde{C}}\equiv \mathcal {\tilde{C}}^{0}\) \(({\mathcal {E}}(\mathcal {\tilde{C}}^{0})=0)\). However, if \(w>0\), then, a regularization effect is introduced because we penalize high values of the curve length and the minima of energy \({\mathcal {E}}(\mathcal {\tilde{C}})\) are expected to be a regularization of \(\mathcal {\tilde{C}}^{0}\). The larger the value of w, the stronger the regularization effect.

Equation (2) is an extension to 3D of the geodesic active contour formulation in 2D, introduced by Caselles et al. in [1]. As shown in [1], \({\mathcal {E}}(\mathcal {\tilde{C}})\) corresponds to a new curve length definition obtained by weighting the Euclidean element of length \(ds=\Vert \mathcal {\tilde{C}}_{q}(q)\Vert dq\) by \(g(\mathcal {\tilde{C}}(q)).\) Notice that if we denote by \({\mathcal {C}}(s)\), the curve \(\mathcal {\tilde{C}}(q)\) reparameterized using the arc-length s,  then

$$\begin{aligned} {\mathcal {E}}(\mathcal {\tilde{C}})=\int _{0}^{\mid \mathcal {\tilde{C}} \mid }g({\mathcal {C}}(s))ds, \end{aligned}$$
(4)

where \(\mid \mathcal {\tilde{C}}\mid \) is the curve length. In this paper, we will show that if \({\mathcal {C}}(s)\) is the arc-length reparametrization of a local minimum of \({\mathcal {E}}(\mathcal {\tilde{C}})\), then \({\mathcal {C}}\) satisfies the Euler-Lagrange equation

$$\begin{aligned} \nabla g({\mathcal {C}})-<\nabla g({\mathcal {C}}),{\mathcal {C}}_{s}>{\mathcal {C}} _{s}-g({\mathcal {C}}){\mathcal {C}}_{ss}=0, \end{aligned}$$
(5)

with \({\mathcal {C}}(0)=p_0\) and \({\mathcal {C}}(\mid {\mathcal {C}} \mid )=p_1\). \(\nabla g\) represents the gradient of the function g, \(<.,.>\) the scalar product of vectors, and \({\mathcal {C}}_{s}\) and \({\mathcal {C}}_{ss}\) represent, respectively, the first and second derivative of the curve \({\mathcal {C}}\) with respect to the arc-length parameter s. We will use this Euler-Lagrange equation to approximate numerically the local minima of \({\mathcal {E}}(\mathcal {\tilde{C}})\) and we will present some experiments on real data in the context of aortic centerline regularization.

The rest of the paper is organized as follows: in Sect. 2, we present some related works. In Sect. 3, we study the Euler-Lagrange equation of the energy \({\mathcal {E}}(\mathcal {\tilde{C}})\) and its interpretation in terms of the Frenet–Serret frame. In Sect. 4, we present some qualitative properties of the minima of \({\mathcal {E}}(\mathcal {\tilde{C}})\). In Sect. 5, we present a numerical scheme to approximate local minima of \({\mathcal {E}}(\mathcal {\tilde{C}})\) using the steepest-descent method. In Sect. 6 we present some numerical results in the context of aortic centerline regularization using real data. Finally, in Sect. 7, we draw some conclusions.

2 Related work

The energy \({\mathcal {E}}(\mathcal {\tilde{C}})\) is an straightforward extension to 3D of the geodesic active contours introduced by Caselles et al. in 2D [1]. The elegant energy formulation of the geodesic active contours have been extensively used in the literature in the last years. However, in the original geodesic active contours, the authors study a completely different problem: the detection of object contours. In particular, the shape of the function g in the energy \({\mathcal {E}}(\mathcal {\tilde{C}})\) is completely different to the one we propose in the Eq. (3). On the other hand, in the geodesic active contours, the curves are closed and the authors do not use the boundary condition (1) to connect two fixed points. An extension of the geodesic active contours using the boundary condition (1) in 2D has been proposed in [2].

In [3] and [4], the authors study the problem of 3D curve smoothing using the evolution equation:

$$\begin{aligned} {\mathcal {C}}_{t}=-\nabla d_{\partial A}({\mathcal {C}})+w k{\mathcal {N}}, \end{aligned}$$
(6)

where \({\mathcal {N}}\) is the normal and k the curvature. This is an heuristic formulation of the smoothing process which does not take into account the correct formulation of the Euler–Lagrange equation of energy \({\mathcal {E}}(\mathcal {\tilde{C}})\) that we study in this paper.

In [5] and [6], some energies for curvature penalized minimal paths are proposed to regularize 2D curves. In [7], the authors propose a minimal path approach for tubular structures segmentation in 2D images with applications to retinal vessel segmentation. In [8] , the authors introduce a method for the automatic estimation of the aorta segmentation and the centerline estimation.

3 Euler–Lagrange equation of \({\mathcal {E}}(\mathcal {\tilde{C}})\)

Theorem 1

Let us consider a family of curves \(\mathcal {\tilde{C}}:(-\epsilon ,\epsilon )\times [0,1]\rightarrow R^{3}\) where \(\mathcal {\tilde{C}}(u,q)\) is a \(C^{2}\) function and \({\mathcal {C}}(s)\) is the arc-length parameterization of \(\mathcal {\tilde{C}}(0,q)\) then

$$\begin{aligned} \frac{d}{du}{\mathcal {E}}(\mathcal {\tilde{C}}(u))\left| _{u=0}\right. =\int _{0}^{\mid {\mathcal {C}}\mid }<\nabla g({\mathcal {C}})-<\nabla g({\mathcal {C}}),{\mathcal {C}}_{s}>{\mathcal {C}}_{s}-g({\mathcal {C}} ){\mathcal {C}}_{ss},{\mathcal {C}}_{u}>ds. \end{aligned}$$
(7)

Proof

: we follow the technique showed in [1] (Appendix B) adapted to the 3D case. By deriving \({\mathcal {E}}(\mathcal {\tilde{C}})\) with respect to u,  we obtain:

$$\begin{aligned}&\frac{d}{du}{\mathcal {E}}(\mathcal {\tilde{C}})=\int _{0}^{1}\frac{d}{du}g(\mathcal {\tilde{C}})\Vert \mathcal {\tilde{C}}_{q}\Vert dq+\int _{0}^{1}g(\mathcal {\tilde{C}})\frac{d}{du}\Vert \mathcal {\tilde{C}}_{q}\Vert dq= \\&\quad \int _{0}^{1}<\nabla g(\mathcal {\tilde{C}}),\mathcal {\tilde{C}}_{u}>\Vert \mathcal {\tilde{C}}_{q}\Vert dq+\int _{0}^{1}<g(\mathcal {\tilde{C}} )\frac{\mathcal {\tilde{C}}_{q}}{\Vert \mathcal {\tilde{C}}_{q}\Vert },{\mathcal {C}}_{uq}>dq, \end{aligned}$$

integrating by parts in the second term and taking into account the boundary conditions we obtain:

$$\begin{aligned} \frac{d}{du}{\mathcal {E}}(\mathcal {\tilde{C}})&=\int _{0}^{1}<\nabla g(\mathcal {\tilde{C}}),\mathcal {\tilde{C}}_{u}>\Vert \mathcal {\tilde{C}} _{q}\Vert dq-\int _{0}^{1}<\frac{d}{dq}\left( g(\mathcal {\tilde{C}} )\frac{\mathcal {\tilde{C}}_{q}}{\Vert \mathcal {\tilde{C}}_{q}\Vert }\right) ,\mathcal {\tilde{C}}_{u}>dq=\\ \int _{0}^{1}&<\nabla g(\mathcal {\tilde{C}}),\mathcal {\tilde{C}}_{u}>\Vert \mathcal {\tilde{C}}_{q}\Vert dq-\int _{0}^{1}<\nabla g(\mathcal {\tilde{C}}),\mathcal {\tilde{C}}_{q}> <\frac{\mathcal {\tilde{C}}_{q}}{\Vert \mathcal {\tilde{C}}_{q}\Vert },\mathcal {\tilde{C}}_{u}>dq\\ -\int _{0}^{1}&<g(\mathcal {\tilde{C}})\frac{d}{dq}\left( \frac{\mathcal {\tilde{C}}_{q}}{\Vert \mathcal {\tilde{C}}_{q}\Vert }\right) ,\mathcal {\tilde{C}}_{u}>dq, \end{aligned}$$

Taking into account that

$$\begin{aligned} \frac{d}{dq}\left( \frac{\mathcal {\tilde{C}}_{q}}{\Vert \mathcal {\tilde{C}}_{q}\Vert }\right) ={\mathcal {C}}_{ss}\Vert \mathcal {\tilde{C} }_{q}\Vert , \end{aligned}$$

we obtain the theorem statement, that is:

$$\begin{aligned} \frac{d}{du}{\mathcal {E}}(\mathcal {\tilde{C}})\left| _{u=0}\right. =\int _{0}^{\mid {C}\mid }<\nabla g({\mathcal {C}})-<\nabla g({\mathcal {C}}),{\mathcal {C}}_{s}>{\mathcal {C}} _{s}-g({\mathcal {C}}){\mathcal {C}}_{ss},{\mathcal {C}}_{u}>ds. \end{aligned}$$

\(\square \)

As a consequence of this theorem, we obtain that the Euler-Lagrange equation of the energy \({\mathcal {E}}(\mathcal {\tilde{C}})\) is given by the Eq. (5). That is

$$\begin{aligned} \nabla g({\mathcal {C}})-<\nabla g({\mathcal {C}}),{\mathcal {C}}_{s}>{\mathcal {C}} _{s}-g({\mathcal {C}}){\mathcal {C}}_{ss}=0. \end{aligned}$$

Next, we are going to reformulate this equation in terms of the Frenet–Serret frame which associates to each point of the curve, the orthonormal basis \(\mathbf {T}(s),\mathbf {N}(s),\) and \(\mathbf {B}(s)\) defined as follows (see, for instance, [9]) :

  • \(\mathbf {T}(s)=\frac{{\mathcal {C}}_{s}(s)}{\left\| {\mathcal {C}} _{s}(s)\right\| }\) is the unit vector tangent to the curve (notice that as s is the arc-length parameterization of the curve, then \(\left\| {\mathcal {C}}_{s}(s)\right\| \equiv 1\) and \(\mathbf {T}(s)={\mathcal {C}}_{s}(s)\)).

  • \(\mathbf {N}(s)=\frac{\frac{d\mathbf {T}}{ds}(s)}{\left\| \frac{d\mathbf {T}}{ds}(s)\right\| }\) is the normal unit vector. (\(\kappa (s)=\left\| \frac{d\mathbf {T}}{ds}(s)\right\| \) is the curvature which, intuitively, measures how far is the curve to be a straight line.

  • \(\mathbf {B}(s)=\mathbf {T}(s)\times \mathbf {N}(s)\) is the binormal unit vector (the cross product of \(\mathbf {T}(s)\) and \(\mathbf {N}(s)\)).

In the case that \(\left\| C_{ss}(s)\right\| \ne 0,\) we have that the Frenet–Serret frame is well-defined, \({\mathcal {C}}_{ss}(s) = \kappa (s)\mathbf {N}(s)\) and then, using that

$$\begin{aligned} \nabla g({\mathcal {C}})=<\nabla g({\mathcal {C}}),{\mathcal {C}}_{s}>{\mathcal {C}}_s\,+<\nabla g({\mathcal {C}}),\mathbf {N}>\mathbf {N}\,+<\nabla g({\mathcal {C}}),\mathbf {B}>\mathbf {B}, \end{aligned}$$

we can express the Euler–Lagrange equation in terms of the Frenet–Serret frame as:

$$\begin{aligned}<\!\!\nabla g({\mathcal {C}}(s)),\!\mathbf {N}(s)\!\!>\!\mathbf {N}(s)\ +<\!\!\nabla g({\mathcal {C}} (s)),\!\mathbf {B}(s)\!\!>\!\mathbf {B}(s)-g({\mathcal {C}}(s)) \kappa (s)\mathbf {N}(s)=0 \end{aligned}$$
(8)

4 Some qualitative properties of the minima of \({\mathcal {E}}(\mathcal {\tilde{C}})\)

First we show that if the energy \({\mathcal {E}}(\mathcal {\tilde{C}})\) decreases with respect to the energy for the original curve, then the length of the curve also decreases.

Proposition 2

If \(g(x)=d(x, \mathcal {\tilde{C}}^0)+w\), \(w>0\) and \({\mathcal {E}}(\mathcal {\tilde{C}})\le {\mathcal {E}}(\mathcal {\tilde{C}}^0)\) then \(\mid \mathcal {\tilde{C}} \mid \le \mid \mathcal {\tilde{C}}^0 \mid \).

Proof

This result is a straightforward consequence of the following inequality:

$$\begin{aligned} w\mid \mathcal {\tilde{C}}\mid \le {\mathcal {E}}(\mathcal {\tilde{C}})\le {\mathcal {E}} (\mathcal {\tilde{C}}^{0})=w\mid \mathcal {\tilde{C}}^{0}\mid . \end{aligned}$$

\(\square \)

Next, we study the asymptotic state of the minima of \({\mathcal {E}}(\mathcal {\tilde{C}})\) when \(w\rightarrow \infty \).

Proposition 3

Let \(\mathcal {\tilde{C} }(q)\mathcal {=}p_{0}(1-q)+p_{1}q\) be the curve corresponding to the straight segment joining \(p_{0}\) and \(p_{1}\). Let \(\{\mathcal {\tilde{C}}^{w}\}_{w>0}\) a collection of curves satisfying that \({\mathcal {E}}(\mathcal {\tilde{C}}^w) \le {\mathcal {E}}(\mathcal {\tilde{C}})\) for \(g(x)=d(x, \mathcal {\tilde{C}}^0)+w\). Then

$$\begin{aligned} Lim_{w\rightarrow \infty } \mid \mathcal {\tilde{C}}^w \mid = \Vert p_1-p_0\Vert . \end{aligned}$$
(9)

In particular, when \(w\rightarrow \infty \), \(\mathcal {\tilde{C}}^{w}\) approximates the segment joining \(p_0\) and \(p_1\).

Proof

First, we notice that as \(\mathcal {\tilde{C}}^{w}(0)=p_0\) and \(\mathcal {\tilde{C}}^{w}(1)=p_1\) then \(\mid \mathcal {\tilde{C}}^w \mid \ge \Vert p_1-p_0\Vert \). On the other hand:

$$\begin{aligned} w\mid \mathcal {\tilde{C}}^{w}\mid \le {\mathcal {E}}(\mathcal {\tilde{C}}^{w} )\le {\mathcal {E}}(\mathcal {\tilde{C}})=\int _{0}^{1}d(\mathcal {\tilde{C} }(q),\mathcal {\tilde{C}}^{0})\left\| p_{1}-p_{0}\right\| dq+w\left\| p_{1}-p_{0}\right\| , \end{aligned}$$

therefore

$$\begin{aligned} 0\le \mid \mathcal {\tilde{C}}^{w}\mid -\left\| p_{1}-p_{0}\right\| \le \frac{\int _{0}^{1}d(\mathcal {\tilde{C}}(q),\mathcal {\tilde{C}}^{0})\left\| p_{1}-p_{0}\right\| dq}{w}, \end{aligned}$$

and then

$$\begin{aligned} Lim_{w\rightarrow \infty }\mid \mathcal {\tilde{C}}^{w}\mid =\left\| p_{1} -p_{0}\right\| . \end{aligned}$$

\(\square \)

5 Approximation of the local minima of \({\mathcal {E}}(\mathcal {\tilde{C}})\) by the steepest-descent method

According to the result of theorem 1 and the steepest-descent method, to connect an initial curve \({\mathcal {C}}^{0}\) with a local minimum of the energy \({\mathcal {E}}(\mathcal {\tilde{C}})\) we solve the evolution equation:

$$\begin{aligned} {\mathcal {C}}_{t}(t,\!s)\!=\!g({\mathcal {C}}(t,\!s)){\mathcal {C}}_{ss}(t,\!s)-(\nabla g({\mathcal {C}}(t,\!s))-<\!\nabla g({\mathcal {C}}(t,\!s)),{\mathcal {C}}_{s}(t,\!s)\!>{\mathcal {C}}_{s}(t,\!s)), \end{aligned}$$
(10)

the asymptotic state of this evolution equation when \(t \rightarrow \infty \) corresponds to a local minima of \({\mathcal {E}}(\mathcal {\tilde{C}})\). Notice that the vector \(\nabla g({\mathcal {C}}(s))-<\nabla g({\mathcal {C}}(s)),{\mathcal {C}}_{s}(s)>{\mathcal {C}}_{s}(s)\) is the projection of the vector \(\nabla g({\mathcal {C}}(s))\) in the plane orthogonal to \({\mathcal {C}}_{s}(s)\). Moreover, if \(\Vert {\mathcal {C}}_{ss}(s) \Vert \ne 0,\) then \({\mathcal {C}}_{ss}(s)= \kappa (s)\mathbf {N}(s)\) which is also orthogonal to \({\mathcal {C}}_{s}(s)\), therefore the evolution equation makes always move the curve \({\mathcal {C}}\) in the orthogonal plane to the tangent vector \({\mathcal {C}}_{s}\).

In the curve evolution Eq. (10) we use as initial value \({\mathcal {C}}(0,s)={\mathcal {C}}^0(s)\) and the boundary condition \({\mathcal {C}}(t,0)=p_0\) and \({\mathcal {C}}(t,\mid {\mathcal {C}}(t) \mid )=p_1\). Therefore we look for a local minima of \({\mathcal {E}}(\mathcal {\tilde{C}})\) close to te original curve \({\mathcal {C}}^0\). Notice that we always initialize \({\mathcal {C}}(0,s)\) as the original curve and we do not have to deal with the problem of the curve initialization which appears, for instance, in object segmentation using active contours. We also emphasize that the energy \({\mathcal {E}}(\mathcal {\tilde{C}})\) can have, in general, several local minima and that global minima could be quite different to the one we obtain looking for the local minima closer to the original curve \({\mathcal {C}}^0\). The complexity of the structure of the local minima of \({\mathcal {E}}(\mathcal {\tilde{C}})\) strongly depends on the complexity of the geometry of the initial curve \({\mathcal {C}}^0\). For instance, if \({\mathcal {C}}^0\) is an straight segment joining \(p_0\) and \(p_1\), then, \({\mathcal {C}}^0\) is the global minima of \({\mathcal {E}}(\mathcal {\tilde{C}})\). However, for a general curve, the situation can be much more complex. Assume, for instance, that w is small, \(p_0\) and \(p_1\) are very close but \(\mid {\mathcal {C}}^0 \mid \) is much larger than \(\Vert p_1 -p_0 \Vert \), then we can expect that the global minima is close to the segment joining \(p_0\) and \(p_1\) and that this global minima is different of the local minima closer to \( {\mathcal {C}}^0\). In any case, the fact that we use always the original curve as initialization of the steepest descent method strongly reduces the possibility to get trapped in spurious local minima.

We use a basic explicit finite difference scheme to approximate numerically the solution of the evolution Eq.  (10) with the initial value \({\mathcal {C}}(0,s)={\mathcal {C}}^0(s)\) and the boundary condition \({\mathcal {C}}(t,0)=p_0\) and \({\mathcal {C}}(t,\mid {\mathcal {C}}(t) \mid )=p_1\). Numerically, a 3D curve \({\mathcal {C}}\) is given by an ordered collection of 3D points \(\{{\mathcal {C}}^{i}\}_{i=1,..,\chi ({{\mathcal {C}}})}\), where \(\chi ({\mathcal {C}})\) represents the number of points of the curve. By the boundary condition we always have that \({\mathcal {C}}^{1}=p_{0}\) and \({\mathcal {C}}^{\chi ({{\mathcal {C}}})}=p_{1}.\) Notice that in the evolution Eq. (10) the curves are parametrized using the arc-length, therefore we assume that

$$\begin{aligned} \left\| {\mathcal {C}}^{i}-{\mathcal {C}}^{i-1}\right\|&=h\quad \text {for all }i=2,..,\chi ({{\mathcal {C}}})-1,\nonumber \\ \left\| {\mathcal {C}}^{\chi ({{\mathcal {C}}})}-{\mathcal {C}}^{\chi ({{\mathcal {C}})}-1} \right\|&\le h, \end{aligned}$$
(11)

which means that we use a curve parameterization with a constant arc-length \(h>0\). In what follows, we assume, without loss of generality (by scaling the size of \({\mathcal {C}}^{i}\)) that \(h=1\). Given a discretization step dt, we denote by \({\mathcal {C}}^{n,k}\) an approximation of \({\mathcal {C}}(n\cdot dt,k)\). We compute \({\mathcal {C}}^{n,k}\) using the following explicit finite difference scheme:

$$\begin{aligned} \frac{{\mathcal {C}}^{n+1,k}-{\mathcal {C}}^{n,k}}{dt} = g({\mathcal {C}}^{n,k}){\mathcal {C}}_{ss}^{n,k}-(\nabla g({\mathcal {C}}^{n,k})-<\nabla g({\mathcal {C}}^{n,k}),{\mathcal {C}}_{s}^{n,k}>{\mathcal {C}}_{s}^{n,k}) , \end{aligned}$$
(12)

for \(k=2,..,\chi ({{\mathcal {C}})}-1\) and \(n=0,1,..\). \({\mathcal {C}}_{s}^{n,k}\) and \({\mathcal {C}} _{ss}^{n,k}\) are approximations of \({\mathcal {C}}_{s}(n \cdot dt,k)\) and \({\mathcal {C}}_{ss}(n \cdot dt,k)\) computed as:

$$\begin{aligned} {\mathcal {C}}_{s}^{n,k}&={\mathcal {C}}^{n,k}-{\mathcal {C}}^{n,k-1}\\ {\mathcal {C}}_{ss}^{n,k}&={\mathcal {C}}^{n,k+1}-2{\mathcal {C}}^{n,k}+{\mathcal {C}}^{n,k-1}, \end{aligned}$$

We use some algorithms proposed in [4] to deal with two technical issues related with this scheme: the first one is that we need to compute \(g({\mathcal {C}}^{n,k})=d({\mathcal {C}}^{n,k},{\mathcal {C}}^{0})+w\) and \(\nabla g({\mathcal {C}}^{n,k})\), which requires the computation of the 3D distance to a curve. The second one is that after each iteration we have to reparametrize the discrete curve to preserve the condition \(\left\| {\mathcal {C}}^{n,k}-{\mathcal {C}}^{n,k-1}\right\| =1\) for all n and \(k=2,..,\chi ({{\mathcal {C}})}-1\). In both cases we use algorithms proposed in [4] to deal with these issues.

We use as stopping criterion of the iterative scheme (12) the condition

$$\begin{aligned} \frac{ \mid {\mathcal {E}}({\mathcal {C}}^{n})-{\mathcal {E}}({\mathcal {C}}^{n-1}) \mid }{{\mathcal {E}}({\mathcal {C}}^{n})}<TOL, \end{aligned}$$
(13)

\(TOL>0\) and dt are the parameters of the iterative scheme. In the numerical experiments we present in the next section we use \(TOL=10^{-8}\) and \(dt=10^{-4}\).

6 Numerical experiments

We will present some experiments in the context of centerline regularization of blood vessels extracted from a 3D Computed tomography (CT) scan. There are different types of algorithms to extract the centerline of blood vessels (see, for instance, [8, 10]). These algorithms segment the vessel lumen and the vessel centerline is obtained from this segmentation using, for example, the centers of the maximal spheres included in the vessel lumen. The method that we propose can be used to regularize the centerline extracted by any existing method in the literature. It can be considered a post-processing of the obtained centerline. In our knowledge this approach is new and until now the problem of regularizing the 3D curves obtained by these centerlines had not been studied. Centerline regularization is necessary because normally its estimation may include irregularities caused by poor CT quality, or because the patient’s pathologies, such as aneurysms or thrombi, distort the geometry of the vessel lumen and therefore negatively affect the centerline estimation. Correct estimation of the centerline is very important in applications such as stent implantation. Since the stent is a regular and elastic object, the correct estimation of the length of the stent requires an estimation of the centerline through a regular curve.

Fig. 1
figure 1

From left to right we show, for \(w=10,25,50,100\), the initial curve \({\mathcal {C}}^{0}\) (in black) and the curve \({\mathcal {C}}^{{\infty }}\) (in green), which corresponds to the asymptotic state of the iterative scheme (12)

Fig. 2
figure 2

Zoom of some parts of the curves in the Fig. 1 for w = 10 (at the top) and w = 25 (at the bottom)

Fig. 3
figure 3

We show, for \(w=10,25,50,100\), the evolution of the energy \({\mathcal {E}}({\mathcal {C}}^n)\) and the length of the curve \({\mathcal {C}}^n\), solution of the iterative scheme (12), using dual axis charts (on the left the energy and on the right the length). In the horizontal axis we show the value of \(t=n \cdot dt\)

In our experiments, we use, as the original curve \({\mathcal {C}}^0\), the centerline of an aortic lumen computed from a real CT scan using the technique introduced in [8]. The main goal of these experiments is to explore the evolution of the energy, \({\mathcal {E}}({\mathcal {C}}^{n})\), and the length, \(\mid \! \! {\mathcal {C}}^{n} \! \! \mid \), of the curve under the action of the iterative scheme (12), and the influence of w in the results. We denote by \({\mathcal {C}}^{{\infty }}\) the final estimate of the iterative scheme (12) at the stopping time \(t_{\infty }=n \cdot dt\) obtained using (13).

In Fig. 1, we compare the curves \({\mathcal {C}}^{0}\) and \({\mathcal {C}}^{{\infty }}\) for different values of w. As expected, we observe that the larger the value of w, the stronger is the regularization of the curve. For \(w=10\) and \(w=25\) we can not appreciate visually in Fig. 1 any difference between the curves \({\mathcal {C}}^{0}\) and \({\mathcal {C}}^{{\infty }}\). To visualize such differences we show in Fig. 2 some images corresponding to zoom of the curves around some particular points. We can clearly appreciate in this figure the regularization effect of the minimization of the energy \({\mathcal {E}}({\mathcal {C}})\).

In Fig. 3 we show, for different values of w, the evolution of the energy \({\mathcal {E}}({\mathcal {C}}^n)\) and the length of the curve \({\mathcal {C}}^n\), solution of the iterative scheme (12). We observe a nice convergence behavior of the iterative scheme: the energy and the length of the curve decrease sharply at the beginning, then the energy stabilizes and finally the stopping time \(t_{\infty }\) is reached using criterion (13).

In Table 1, we show, for different values of w, the initial and final values of the energy, the length of the curve (in millimeters) and the stopping time \(t_{\infty }\) of the iterative scheme. We observe a significant reduction of the value of the energy \({\mathcal {E}}({\mathcal {C}})\). The reduction of the length of the curve and the stopping time strongly depend on the value of w.

An important practical issue in the applications is the choice of the regularization parameter w. To illustrate the influence of the parameter w in the curve regularization process we have used, in the experiments, high values of w and we have observed that the result obtained is the expected one taking into account the mathematical formulation of the model. In real applications, such as the regularization of blood vessels, the value of w that would be taken is, usually small, below \(w=10\), since what is required, in general, is to obtain a regular curve but close to the original one. In any case, w is a parameter of the algorithm that will have to be adjusted according to the noise level of the original centerline. As explained above, the noise that the centerline presents can depend on the quality of the CT scan, the pathologies that the patient presents or the particular algorithm used to estimate the centerline.

Table 1 We show, for different values of w, the initial and final values of the energy, the length of the curve (in millimeters) and the stopping time \(t_{\infty }\) of the iterative scheme

7 Conclusion

3D curve regularization is an interesting mathematical problem which appears in a natural way in medical applications. To deal with this problem, we extend to 3D the elegant energy formulation of the geodesic active contours introduced by Caselles et al. in [1]. We show the Euler-Lagrange equation of the energy, some qualitative properties of the minima and we use the steepest-descent method to design an iterative numerical scheme to approximate local minima of the energy based on the associated evolution equation. We present some experiments on real data which show that the proposed iterative scheme works quite well. The energy value decreases sharply across iterations until the convergence of the algorithm. We also found that, as expected, the regularization parameter w determines the regularity and length of the final curve obtained as the asymptotic state of the iterative scheme. The larger the value of w, the smoother the regularized curve and the shorter its length.

Supplementary information

We provide an ASCII text file with the point coordinates of the 3D curve used in the experiments corresponding to the aortic centerline extracted from a CT scan.