# Extension for Vessel Segmentation

**URL:** <https://discourse.slicer.org/t/extension-for-vessel-segmentation/9182>\
**Category:** Development\
**Created:** [November 17, 2019, 9:25pm UTC](https://discourse.slicer.org/t/extension-for-vessel-segmentation/9182 "2019-11-17T21:25:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![marie](https://avatars.discourse-cdn.com/v4/letter/m/bc8723/32.png) [@marie](https://discourse.slicer.org/u/marie)\
**Post date:** [November 17, 2019, 9:26pm UTC](https://discourse.slicer.org/t/extension-for-vessel-segmentation/9182/1 "2019-11-17T21:26:00Z")

</div>

Hey there!

I just came across this excellent post:

> [@VMTK vessel filtering not working](https://discourse.slicer.org/t/vmtk-vessel-filtering-not-working/1263/42):
>
> I’ve described all the steps in this [segmentation recipe](https://lassoan.github.io/SlicerSegmentationRecipes/VesselSegmentationBySubtraction/). Example of segmentation: [[image] ](https://lassoan.github.io/SlicerSegmentationRecipes/VesselSegmentationBySubtraction/image-010.gif) The only “manual” steps needed were choosing a few parameter values, so the whole workflow could be easily made fully automated - requiring only a single click and some optional parameter adjustments from the user.

This is exactly what I need!! I would really like to develop an extension combining all those steps. Is this possible? I just started reading about developing own modules/extensions and trying some things. I would like to make vessel segmentation easier for people who aren’t familiar with 3DSlicer.

Thanks for your help!

---

<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:** [November 18, 2019, 9:24pm UTC](https://discourse.slicer.org/t/extension-for-vessel-segmentation/9182/2 "2019-11-18T21:24:34Z")

</div>

I would recommend these tutorials for learning how to create custom modules to automate the vessel filtering method: [https://www.slicer.org/wiki/Documentation/Nightly/Training#PerkLab.27s\_Slicer\_bootcamp\_training\_materials](https://www.slicer.org/wiki/Documentation/Nightly/Training#PerkLab.27s_Slicer_bootcamp_training_materials)

---

<div class="post-metadata">

**Author:** ![marie](https://avatars.discourse-cdn.com/v4/letter/m/bc8723/32.png) [@marie](https://discourse.slicer.org/u/marie)\
**Post date:** [December 17, 2019, 10:26pm UTC](https://discourse.slicer.org/t/extension-for-vessel-segmentation/9182/3 "2019-12-17T22:26:44Z")

</div>

Thanks for this helpful link!

I think I’m a bit more familiar with Slicer extensions by now. I created a new scripted module in Python using the Extension Wizard and I figured out how to design the user interface and how this kind of extension is working in general.  
So, to start with an easier project, I’m trying the following:

- work on a chosen input volume
- use threshold (IsoData) to create a segment
- split segment into islands
- chose resulting segment(s) and export as stl  
(This is already working well for vessel-segmentation with high-contrast MRI.)

Anyway, I still don’t know how to use the Segment Editor functionality in my own extension. Is there an easy way? I still have problems understanding the slicer module hierarchy…

Thanks for your help!

---

<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:** [December 18, 2019, 1:24am UTC](https://discourse.slicer.org/t/extension-for-vessel-segmentation/9182/4 "2019-12-18T01:24:23Z")

</div>

> [@marie](#):
>
> Anyway, I still don’t know how to use the Segment Editor functionality in my own extension. Is there an easy way?

See examples here: [Documentation/Nightly/ScriptRepository - Slicer Wiki](https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository#How_to_run_segment_editor_effects_from_a_script)
