# Using flood filling

**URL:** <https://discourse.slicer.org/t/using-flood-filling/24436>\
**Category:** Development\
**Tags:** segmentation\
**Created:** [July 21, 2022, 8:06pm UTC](https://discourse.slicer.org/t/using-flood-filling/24436 "2022-07-21T20:06:23Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![harrykwon0524](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/harrykwon0524/32/16121_2.png) [@harrykwon0524](https://discourse.slicer.org/u/harrykwon0524)\
**Post date:** [July 21, 2022, 8:06pm UTC](https://discourse.slicer.org/t/using-flood-filling/24436/1 "2022-07-21T20:06:24Z")

</div>

hi i am a newbie using the 3dslicer program and had some questions along the way. I am trying to segment the vessels from the brain and was wondering how to use the floor filling. Is it possible to click the vessels on the very left image and try to segment the vessels? Thank you

 ![Screenshot from 2022-07-21 14-51-17](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/5/9/59bee374f7b210354ee545af260eea283dda0c56.jpeg)

---

<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 23, 2022, 8:28am UTC](https://discourse.slicer.org/t/using-flood-filling/24436/2 "2022-07-23T08:28:48Z")

</div>

Flood filling is rarely effective for vessel segmentation. The vessels are usually too thin and often the intensity range is not distinctive enough for such simple region growing method to work reliably.

Due to the window/level setting you have set in the slice view everything appears to be too bright, so it is hard to tell how the vessels look like (how different is their intensity compared to surrounding areas). Could you [adjust the window/level](https://slicer.readthedocs.io/en/latest/user_guide/user_interface.html#adjusting-image-window-level) to make the vessels stand out as much as possible and post another screenshot, or even better share an example data set (upload to onedrive/dropbox/google drive and post the link here)?

---

<div class="post-metadata">

**Author:** ![harrykwon0524](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/harrykwon0524/32/16121_2.png) [@harrykwon0524](https://discourse.slicer.org/u/harrykwon0524)\
**Post date:** [July 25, 2022, 4:55pm UTC](https://discourse.slicer.org/t/using-flood-filling/24436/3 "2022-07-25T16:55:19Z")

</div>

![Screenshot from 2022-07-25 12-48-16](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/b/e/be0c454b42e19c9ceec785143e27f5b99e8d5b18.jpeg)  
Will this screenshot be enough to tell?

---

<div class="post-metadata">

**Author:** ![harrykwon0524](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/harrykwon0524/32/16121_2.png) [@harrykwon0524](https://discourse.slicer.org/u/harrykwon0524)\
**Post date:** [July 26, 2022, 7:24pm UTC](https://discourse.slicer.org/t/using-flood-filling/24436/4 "2022-07-26T19:24:28Z")

</div>

![Screenshot from 2022-07-26 15-23-59](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/7/2/7231e1960bd4597618e44b0c23c597bbbac379dd.jpeg)

---

<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 26, 2022, 7:27pm UTC](https://discourse.slicer.org/t/using-flood-filling/24436/5 "2022-07-26T19:27:08Z")

</div>

These screenshots are useful. It seems that you can segment the vessels using simple thresholding (`Threshold` effect in `Segment Editor` module).

---

<div class="post-metadata">

**Author:** ![harrykwon0524](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/harrykwon0524/32/16121_2.png) [@harrykwon0524](https://discourse.slicer.org/u/harrykwon0524)\
**Post date:** [July 27, 2022, 3:09pm UTC](https://discourse.slicer.org/t/using-flood-filling/24436/6 "2022-07-27T15:09:07Z")

</div>

Is there any advanced methods on segmenting the vessels? Like using simple segmentation and other methods together to segment the brain vessels more accurately?

---

<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 2, 2022, 11:08am UTC](https://discourse.slicer.org/t/using-flood-filling/24436/7 "2022-08-02T11:08:52Z")

</div>

You can try to improve vessel contrast using Vesselness Filtering module in VMTK extension. If you want to segment small vessels then it can help if the image is resampled to have smaller voxels (for example, using Crop Volume module).

---

<div class="post-metadata">

**Author:** ![harrykwon0524](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/harrykwon0524/32/16121_2.png) [@harrykwon0524](https://discourse.slicer.org/u/harrykwon0524)\
**Post date:** [August 3, 2022, 7:00pm UTC](https://discourse.slicer.org/t/using-flood-filling/24436/8 "2022-08-03T19:00:54Z")

</div>

I did try using vesselness filtering, but the 3d slicer gets automatically stopped and breaks eventually. Is it because I have not set the seed point right?

 ![Screenshot from 2022-08-03 14-59-53](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/e/0/e0c137a09a84628c29eb7dbcd47c6a2692102926.jpeg)

---

<div class="post-metadata">

**Author:** ![harrykwon0524](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/harrykwon0524/32/16121_2.png) [@harrykwon0524](https://discourse.slicer.org/u/harrykwon0524)\
**Post date:** [August 4, 2022, 7:42pm UTC](https://discourse.slicer.org/t/using-flood-filling/24436/10 "2022-08-04T19:42:56Z")

</div>

I did manage to create the segmentation result by using vesselness filtering and had questions along the way

1. How can I save the segmentation result?
2. Will adding more seed points in the vessels result in creating more sophisticated vessel segmentation result?  
 ![Screenshot from 2022-08-04 15-42-08](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/b/3/b366b10c4536ca5f4e2f08251aeff816082ee7bd.jpeg)
