# Automatically create labelmaps for all values of the custom LUT

**URL:** <https://discourse.slicer.org/t/automatically-create-labelmaps-for-all-values-of-the-custom-lut/2534>\
**Category:** Support\
**Created:** [April 7, 2018, 5:09pm UTC](https://discourse.slicer.org/t/automatically-create-labelmaps-for-all-values-of-the-custom-lut/2534 "2018-04-07T17:09:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![NaglisR](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/naglisr/32/16280_2.png) [@NaglisR](https://discourse.slicer.org/u/NaglisR)\
**Post date:** [April 7, 2018, 5:09pm UTC](https://discourse.slicer.org/t/automatically-create-labelmaps-for-all-values-of-the-custom-lut/2534/1 "2018-04-07T17:09:37Z")

</div>

Hi,

I have a volume that contains only values that are listed in my custom LUT (~70 different values representing anatomical structures):  
Example:

 ![image%20(2)](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/e/1/e1c71782041056bfa80df6a3a66d20b7bfea86d1.png)  
I want to automatically create a labelmap, that would assign the values of the volume to the corresponding values of the LUT. Therefore I would be able to visualize the structures with their assigned colors, modify them or for example create a 3D model of all the structures. If I was to do this by hand I would have to manually apply thresholds and create a label map for each structure individually and of course I don’t want to do that. Is it possible?  
Thanks in advance!

---

<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:** [April 7, 2018, 5:33pm UTC](https://discourse.slicer.org/t/automatically-create-labelmaps-for-all-values-of-the-custom-lut/2534/2 "2018-04-07T17:33:49Z")

</div>

In Volumes module, convert the volume to labelmap and select your custom LUT. If you import this labelmap to a segmentation node (using Segmentations module) then colors and segment names should be automatically set based on your LUT.

---

<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:** [April 7, 2018, 5:39pm UTC](https://discourse.slicer.org/t/automatically-create-labelmaps-for-all-values-of-the-custom-lut/2534/3 "2018-04-07T17:39:32Z")

</div>

You can create a custom color table as describe here: [https://www.slicer.org/wiki/Documentation/4.8/Modules/Colors](https://www.slicer.org/wiki/Documentation/4.8/Modules/Colors)
