# Cannot obtain the center line.

**URL:** <https://discourse.slicer.org/t/cannot-obtain-the-center-line/18112>\
**Category:** VMTK\
**Created:** [June 14, 2021, 1:27pm UTC](https://discourse.slicer.org/t/cannot-obtain-the-center-line/18112 "2021-06-14T13:27:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![zhang-qiang-github](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/zhang-qiang-github/32/9019_2.png) [@zhang-qiang-github](https://discourse.slicer.org/u/zhang-qiang-github)\
**Post date:** [June 14, 2021, 1:27pm UTC](https://discourse.slicer.org/t/cannot-obtain-the-center-line/18112/1 "2021-06-14T13:27:25Z")

</div>

I have two arteries, like:

[![](https://user-images.githubusercontent.com/29271051/121808984-94924100-cc8d-11eb-8738-6c624480890d.png) ](https://user-images.githubusercontent.com/29271051/121808984-94924100-cc8d-11eb-8738-6c624480890d.png)

I can obtain the centerline for one artery, but fail for the other one. It failed to obtain the centerline between the two red point.

The running code is:

```auto
vmtksurfacereader -ifile E:\\DeepCenterLine\\vessel_smooth30.vtp --pipe vmtkcenterlines --pipe vmtkrenderer --pipe vmtksurfaceviewer -opacity 0.25 --pipe vmtksurfaceviewer -i @vmtkcenterlines.o -array MaximumInscribedSphereRadius

```

I have updated the `vessel_smooth30.vtp` to [github](https://github.com/zhang-qiang-github/vmtkdata).

Actually, I run it using python code, and a warning is reported:

```auto
vtkvmtkSteepestDescentLineTracer: can't find a steepest descent edget. Target not reached.

```

The source point is: [44, 398, 151], and the target point is: [47, 403, 558]

How to obtain the center line from [44, 398, 151] to [47, 403, 558].

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [September 7, 2021, 7:11pm UTC](https://discourse.slicer.org/t/cannot-obtain-the-center-line/18112/2 "2021-09-07T19:11:07Z")

</div>

I would recommend to try the Extract Centerline script in 3D Slicer’s SlicerVMTK extension. If that does not work then let us know (I could not try, as the link was not valid anymore).
