# Segmentations using HU when Thresholding is not accurate enough

**URL:** <https://discourse.slicer.org/t/segmentations-using-hu-when-thresholding-is-not-accurate-enough/23914>\
**Category:** Support\
**Tags:** segmentation, dicom, 3d-model\
**Created:** [June 17, 2022, 2:07pm UTC](https://discourse.slicer.org/t/segmentations-using-hu-when-thresholding-is-not-accurate-enough/23914 "2022-06-17T14:07:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![zells](https://avatars.discourse-cdn.com/v4/letter/z/6de8d8/32.png) [@zells](https://discourse.slicer.org/u/zells)\
**Post date:** [June 17, 2022, 2:07pm UTC](https://discourse.slicer.org/t/segmentations-using-hu-when-thresholding-is-not-accurate-enough/23914/1 "2022-06-17T14:07:20Z")

</div>

![Screen Shot 2022-06-16 at 10.29.29 AM](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/5/a/5a657ce5ac10a48b1a8c27a56172027184455bf6.png)  
 ![Screen Shot 2022-06-16 at 10.19.03 AM](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/6/7/67cde2ee826ae547aade4619cb74da5d6b6aa2ce.png)  
 ![Screen Shot 2022-06-16 at 10.19.16 AM](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/4/a/4a53b428959ea367a701cbc5416f1f83657d0c97.png)  
 ![Screen Shot 2022-06-16 at 10.29.40 AM](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/b/a/ba51743471d11811a62edd5cde19d8d062e6faf7.png)

Hi All,

I have a “heat map” DICOM here that I brought into slicer and I need each different color (see images) to be a different segmentation. I cannot use the threshold effect though as each color corresponds to a single HU (ie. 1,2,3,4,5 etc. see images attached in bottom left with green circle).

Is the best way to do this to break it down into a numpy array and then assign a segmentation to a particular value? Is that even possible? Does anyone else have any ideas on how to solve this problem?

Thanks,  
Zach

---

<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:** [June 17, 2022, 5:59pm UTC](https://discourse.slicer.org/t/segmentations-using-hu-when-thresholding-is-not-accurate-enough/23914/2 "2022-06-17T17:59:02Z")

</div>

I would try using a module to convert it to a gray scale image.  
It is called RGB to scalar or something like it.  
Then you’d be able to threshold I think

---

<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:** [June 17, 2022, 6:35pm UTC](https://discourse.slicer.org/t/segmentations-using-hu-when-thresholding-is-not-accurate-enough/23914/3 "2022-06-17T18:35:13Z")

</div>

> [@zells](#):
>
> I have a “heat map” DICOM here that I brought into slicer and I need each different color (see images) to be a different segmentation.

You can do this by loading this image as a segmentation as described [here](https://slicer.readthedocs.io/en/latest/user_guide/modules/segmentations.html#import-an-existing-segmentation-from-volume-file). It is unnecessary to load each label as a separate segmentation, it is sufficient to load it as a separate segment.

However, you can display much nicer colormaps by loading the image as a scalar volume and then choosing an appropriate color lookup table in volumes module. See for example how dose maps are rendered in [SlicerRT extension](http://slicerrt.github.io/).
