# Attenuation percentage within a segment

**URL:** <https://discourse.slicer.org/t/attenuation-percentage-within-a-segment/31371>\
**Category:** Support\
**Created:** [August 26, 2023, 3:14am UTC](https://discourse.slicer.org/t/attenuation-percentage-within-a-segment/31371 "2023-08-26T03:14:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Frederico\_Lisboa\_Nog](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/frederico_lisboa_nog/32/66466_2.png) [@Frederico\_Lisboa\_Nog](https://discourse.slicer.org/u/Frederico_Lisboa_Nog)\
**Post date:** [August 26, 2023, 3:14am UTC](https://discourse.slicer.org/t/attenuation-percentage-within-a-segment/31371/1 "2023-08-26T03:14:05Z")

</div>

I am quite new at 3D Slicer. I have done some muscle segmentations (HU between -29 to 150) and I would like to further classify the percentage of the segmented area according to a range of attenuation.

Example: 20% between -29 and +50  
80% between +50 and +150

I have tried to use LungCTAnalyzer unsuccessfully for this. Is the some extension for this?

Regards

---

<div class="post-metadata">

**Author:** ![Frederico\_Lisboa\_Nog](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/frederico_lisboa_nog/32/66466_2.png) [@Frederico\_Lisboa\_Nog](https://discourse.slicer.org/u/Frederico_Lisboa_Nog)\
**Post date:** [September 11, 2023, 3:10am UTC](https://discourse.slicer.org/t/attenuation-percentage-within-a-segment/31371/2 "2023-09-11T03:10:05Z")

</div>

Anyone that can help?

---

<div class="post-metadata">

**Author:** ![mikebind](https://avatars.discourse-cdn.com/v4/letter/m/71e660/32.png) [@mikebind](https://discourse.slicer.org/u/mikebind)\
**Post date:** [September 11, 2023, 4:37pm UTC](https://discourse.slicer.org/t/attenuation-percentage-within-a-segment/31371/3 "2023-09-11T16:37:39Z")

</div>

Here is a python script example which would allow you to gather all the voxel values within a given segment into a numpy array, where you could perform whatever binning you would like for further analysis: [Get Histogram of Segmented Region](https://slicer.readthedocs.io/en/latest/developer_guide/script_repository.html#get-histogram-of-a-segmented-region)

---

<div class="post-metadata">

**Author:** ![Frederico\_Lisboa\_Nog](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/frederico_lisboa_nog/32/66466_2.png) [@Frederico\_Lisboa\_Nog](https://discourse.slicer.org/u/Frederico_Lisboa_Nog)\
**Post date:** [September 16, 2023, 9:25pm UTC](https://discourse.slicer.org/t/attenuation-percentage-within-a-segment/31371/4 "2023-09-16T21:25:32Z")

</div>

Thank you @mikebind !
