# Identify HU range for Air on CT image

**URL:** <https://discourse.slicer.org/t/identify-hu-range-for-air-on-ct-image/42950>\
**Category:** Support\
**Tags:** segmentation, gate\
**Created:** [May 15, 2025, 5:05pm UTC](https://discourse.slicer.org/t/identify-hu-range-for-air-on-ct-image/42950 "2025-05-15T17:05:52Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![imbeatriz](https://avatars.discourse-cdn.com/v4/letter/i/e8c25b/32.png) [@imbeatriz](https://discourse.slicer.org/u/imbeatriz)\
**Post date:** [May 15, 2025, 5:05pm UTC](https://discourse.slicer.org/t/identify-hu-range-for-air-on-ct-image/42950/1 "2025-05-15T17:05:52Z")

</div>

Hi everyone,

I used TotalSegmentator on a CT image, and it successfully segmented all relevant structures. However, I noticed that it does not include a specific label for air that I need.

I need to determine the HU range—minimum and maximum voxel values—that correspond to air in the original CT image. Could anyone please explain how I can extract or visualize this information using 3D Slicer?

Any guidance would be greatly appreciated.

Thank you!

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [May 16, 2025, 12:27pm UTC](https://discourse.slicer.org/t/identify-hu-range-for-air-on-ct-image/42950/2 "2025-05-16T12:27:25Z")

</div>

Air is usually -1000 ([Hounsfield scale - Wikipedia](https://en.wikipedia.org/wiki/Hounsfield_scale)) and you can segment with simple thresholding. But if you are inside the body be aware there’s a lot of partial volume effects (a voxel has air and tissue) so it can be challenging to get an exact volume.

---

<div class="post-metadata">

**Author:** ![imbeatriz](https://avatars.discourse-cdn.com/v4/letter/i/e8c25b/32.png) [@imbeatriz](https://discourse.slicer.org/u/imbeatriz)\
**Post date:** [May 16, 2025, 4:35pm UTC](https://discourse.slicer.org/t/identify-hu-range-for-air-on-ct-image/42950/3 "2025-05-16T16:35:50Z")

</div>

Hi,

Thank you for your help! I have another question — do you happen to know how I can assign labels to different segments (obtained from the Total Segmentator tool) and save them together in a single .mhd file? Is that possible?

I’d really appreciate any guidance on how to do this properly.

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [May 17, 2025, 1:27pm UTC](https://discourse.slicer.org/t/identify-hu-range-for-air-on-ct-image/42950/4 "2025-05-17T13:27:21Z")

</div>

I’m not sure what you mean. It is possible to export selected segments (the visible ones) to a labelmap and then save that in mhd format. If that’s not what you mean please describe what you are trying to accomplish.

---

<div class="post-metadata">

**Author:** ![imbeatriz](https://avatars.discourse-cdn.com/v4/letter/i/e8c25b/32.png) [@imbeatriz](https://discourse.slicer.org/u/imbeatriz)\
**Post date:** [May 17, 2025, 1:37pm UTC](https://discourse.slicer.org/t/identify-hu-range-for-air-on-ct-image/42950/5 "2025-05-17T13:37:08Z")

</div>

Yeah, I have tried doing that. But the generated file doesn’t save the original name I had for each segmentation. It gives the names like the ones for the label:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/5/2/529bd39b23e8b2d91725273e5c62078862f7b9e4.png)

I’d like for each segment to have its original name and then the label number if possible.

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [May 17, 2025, 1:45pm UTC](https://discourse.slicer.org/t/identify-hu-range-for-air-on-ct-image/42950/6 "2025-05-17T13:45:23Z")

</div>

You can use a color table for that. [https://slicer.readthedocs.io/en/latest/user\_guide/modules/segmentations.html](https://slicer.readthedocs.io/en/latest/user_guide/modules/segmentations.html)

---

<div class="post-metadata">

**Author:** ![imbeatriz](https://avatars.discourse-cdn.com/v4/letter/i/e8c25b/32.png) [@imbeatriz](https://discourse.slicer.org/u/imbeatriz)\
**Post date:** [May 17, 2025, 3:01pm UTC](https://discourse.slicer.org/t/identify-hu-range-for-air-on-ct-image/42950/7 "2025-05-17T15:01:00Z")

</div>

I followed the steps and exported the segmentation in the format I wanted. However, when I load the file back into 3D Slicer, the segment names aren’t preserved—it behaves the same way as before, without showing the original segment names.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/7/b/7b7c29b8333b7d0f24537eb7a43220962e272fec.jpeg)  
Am I selecting something wrong?

I saw that when I go to the data and select segmentsss-label, I am able to see how I want the name next to the label. It’s when I save the file and reopen it separately that the name disappears, so I am confused why this happens.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/4/f/4f116928e5176d8585d64432138a570a8280218e.png)

---

<div class="post-metadata">

**Author:** ![jamesobutler](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jamesobutler/32/7511_2.png) [@jamesobutler](https://discourse.slicer.org/u/jamesobutler)\
**Post date:** [May 17, 2025, 3:10pm UTC](https://discourse.slicer.org/t/identify-hu-range-for-air-on-ct-image/42950/8 "2025-05-17T15:10:15Z")

</div>

A segmentation node which contains segments (as produced by say TotalSegmentator) by default can be saved to a .seg.nrrd file format which saves the entire segmentation node (with all the segments) and that can be reloaded back into Slicer with the segment names you specified.

---

<div class="post-metadata">

**Author:** ![imbeatriz](https://avatars.discourse-cdn.com/v4/letter/i/e8c25b/32.png) [@imbeatriz](https://discourse.slicer.org/u/imbeatriz)\
**Post date:** [May 17, 2025, 3:24pm UTC](https://discourse.slicer.org/t/identify-hu-range-for-air-on-ct-image/42950/9 "2025-05-17T15:24:49Z")

</div>

Yes, I’m aware of that, but the issue is that it doesn’t show the label values for each segment—such as the liver, which I specifically need. What I am trying to do is to create a map where I can define which label value corresponds to which anatomical structure (e.g., label value 3 = liver, etc.).

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [May 17, 2025, 7:18pm UTC](https://discourse.slicer.org/t/identify-hu-range-for-air-on-ct-image/42950/10 "2025-05-17T19:18:24Z")

</div>

You can also specify a color table when you load the data [https://slicer.readthedocs.io/en/latest/user\_guide/data\_loading\_and\_saving.html#load-data](https://slicer.readthedocs.io/en/latest/user_guide/data_loading_and_saving.html#load-data)

---

<div class="post-metadata">

**Author:** ![imbeatriz](https://avatars.discourse-cdn.com/v4/letter/i/e8c25b/32.png) [@imbeatriz](https://discourse.slicer.org/u/imbeatriz)\
**Post date:** [May 18, 2025, 1:24pm UTC](https://discourse.slicer.org/t/identify-hu-range-for-air-on-ct-image/42950/11 "2025-05-18T13:24:46Z")

</div>

Hi, I did that and created a Python code that gave me the labels identified with the segmentation’s name. Thank you!
