# How to check and custmize label value of the segmentation?

**URL:** https://discourse.slicer.org/t/how-to-check-and-custmize-label-value-of-the-segmentation/43796
**Category:** Support
**Created:** [July 21, 2025, 2:12pm UTC](https://discourse.slicer.org/t/how-to-check-and-custmize-label-value-of-the-segmentation/43796 "2025-07-21T14:12:57Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![phranchi](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/phranchi/32/80667_2.png) [@phranchi](https://discourse.slicer.org/u/phranchi)
#### Post date: [July 21, 2025, 2:12pm UTC](https://discourse.slicer.org/t/how-to-check-and-custmize-label-value-of-the-segmentation/43796/1 "2025-07-21T14:12:57Z")

</div>

Hi everyone,

I want to export my segmentation to label map for deep learning. The deep learning tool requires every segmentation in the same label map file and I do need to keep all the label value for each segmentation the same across all the label map files I feed into the tool. However, I failed to find the information for the segmentation’s label value, nor did I find how to appoint a label value to a specific segmentation. Is there a built in function for that in 3d slicer?

Thanks!

---

<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: [July 21, 2025, 2:30pm UTC](https://discourse.slicer.org/t/how-to-check-and-custmize-label-value-of-the-segmentation/43796/2 "2025-07-21T14:30:51Z")

</div>

This is a very common need and there are se erap ways to achieve it.

The most important is to [use standard terminology](https://github.com/SlicerMorph/Tutorials?tab=readme-ov-file#creating-custom-color-tables-with-terminologies) for segments when you create the segmentation. If you use Auto3DSeg or TotalSegmentator then it is already done.

You can then either choose a color table when you export the segmentation (that maps terminology to label value); or use [slicerio Python package](https://pypi.org/project/slicerio/) to get segments as a numpy array from a .seg.nrrd file.

---

<div class="post-metadata">

### Author: ![phranchi](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/phranchi/32/80667_2.png) [@phranchi](https://discourse.slicer.org/u/phranchi)
#### Post date: [July 22, 2025, 5:08am UTC](https://discourse.slicer.org/t/how-to-check-and-custmize-label-value-of-the-segmentation/43796/3 "2025-07-22T05:08:20Z")

</div>

Thank you very much, Lassoan.

I have adopted color table as you suggested. However, how do I know exactly which label is mapped to each segmentation.

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

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/0/b/0b3f7e5cfee51a0c89ad82bbe267c1bd7afcb87f.png)  
You see in my training, I need to specify each segmentation’s label value in the nrrd file. Do you know where can I check this?

Thanks!
