# Segment Editor help please (thresholds)

**URL:** <https://discourse.slicer.org/t/segment-editor-help-please-thresholds/5904>\
**Category:** Support\
**Tags:** feature, segmentation\
**Created:** [February 24, 2019, 1:49pm UTC](https://discourse.slicer.org/t/segment-editor-help-please-thresholds/5904 "2019-02-24T13:49:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andrei\_V](https://avatars.discourse-cdn.com/v4/letter/a/e9a140/32.png) [@Andrei\_V](https://discourse.slicer.org/u/Andrei_V)\
**Post date:** [February 24, 2019, 1:49pm UTC](https://discourse.slicer.org/t/segment-editor-help-please-thresholds/5904/1 "2019-02-24T13:49:56Z")

</div>

Operating system: Windows 8.1  
Slicer version: 4.10.1  
Expected behavior: Hello all. I am trying to segment CT slices. On the same slice I need to highlight both muscle and fat, which have different thresholds.  
Actual behavior: It seems that the “Threshold Range” settings are linked. For example, if I “Add new empty segment” and change the threshold, it changes it for all segments. Likewise, if I “Create new segmentation” and then select the thresholds for each different segmentation, it is still linked (i.e. same threshold). I want to be able to define different thresholds for muscle and fat, and then switch between measuring them. Is this possible?

Thank you, and have a good day!

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [February 24, 2019, 5:11pm UTC](https://discourse.slicer.org/t/segment-editor-help-please-thresholds/5904/2 "2019-02-24T17:11:03Z")

</div>

You’re right, currently the threshold setting is global. However if you can use threshold to segment your multiple structures, then there is a good chance that the Grow from seeds can do it too. I strongly suggest trying it.

Please check out this video: [https://www.youtube.com/watch?v=8Nbi1Co2rhY](https://www.youtube.com/watch?v=8Nbi1Co2rhY)

---

<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:** [February 24, 2019, 8:16pm UTC](https://discourse.slicer.org/t/segment-editor-help-please-thresholds/5904/3 "2019-02-24T20:16:28Z")

</div>

If you just want approximate segmentation purely based on Hounsfield units, you can use this short Python script, which creates fat, muscle, bone segments using thresholding and then reports their volumes:

> <https://gist.github.com/lassoan/5ad51c89521d3cd9c5faf65767506b37>

You can find more segmentation scripting examples here: [https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository#How\_to\_run\_segment\_editor\_effects\_from\_a\_script](https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository#How_to_run_segment_editor_effects_from_a_script)
