# Grow-cut algorithm explanation

**URL:** <https://discourse.slicer.org/t/grow-cut-algorithm-explanation/23670>\
**Category:** Support\
**Created:** [June 1, 2022, 10:23am UTC](https://discourse.slicer.org/t/grow-cut-algorithm-explanation/23670 "2022-06-01T10:23:37Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![bserrano](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/bserrano/32/17034_2.png) [@bserrano](https://discourse.slicer.org/u/bserrano)\
**Post date:** [June 1, 2022, 10:23am UTC](https://discourse.slicer.org/t/grow-cut-algorithm-explanation/23670/1 "2022-06-01T10:23:37Z")

</div>

Hi all,

I have been working lately with the grow-cut algorithm of local threshold. I find it very useful but I can’t figure out how the algorithm works on a code basis, is there any documentation on this?

Thanks,

Belén

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [June 1, 2022, 12:47pm UTC](https://discourse.slicer.org/t/grow-cut-algorithm-explanation/23670/2 "2022-06-01T12:47:20Z")

</div>

Yes, GrowCut is a really useful algorithm. It’s actually a very simple idea that works well.

> **[gc2005vk.pdf](https://www.graphicon.ru/oldgr/en/publications/text/gc2005vk.pdf)**
>
> 873.15 KB

---

<div class="post-metadata">

**Author:** ![rbumm](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/rbumm/32/9404_2.png) [@rbumm](https://discourse.slicer.org/u/rbumm)\
**Post date:** [June 1, 2022, 1:40pm UTC](https://discourse.slicer.org/t/grow-cut-algorithm-explanation/23670/3 "2022-06-01T13:40:31Z")

</div>

Interesting link and the algorithm is really working well. Is there a way to involve background seeds (as shown in the paper) in the grow-cut implementation of local threshold? Would make it even more precise …

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [June 1, 2022, 1:56pm UTC](https://discourse.slicer.org/t/grow-cut-algorithm-explanation/23670/4 "2022-06-01T13:56:52Z")

</div>

> [@rbumm](#):
>
> background seeds (as shown in the paper)

Do you mean parameters T1 and T2 from section 2.2 of the paper? I don’t think we have tried those, but they would be possible to add.

---

<div class="post-metadata">

**Author:** ![rbumm](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/rbumm/32/9404_2.png) [@rbumm](https://discourse.slicer.org/u/rbumm)\
**Post date:** [June 1, 2022, 2:57pm UTC](https://discourse.slicer.org/t/grow-cut-algorithm-explanation/23670/5 "2022-06-01T14:57:44Z")

</div>

> [@pieper](#):
>
> Do you mean parameters T1 and T2

I actually meant the red/blue seeds in figure 4 section 3.1. In 3D Slicer, the grow-cut process in local threshold is started by the CTRL-left click (one seed/markup) on the area that you want to grow.

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [June 1, 2022, 6:28pm UTC](https://discourse.slicer.org/t/grow-cut-algorithm-explanation/23670/6 "2022-06-01T18:28:04Z")

</div>

Yes, LocalThreshold (from segment editor extra effects extension) is a bit different. But the regular GrowFromSeeds should be just like what’s shown in figure 4 and it’s the way I typically use the algorithm. I start by painting some seeds for whatever I want to segment and some rejection class seeds outside and then initialize the preview mode. From there it can auto update the algorithm as you paint or erase the input (use any tool - paint, draw, scissors…). For some kinds of data this can converge very quickly to a nice result. Then remember to go back to GrowFromSeeds and click apply when the preview looks the way you want it. If you don’t like the result you can undo back to the seeds and redo the grow from seeds part.

---

<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:** [June 1, 2022, 6:49pm UTC](https://discourse.slicer.org/t/grow-cut-algorithm-explanation/23670/7 "2022-06-01T18:49:54Z")

</div>

In Local threshold effect, the background seed region is generated automatically by inverting the foreground seed region and shrinking it a bit.
