# Possible to reset a segment ID inside the SegmentEditor?

**URL:** <https://discourse.slicer.org/t/possible-to-reset-a-segment-id-inside-the-segmenteditor/22613>\
**Category:** Support\
**Tags:** segmentation\
**Created:** [March 21, 2022, 4:12am UTC](https://discourse.slicer.org/t/possible-to-reset-a-segment-id-inside-the-segmenteditor/22613 "2022-03-21T04:12:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![aiden.zhu](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/aiden.zhu/32/67145_2.png) [@aiden.zhu](https://discourse.slicer.org/u/aiden.zhu)\
**Post date:** [March 21, 2022, 4:12am UTC](https://discourse.slicer.org/t/possible-to-reset-a-segment-id-inside-the-segmenteditor/22613/1 "2022-03-21T04:12:11Z")

</div>

Inside windows,  
Version: 4.11.20210226

Hi guys,  
I have an issue like this:  
while I apply  
Method-A: slicer.modules.segmentations.logic().ImportLabelmapToSegmentationNode(self.labelNode, self.segmentationNode), the resulted segmentsID go as numbers as “1, 2, 3, 4, 5…”

Method-B: While inside segment-editor to click “Add” to have a new segment which will have a segmentID as “Segment\_1”, “Segment\_2”…

So how can I share a consistent way to control those segmentIDs there?  
Either numbers (A) or “Segment\_x” (B) works for me but I prefer to having the consistent way.

---

<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:** [March 21, 2022, 1:35pm UTC](https://discourse.slicer.org/t/possible-to-reset-a-segment-id-inside-the-segmenteditor/22613/2 "2022-03-21T13:35:27Z")

</div>

In recent Slicer Preview Releases we use the color names instead of just 1, 2, 3, … when you import a labelmap volume into a segmentation. Color names are used as segment IDs by default, too (but if needed a suffix is added to make them unique).

Segment IDs are never displayed to the user, so they can be treated as unique strings with random content. They are usually initialized with human-readable strings for more convenient debugging, but if we find that it confuses developers then we might consider switching to some random hash in the future.

---

<div class="post-metadata">

**Author:** ![aiden.zhu](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/aiden.zhu/32/67145_2.png) [@aiden.zhu](https://discourse.slicer.org/u/aiden.zhu)\
**Post date:** [March 21, 2022, 1:39pm UTC](https://discourse.slicer.org/t/possible-to-reset-a-segment-id-inside-the-segmenteditor/22613/3 "2022-03-21T13:39:11Z")

</div>

@lassoan  
Thanks a lot.
