# Question about applying automatic maximum entropy on the FDG PET image

**URL:** <https://discourse.slicer.org/t/question-about-applying-automatic-maximum-entropy-on-the-fdg-pet-image/23048>\
**Category:** Support\
**Tags:** segmentation, threshold\
**Created:** [April 20, 2022, 11:29am UTC](https://discourse.slicer.org/t/question-about-applying-automatic-maximum-entropy-on-the-fdg-pet-image/23048 "2022-04-20T11:29:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jinny\_Lee](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jinny_lee/32/15042_2.png) [@Jinny\_Lee](https://discourse.slicer.org/u/Jinny_Lee)\
**Post date:** [April 20, 2022, 11:29am UTC](https://discourse.slicer.org/t/question-about-applying-automatic-maximum-entropy-on-the-fdg-pet-image/23048/1 "2022-04-20T11:29:00Z")

</div>

Hi,

I’m currently working on FDG PET images to segment a tumor using automatic maximum entropy. I thought the maximum entropy would be able to automatically segment the tumor, but it selects other organs like the heart or liver from time to time.

I tried cropping the area of interest that only contains the tumor to prevent the selection of other organs, but it changed the minimum threshold values of the tumor depending on the location/size/area of the cropped area.

Does anyone know how to segment the tumor using automatic maximum entropy without selecting other organs? Please let me know if you have experienced the same problem.

Thank you!

---

<div class="post-metadata">

**Author:** ![mau\_igna\_06](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/mau_igna_06/32/9056_2.png) [@mau\_igna\_06](https://discourse.slicer.org/u/mau_igna_06)\
**Post date:** [April 20, 2022, 12:29pm UTC](https://discourse.slicer.org/t/question-about-applying-automatic-maximum-entropy-on-the-fdg-pet-image/23048/2 "2022-04-20T12:29:10Z")

</div>

If your segmentations contains islands that should not be selected. You can use split islands effect. Calculate the centroid of each segment on segmentStatistics and use the Z value of those positions to keep only the tallest one (delete the other segments). It is not a very inteligent algorithm but it may work based on your description of the problem. You can automate all this in a scripted module

---

<div class="post-metadata">

**Author:** ![Jinny\_Lee](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jinny_lee/32/15042_2.png) [@Jinny\_Lee](https://discourse.slicer.org/u/Jinny_Lee)\
**Post date:** [April 21, 2022, 6:17am UTC](https://discourse.slicer.org/t/question-about-applying-automatic-maximum-entropy-on-the-fdg-pet-image/23048/3 "2022-04-21T06:17:14Z")

</div>

Thanks so much for the suggestion! I’ll take a look at it. I actually started using 3D slicer just a few weeks ago, so I’m not entirely sure what you meant by a scripted modeule. Could you elaborate a little bit more?

---

<div class="post-metadata">

**Author:** ![mau\_igna\_06](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/mau_igna_06/32/9056_2.png) [@mau\_igna\_06](https://discourse.slicer.org/u/mau_igna_06)\
**Post date:** [April 21, 2022, 10:32am UTC](https://discourse.slicer.org/t/question-about-applying-automatic-maximum-entropy-on-the-fdg-pet-image/23048/4 "2022-04-21T10:32:14Z")

</div>

Please check this out:

> <https://github.com/PerkLab/PerkLabBootcamp/blob/master/Doc/day3_2_SlicerProgramming.pptx>
