# VMTK vessel filtering not working

**URL:** <https://discourse.slicer.org/t/vmtk-vessel-filtering-not-working/1263>\
**Category:** Support\
**Created:** [October 23, 2017, 1:36am UTC](https://discourse.slicer.org/t/vmtk-vessel-filtering-not-working/1263 "2017-10-23T01:36:51Z")\
**Posts on this page:** 20\
**Page:** 2

<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 6, 2017, 3:50pm UTC](https://discourse.slicer.org/t/vmtk-vessel-filtering-not-working/1263/21 "2017-12-06T15:50:17Z")

</div>

Build on Mac is broken - the issue is tracked here: [https://github.com/vmtk/SlicerExtension-VMTK/issues/11](https://github.com/vmtk/SlicerExtension-VMTK/issues/11)

---

<div class="post-metadata">

**Author:** ![avarghes23](https://avatars.discourse-cdn.com/v4/letter/a/a9a28c/32.png) [@avarghes23](https://discourse.slicer.org/u/avarghes23)\
**Post date:** [November 26, 2018, 8:07pm UTC](https://discourse.slicer.org/t/vmtk-vessel-filtering-not-working/1263/22 "2018-11-26T20:07:15Z")

</div>

Hi all,

Was this issue ever resolved? I’m trying to follow along with this tutorial ([https://www.youtube.com/watch?v=DJ2032yo5Co](https://www.youtube.com/watch?v=DJ2032yo5Co)) but whenever I try to use Vesselness Filtering within VMTK I get the same error as OP. I found the GitHub VMTK extension files. Do I need to just drag those under the Extensions subfolder of 3D Slicer (after doing “Show Package Contents” in Finder)?

Also, if this extension is still confirmed not working for Mac, is there an alternate workflow to achieve the same result?

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [November 26, 2018, 9:13pm UTC](https://discourse.slicer.org/t/vmtk-vessel-filtering-not-working/1263/23 "2018-11-26T21:13:37Z")

</div>

Mac build has been failing as far as the CDash history goes. Linux build was fixed by [this](http://slicer.cdash.org/index.php?project=SlicerPreview&date=2018-08-18&filtercount=1&showfilters=1&field1=label&compare1=63&value1=VMTK) nightly, but unfortunately Mac build kept failing.

You can’t just point to the source code to try it, binaries need to be built from source. A Slicer developer who uses Mac will need to look into the issue to fix it.

(To the devs: even if we can’t get the factory to build it, maybe we could get a build that we can upload to midas for the stable so that it can be installed by the users?)

---

<div class="post-metadata">

**Author:** ![mschumaker](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/mschumaker/32/1395_2.png) [@mschumaker](https://discourse.slicer.org/u/mschumaker)\
**Post date:** [November 30, 2018, 3:34pm UTC](https://discourse.slicer.org/t/vmtk-vessel-filtering-not-working/1263/24 "2018-11-30T15:34:49Z")

</div>

I’ve ultimately given up on using Slicer-VMTK, in part because of these ongoing issues, but I would be very interested to see a resolution to this.

---

<div class="post-metadata">

**Author:** ![lucie.macron](https://avatars.discourse-cdn.com/v4/letter/l/3ec8ea/32.png) [@lucie.macron](https://discourse.slicer.org/u/lucie.macron)\
**Post date:** [July 12, 2019, 8:59am UTC](https://discourse.slicer.org/t/vmtk-vessel-filtering-not-working/1263/25 "2019-07-12T08:59:06Z")

</div>

Hi,

I’m having the same issue using Slicer 4.10.2 on macOS.  
Has this issue been resolved ?

Thanks,

---

<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:** [July 12, 2019, 1:46pm UTC](https://discourse.slicer.org/t/vmtk-vessel-filtering-not-working/1263/26 "2019-07-12T13:46:01Z")

</div>

@jcfr you fixed VMTK builds in the past, could you please have a look at it again? Maybe the issue is that .so files are not placed into the correct location - see [http://slicer.cdash.org/viewBuildError.php?buildid=1641848](http://slicer.cdash.org/viewBuildError.php?buildid=1641848)

---

<div class="post-metadata">

**Author:** ![jcfr](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jcfr/32/17825_2.png) [@jcfr](https://discourse.slicer.org/u/jcfr)\
**Post date:** [July 13, 2019, 2:58am UTC](https://discourse.slicer.org/t/vmtk-vessel-filtering-not-working/1263/27 "2019-07-13T02:58:16Z")

</div>

I identified the problem and this should be fixed by [https://github.com/vmtk/SlicerExtension-VMTK/pull/17](https://github.com/vmtk/SlicerExtension-VMTK/pull/17)

---

<div class="post-metadata">

**Author:** ![Ritu\_Karela](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ritu_karela/32/4324_2.png) [@Ritu\_Karela](https://discourse.slicer.org/u/Ritu_Karela)\
**Post date:** [August 5, 2019, 10:58am UTC](https://discourse.slicer.org/t/vmtk-vessel-filtering-not-working/1263/28 "2019-08-05T10:58:57Z")

</div>

Can anyone help me with vesselness filtering? my issue is that when I preview one fiducial point for arteries it looks okay but when I click on apply button it selects some part of skull as well with arteries. I am trying to extract arteries from CT Angiography. Any suggestions? I am not sure what I am doing wrong.

 ![Capture](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/6/b/6b2e6f9891fd791cbdfa247f46f4553db1aff8b5.png)

---

<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:** [August 5, 2019, 2:08pm UTC](https://discourse.slicer.org/t/vmtk-vessel-filtering-not-working/1263/29 "2019-08-05T14:08:06Z")

</div>

Vesselness filtering enhances visibility and contrast of vessels but usually does not perfectly extracts vessels from the entire image.

You may use vesselness image as master volume in Segment Editor to touch up results. For example, you can use Thresholding effect to do an initial extraction and clean it up by Scissors and Islands effects.

---

<div class="post-metadata">

**Author:** ![Ritu\_Karela](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ritu_karela/32/4324_2.png) [@Ritu\_Karela](https://discourse.slicer.org/u/Ritu_Karela)\
**Post date:** [August 6, 2019, 5:37am UTC](https://discourse.slicer.org/t/vmtk-vessel-filtering-not-working/1263/30 "2019-08-06T05:37:18Z")

</div>

Thank you Andras for the quick reply. Can you direct me to any tutorial link through which I can extract arteries from DICOM images?

---

<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:** [August 6, 2019, 4:21pm UTC](https://discourse.slicer.org/t/vmtk-vessel-filtering-not-working/1263/31 "2019-08-06T16:21:58Z")

</div>

See segmentation tutorials here: [https://www.slicer.org/wiki/Documentation/Nightly/Training#Segmentation](https://www.slicer.org/wiki/Documentation/Nightly/Training#Segmentation)

---

<div class="post-metadata">

**Author:** ![Ritu\_Karela](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ritu_karela/32/4324_2.png) [@Ritu\_Karela](https://discourse.slicer.org/u/Ritu_Karela)\
**Post date:** [August 6, 2019, 4:36pm UTC](https://discourse.slicer.org/t/vmtk-vessel-filtering-not-working/1263/32 "2019-08-06T16:36:43Z")

</div>

I have gone through all these tutorials already. But still I am unable to segment the arteries. Whenever I extract them from DICOM using thresholding and islands effect it comes with some part of skull as well. Is there any other way of extracting arteries other than thresholding?  
Thank you in advance.

---

<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:** [August 6, 2019, 5:00pm UTC](https://discourse.slicer.org/t/vmtk-vessel-filtering-not-working/1263/33 "2019-08-06T17:00:42Z")

</div>

Maybe you’ve missed the segmentation recipes. This one is relevant for what you would like to achieve: [https://lassoan.github.io/SlicerSegmentationRecipes/AortaMaskedGrowFromSeeds/](https://lassoan.github.io/SlicerSegmentationRecipes/AortaMaskedGrowFromSeeds/)

---

<div class="post-metadata">

**Author:** ![Ritu\_Karela](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ritu_karela/32/4324_2.png) [@Ritu\_Karela](https://discourse.slicer.org/u/Ritu_Karela)\
**Post date:** [August 7, 2019, 10:22am UTC](https://discourse.slicer.org/t/vmtk-vessel-filtering-not-working/1263/34 "2019-08-07T10:22:38Z")

</div>

Thank you for the link Andras but it doesn’t solve my problem completely. I am attaching some pictures here. Actually grow from seeds effect is not able to extract all arteries. It is extracting only the once that I have painted and it is very difficult to paint each and everything. It was successful with Aorta because it was a single structure. Could you suggest something more?

 ![Capture](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/b/e/be81957205097721863cf5954a14e0e59a36f00d.png)

---

<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:** [August 10, 2019, 5:49pm UTC](https://discourse.slicer.org/t/vmtk-vessel-filtering-not-working/1263/35 "2019-08-10T17:49:10Z")

</div>

You can start with simple thresholding, choosing threshold value so low that all vessels that you are interested are included. Then use that for masking and use Grow from seeds. This should allow very clear _separation_ of bone from vessels.

However, if image is noisy and/or low-resolution, contrast filling is uneven, etc. then it may be hard to choose a threshold value that includes small vessels and you may need to do more manual work, e.g., with Paint effect or Draw tubes effect, with thresholding (Maskin settings / editable intensity range).

Do you have a baseline image without contrast? If yes, then you can subtract the background (with automatic motion compensation), which may help in segmenting smaller vessels and automatically remove bone.

---

<div class="post-metadata">

**Author:** ![Ritu\_Karela](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ritu_karela/32/4324_2.png) [@Ritu\_Karela](https://discourse.slicer.org/u/Ritu_Karela)\
**Post date:** [August 12, 2019, 4:02am UTC](https://discourse.slicer.org/t/vmtk-vessel-filtering-not-working/1263/36 "2019-08-12T04:02:15Z")

</div>

I can you the .nrrd file of brain angio. Will you try this please? I have actually tried everything and still not able to do this.

---

<div class="post-metadata">

**Author:** ![Ritu\_Karela](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ritu_karela/32/4324_2.png) [@Ritu\_Karela](https://discourse.slicer.org/u/Ritu_Karela)\
**Post date:** [August 12, 2019, 7:18am UTC](https://discourse.slicer.org/t/vmtk-vessel-filtering-not-working/1263/37 "2019-08-12T07:18:07Z")

</div>

Also I tried “subtract scalar volume” effect but my output volume still has bone data. So when I do thresholding it selects bone as well.

 ![PNG](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/6/c/6cc828366ec7b25d64913069ef6ee4e2be246f92.jpeg)

---

<div class="post-metadata">

**Author:** ![Ritu\_Karela](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ritu_karela/32/4324_2.png) [@Ritu\_Karela](https://discourse.slicer.org/u/Ritu_Karela)\
**Post date:** [August 12, 2019, 7:23am UTC](https://discourse.slicer.org/t/vmtk-vessel-filtering-not-working/1263/38 "2019-08-12T07:23:15Z")

</div>

Link to my nrrd files:  
[https://drive.google.com/drive/folders/1fTDOh9KjKuQAt14sYgIJdUjfDDJm-EAl?usp=sharing](https://drive.google.com/drive/folders/1fTDOh9KjKuQAt14sYgIJdUjfDDJm-EAl?usp=sharing)

---

<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:** [August 12, 2019, 9:53am UTC](https://discourse.slicer.org/t/vmtk-vessel-filtering-not-working/1263/39 "2019-08-12T09:53:08Z")

</div>

Slicer does not have a dedicated tool for vessel extraction, even with contrast enhancement. VMTK does not help any better, at least in my experience.

You will find such tools with dedicated software made by CT OEMs. That’s what I see with radiologists in my health institution. They do every vessel segmentation nearly automatically, refining with mouse clicks on the vessels.

Slicer aims to be a more generic tool. The developer team does not have enough financial resources to target specific tasks by medical discipline in my view. I think you should accept that your aim cannot be reached.

For your specific problem, the image below shows the best I could get using Level Tracing/Flood Filling/Grow from seeds. As you can see, the arterial isolation extent is quite limited. The skull base is always merged with the internal carotid arteries in close contact to the bone. If the latter is segmented at the same time, it could have been isolated from the arteries at the skull base. But this implies a lot of painting before the final segmentation. This is not feasible in practice.

In general, contrast enhanced arteries are quite readily segmented when there is no intimate contact with bones and when they are of surgical diameters (fortunately!). Otherwise, distal arteries isolation remains a challenge.

![Screenshot_20190812_113141](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/8/7/871f3fac67e1bd6cd97d35c004df6a23ff8153ed.png)

---

<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:** [August 12, 2019, 2:02pm UTC](https://discourse.slicer.org/t/vmtk-vessel-filtering-not-working/1263/40 "2019-08-12T14:02:25Z")

</div>

> [@Ritu\_Karela](#):
>
> Also I tried “subtract scalar volume” effect but my output volume still has bone data. So when I do thresholding it selects bone as well.

Usually, you need to register (spatially align) the two volumes before subtraction. You can use Elastix extension for this.

Subtraction without registration:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/f/c/fc66317ac08a5049e7d5d9519bfada3b9b3be402.jpeg)

Subtraction after registration:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/f/f/ffa8196e30027bcccc751fa095a3ebb3026d02c1.jpeg)

> [@chir.set](#):
>
> Slicer does not have a dedicated tool for vessel extraction, even with contrast enhancement. VMTK does not help any better, at least in my experience.
> 
> You will find such tools with dedicated software made by CT OEMs.

For some reason, in recent years there have not been significant (funded) interest for developing/maintaining open-source vessel analysis tools. Maybe this is, as you say, because commercial tools already fulfill all the clinical and research needs. It is also possible that there are still unmet needs but there have not been research groups who could allocate grant funding for this.

[Previous page](https://discourse.slicer.org/t/vmtk-vessel-filtering-not-working/1263.md?page=1)

[Next page](https://discourse.slicer.org/t/vmtk-vessel-filtering-not-working/1263.md?page=3)
