# How to rename segment name or segmentation IDs by label in \`ImportLabelmapToSegmentationNode\`?

**URL:** <https://discourse.slicer.org/t/how-to-rename-segment-name-or-segmentation-ids-by-label-in-importlabelmaptosegmentationnode/44888>\
**Category:** Development\
**Tags:** segmentation, python\
**Created:** [October 26, 2025, 11:21pm UTC](https://discourse.slicer.org/t/how-to-rename-segment-name-or-segmentation-ids-by-label-in-importlabelmaptosegmentationnode/44888 "2025-10-26T23:21:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jumbojing](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jumbojing/32/10811_2.png) [@jumbojing](https://discourse.slicer.org/u/jumbojing)\
**Post date:** [October 26, 2025, 11:21pm UTC](https://discourse.slicer.org/t/how-to-rename-segment-name-or-segmentation-ids-by-label-in-importlabelmaptosegmentationnode/44888/1 "2025-10-26T23:21:15Z")

</div>

Howto rename segment name or segmentation IDs by label instead of color in `ImportLabelmapToSegmentationNode`?

我发现有时候会返回标签, 有时候却返回颜色…怎么控制呢?

为何用颜色作为默认命名而不是标签呢? 我觉得后者更有意义啊

I noticed that sometimes it returns labels, and sometimes it returns colors… How can I custom or control this?

Why is `color name` used as the default `segment name` or `segmentationIDs` instead of the `label`? I think the latter is more meaningful.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/e/7/e72e6fdae3215c2d2396c5b2260e47ba525375ef.png)

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [October 27, 2025, 12:18pm UTC](https://discourse.slicer.org/t/how-to-rename-segment-name-or-segmentation-ids-by-label-in-importlabelmaptosegmentationnode/44888/2 "2025-10-27T12:18:41Z")

</div>

Slicer now supports terminologies by default. What it means is that your segmentation will correspond to one terminology _context_ and the segments will be entries from that context. The “color selector” will, in this default mode, select a terminology entry (information about what structure it is in addition to the color). You can choose not to use terminologies in Application Settings, but it is more correct to use a proper terminology context containing your segment types. It helps with identifying the segments correctly, without the need to type in the segment name manually (which is error prone, and also one structure may be called in different ways, e.g. “femural head left” vs “femural head lt” vs “left femural head”). Read more on this feature [here](https://slicer.readthedocs.io/en/latest/user_guide/modules/terminologies.html).

---

<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:** [October 29, 2025, 2:38am UTC](https://discourse.slicer.org/t/how-to-rename-segment-name-or-segmentation-ids-by-label-in-importlabelmaptosegmentationnode/44888/3 "2025-10-29T02:38:27Z")

</div>

If you select an appropriate color table when importing a labelmap then all the segments have correct name and terminology (as you specified in the color table). You can easily create a color table .csv file in a text editor or in Excel. See example [here](https://slicer.readthedocs.io/en/latest/developer_guide/modules/colors.html#color-table-csv-file-format-csv).
