# Level-Set based not only on potential map

**URL:** <https://discourse.itk.org/t/level-set-based-not-only-on-potential-map/1959>\
**Category:** Algorithms\
**Created:** [June 11, 2019, 4:45pm UTC](https://discourse.itk.org/t/level-set-based-not-only-on-potential-map/1959 "2019-06-11T16:45:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Riccardo\_Ballarini](https://discourse.itk.org/user_avatar/discourse.itk.org/riccardo_ballarini/32/697_2.png) [@Riccardo\_Ballarini](https://discourse.itk.org/u/Riccardo_Ballarini)\
**Post date:** [June 11, 2019, 4:45pm UTC](https://discourse.itk.org/t/level-set-based-not-only-on-potential-map/1959/1 "2019-06-11T16:45:06Z")

</div>

Hi guys, thank you in advance for reading this.  
As the title says, I’d like to know if in ITK there is a level-set that uses not only the potential map for the segmentation. In particular, I’m looking for a level-set that uses both potential map and pixel intensity (something like the intensity average of the segmented areas).  
I looked on the doxygen, but I found only level-sets that use only the potential map.

---

<div class="post-metadata">

**Author:** ![dzenanz](https://discourse.itk.org/user_avatar/discourse.itk.org/dzenanz/32/1093_2.png) [@dzenanz](https://discourse.itk.org/u/dzenanz)\
**Post date:** [June 11, 2019, 8:41pm UTC](https://discourse.itk.org/t/level-set-based-not-only-on-potential-map/1959/2 "2019-06-11T20:41:54Z")

</div>

You could incorporate pixel intensity into the potential map during its construction? Hopefully someone more familiar with level sets implementation will chime in.

---

<div class="post-metadata">

**Author:** ![Riccardo\_Ballarini](https://discourse.itk.org/user_avatar/discourse.itk.org/riccardo_ballarini/32/697_2.png) [@Riccardo\_Ballarini](https://discourse.itk.org/u/Riccardo_Ballarini)\
**Post date:** [June 12, 2019, 4:31pm UTC](https://discourse.itk.org/t/level-set-based-not-only-on-potential-map/1959/3 "2019-06-12T16:31:09Z")

</div>

@dzenanz thanks for the answer, but it won’t work as I need. I need a level-set with the potential term plus a term that depends on the pixel value (e.g. average pixel value of the segmented areas).

---

<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:** [June 12, 2019, 6:37pm UTC](https://discourse.itk.org/t/level-set-based-not-only-on-potential-map/1959/4 "2019-06-12T18:37:43Z")

</div>

ITK has the [Chan and Vesse](https://itk.org/Doxygen/html/classitk_1_1ScalarChanAndVeseSparseLevelSetImageFilter.html) level-sets which is just dependent on the pixel values not the edges.

There is also the[ITKv4 LevelSet framework](https://itk.org/Doxygen/html/group__ITKLevelSetsv4.html). This is a flexible framework which allows you to compose the terms used for the level sets. You can find some examples [here](https://itk.org/ITKExamples/src/Segmentation/LevelSetsv4Visualization/index.html) and in the [testing directory](https://github.com/InsightSoftwareConsortium/ITK/tree/master/Modules/Segmentation/LevelSetsv4/test).
