# Stop region grow with a stop point

**URL:** <https://discourse.itk.org/t/stop-region-grow-with-a-stop-point/1929>\
**Category:** Algorithms\
**Created:** [May 31, 2019, 12:43pm UTC](https://discourse.itk.org/t/stop-region-grow-with-a-stop-point/1929 "2019-05-31T12:43:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![TaoH](https://discourse.itk.org/user_avatar/discourse.itk.org/taoh/32/1374_2.png) [@TaoH](https://discourse.itk.org/u/TaoH)\
**Post date:** [May 31, 2019, 12:43pm UTC](https://discourse.itk.org/t/stop-region-grow-with-a-stop-point/1929/1 "2019-05-31T12:43:00Z")

</div>

Hello everyone,

I want to implement region grow with a stop point. When propagation region reaches the stop point, region grow is end. So how to implement it with itk?  
Best and thanks,  
Tao Han

---

<div class="post-metadata">

**Author:** ![blowekamp](https://discourse.itk.org/user_avatar/discourse.itk.org/blowekamp/32/79_2.png) [@blowekamp](https://discourse.itk.org/u/blowekamp)\
**Post date:** [May 31, 2019, 1:38pm UTC](https://discourse.itk.org/t/stop-region-grow-with-a-stop-point/1929/2 "2019-05-31T13:38:51Z")

</div>

Hello TaoH,

I don’t believe ITK has a basic region growing with a stopping point termination criteria. However, it won’t surprise me if someone has already written one as an ITK remote or external module. Perhaps further searching or someone will chime is with this one.

However, you can use a [`FastMarching`](https://itk.org/Doxygen/html/classitk_1_1FastMarchingBase.html) filter with an appropriate speed function composed of zeros and ones to do the equivalent operations. This filter also has a [`FastMarchingReachedTargetNodesStoppingCriterion`](https://itk.org/Doxygen/html/classitk_1_1FastMarchingReachedTargetNodesStoppingCriterion.html) which can be used to achieve your stopping criteria. You have to dig around through the [tests](https://github.com/InsightSoftwareConsortium/ITK/tree/master/Modules/Filtering/FastMarching/test) and examples to find out how to uses these components together.
