# Presenting two modules that combine steps for \*common\* arterial segmentation

**URL:** https://discourse.slicer.org/t/presenting-two-modules-that-combine-steps-for-common-arterial-segmentation/20312
**Category:** Development
**Created:** [October 23, 2021, 2:11pm UTC](https://discourse.slicer.org/t/presenting-two-modules-that-combine-steps-for-common-arterial-segmentation/20312 "2021-10-23T14:11:05Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![chir.set](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/chir.set/32/66982_2.png) [@chir.set](https://discourse.slicer.org/u/chir.set)
#### Post date: [October 23, 2021, 2:11pm UTC](https://discourse.slicer.org/t/presenting-two-modules-that-combine-steps-for-common-arterial-segmentation/20312/1 "2021-10-23T14:11:05Z")

</div>

Here are two small modules that _combine_ the different usual steps to segment _small_ portions of arteries on CT angioscans, with an ultimate goal of extracting centerlines. They do not target ‘head to toe’ segmentations.

They are definitely useful to me as time saving tools, and I present them here under the assumption that they might be useful to others. However, if this post is perceived as dead noise, please apologize in advance.

Both of them remote control the ‘Segment editor’ modules and the ‘Extract centerline’ modules. Internally, API calls are made as much as possible, else, UI gestures are simulated. The latter part may be seen as a ‘macro style’ approach.

[Fiducial centerline extraction](https://github.com/chir-set/MetaCenterlineExtraction/tree/main/FiducialCenterlineExtraction/)

This module uses fiducial points as input, placed inside the arterial lumen. An ROI must be used to limit segmentation to a targeted small region. Each fiducial point will be an endpoint in the ‘Extract centerline’ module.

 ![carotid_0](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/b/5/b56129a887369b76f6be043c04694337c36eeb0b.png)

It is suitable for common regions dealt with in vascular surgery (aorto-iliac bifurcation, carotid bifurcation, visceral arteries with the aorta…), with ‘goodly sized’ arteries. The resulting segmentation is usually of good quality and centerline extraction succeeds readily. This module is not that much time consuming.

[Curve centerline extraction](https://github.com/chir-set/MetaCenterlineExtraction/tree/main/CurveCenterlineExtraction/)

This one uses a markups open curve as input, to produce a single tube as output. Each control point _must_ be placed in the lumen, else the resulting segmentation will be a malformed time consuming lump.

It targets otherwise difficult to segment vessels, with poor contrast or very small or surrounded by veins with excessive contrast. In practice, I’ve seen it so far quite efficient for diseased small vessels like distal visceral arteries, or subclavians that are surrounded by many bones. Segmenting left anterior descending and right coronary arteries have produced good results too. Even with the greater saphenous vein, when there is sufficient contrast in it in CT angioscans studying arteries.

Control point placement is determining. A few points can be placed in a ‘Volume rendering’ 3D view, or in slice views, followed by curve resampling. Next, each point must be checked to lie in the lumen. This is yet time consuming.

The first and last points will be endpoints to ‘Extract centerline’ module, and are not used for segmentation. It is therefore helpful that the second control point be reasonably close to the first point, and that the before last one be close to the last point.

The resulting segmentation mush be checked in slice views, so that is not excessive, overlapping on calcifications, or insufficient.

Centerline extraction may often fail however. In such cases, smoothing with ‘Fill holes’ at minimal kernel size helps to create centerlines (smoothing is faster using the 3D brush). After smoothing, work should be continued directly in ‘Extract centerline’ module obviously. It is recommended to save work done before extracting centerlines, because this may crash Slicer on poor quality segments.

Whether with the segmentation step or with extracting centerlines, post-procesing is often needed here.

This module might perhaps be more suitable for research work. Its targeted approach by point placement is probably its main interest.

 ![anterior_communicating_0](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/8/3/83f84016890df24007446cb0f08905bebdc59ea7.jpeg)

 ![right_subclavian](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/a/0/a02a1ed50ee355a0a9ee30d49f6cf1ad5813f8d5.png)

In the hope that they might be useful to others.

Regards.

---

<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: [October 23, 2021, 10:47pm UTC](https://discourse.slicer.org/t/presenting-two-modules-that-combine-steps-for-common-arterial-segmentation/20312/2 "2021-10-23T22:47:28Z")

</div>

Thank you for sharing these modules. It would be nice if you could record a video of a typical case (preferably on one of the Slicer sample data sets) just in case someone has difficulty following the written instructions.

You could also consider submitting these modules to the extensions index. You can do that by either moving them to Slicer VMTK extension (a bit less work) or submit your extension (a bit more visibility at the cost of some maintenance and support workload). Based on all your contributions and experience in Slicer extension development, you could now get direct write access to SlicerVMTK extension, so you would not have to wait for your changes to be reviewed each time.

---

<div class="post-metadata">

### Author: ![chir.set](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/chir.set/32/66982_2.png) [@chir.set](https://discourse.slicer.org/u/chir.set)
#### Post date: [October 24, 2021, 1:29pm UTC](https://discourse.slicer.org/t/presenting-two-modules-that-combine-steps-for-common-arterial-segmentation/20312/3 "2021-10-24T13:29:10Z")

</div>

> [@lassoan](#):
>
> record a video

Here are links for 3 studies :

Centerline [extraction](https://disk.yandex.com/i/HYdOroqLlpiPyA) with fiducials in Panoramix-Abdomen sample  
Curve [extraction](https://disk.yandex.com/i/Y9YzUNOYHiN58A) of the right subclavian artery in CTA-cardio  
Curve [extraction](https://disk.yandex.com/i/xmbf6mY4VIDdPw) of the left internal mammary artery in CTA-cardio

The third one is quite lengthy, but it shows a very challenging segmentation.

---

<div class="post-metadata">

### Author: ![chir.set](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/chir.set/32/66982_2.png) [@chir.set](https://discourse.slicer.org/u/chir.set)
#### Post date: [October 24, 2021, 1:34pm UTC](https://discourse.slicer.org/t/presenting-two-modules-that-combine-steps-for-common-arterial-segmentation/20312/4 "2021-10-24T13:34:05Z")

</div>

> [@lassoan](#):
>
> moving them to Slicer VMTK extension

Thank your for considering these modules fit for inclusion in Slicer VMTK extension. That’s what I prefer indeed.

> [@lassoan](#):
>
> you could now get direct write access to SlicerVMTK extension

Thanks again for this proposal. I’ll do all necessary edits for pointing the documentation at the right place. How does the write access grant happen ? What should I wait for ? What should I do then ?

Regards.

---

<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: [October 26, 2021, 2:33am UTC](https://discourse.slicer.org/t/presenting-two-modules-that-combine-steps-for-common-arterial-segmentation/20312/5 "2021-10-26T02:33:18Z")

</div>

> [@chir.set](#):
>
> Thanks again for this proposal. I’ll do all necessary edits for pointing the documentation at the right place. How does the write access grant happen ? What should I wait for ? What should I do then ?

I’ve sent you an invitation to get write access (you should have received a notification but you can also click [here](https://github.com/vmtk/SlicerExtension-VMTK/invitations) to accept it). After accepting the invitation you can commit changes directly into the SlicerExtension-VMTK repository. You can use that to add and make changes to your new modules; or make any other simple changes. If you are not sure about any change or there is something more complicated then you can create a pull request and go through the usual review process.

---

<div class="post-metadata">

### Author: ![chir.set](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/chir.set/32/66982_2.png) [@chir.set](https://discourse.slicer.org/u/chir.set)
#### Post date: [October 26, 2021, 7:34am UTC](https://discourse.slicer.org/t/presenting-two-modules-that-combine-steps-for-common-arterial-segmentation/20312/6 "2021-10-26T07:34:56Z")

</div>

> [@lassoan](#):
>
> If you are not sure about any change or there is something more complicated then you can create a pull request and go through the usual review process.

Thanks, I accepted the invitation and now have push access to this repo. Of course, I’ll go through PR for anything doubtful to me.
