# Filtering vessels in 3D volume

**URL:** <https://discourse.slicer.org/t/filtering-vessels-in-3d-volume/11855>\
**Category:** Support\
**Created:** [June 4, 2020, 3:04am UTC](https://discourse.slicer.org/t/filtering-vessels-in-3d-volume/11855 "2020-06-04T03:04:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Deepa](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/deepa/32/5634_2.png) [@Deepa](https://discourse.slicer.org/u/Deepa)\
**Post date:** [June 4, 2020, 3:04am UTC](https://discourse.slicer.org/t/filtering-vessels-in-3d-volume/11855/1 "2020-06-04T03:04:51Z")

</div>

Hello Everyone,  
I’ve a 3D volume and I am using the `Margin` effect in Segment editor to filter vessels that have  
a thickness less than say 10 microns

1. 10 micron is set in Margin tab
2. select shrink and hit apply
3. select grow and hit apply

I’d like to ask for suggestion on how to use Margin effect to filter vessels that fall in a certain range  
e.g. 5 - 10 microns.

Here, I would like to know if it’s possible to do the above by directly specifying the range (5-10).  
If not, I think I should be following the same steps mentioned above to filter out 5 microns from the above segment and subtract using logical operators.

Many thanks

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [June 4, 2020, 3:58pm UTC](https://discourse.slicer.org/t/filtering-vessels-in-3d-volume/11855/2 "2020-06-04T15:58:43Z")

</div>

Deepa, if the method you described would retain vessels with a diameter 10 microns or larger.  
Because if you shrink 10 micron, and the segment is only 7 micron, it will disappear. Because it has disappeared, grow operation cannot bring it back. Let’s say this is your segment\_1

If you repeat this operation on a new segment (Segment\_2) with 5 micron, then that will retain vessels that 5 or larger micron. If you subtract the Segment\_1 from Segment\_2 (logical operations0, you will get what you want (vessels that are larger than 5 but less than 10 micron in diameter). For this to work, you should allow for overlap under the Masking section when doing both segmentations.

However, due to the smoothing there might be some left of over from Segment\_1. Remove small islands might work on the resultant segment, or others might have better suggestions.

---

<div class="post-metadata">

**Author:** ![Deepa](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/deepa/32/5634_2.png) [@Deepa](https://discourse.slicer.org/u/Deepa)\
**Post date:** [June 4, 2020, 4:36pm UTC](https://discourse.slicer.org/t/filtering-vessels-in-3d-volume/11855/3 "2020-06-04T16:36:06Z")

</div>

Thanks a lot.

I could do the above. I would like to check the thickness of the final segment that I have.

Could you please suggest if I can use any plugin that is already available in Slicer to check the distribution of vessel thickness in [Segment\_final](https://drive.google.com/file/d/17C1J5qdYf_sRBQkf3Ta88rasW2_w5fua/view?usp=sharing)?  
This would help me in cross-checking what I have done.
