In the SegmentationCategoryTypeModified-DICOM Master.json file, there are these fields called 3dSlicerIntergerLabel (like below).
I thought these were the unique ID numbers that will be used when exporting a segmentation to a labelmap. but that doesn’t appear to be the case. Without a color table, segmentations seems to be exported simply by assigning a sequential number to segments in the order they are listed in the segmentations hierarchy.
What is the purpose of this field, and more importantly is it somehow possible to export labelmaps consistently if we use terminology, or regardless we will still need a color table for the correct conversion.
"CodeMeaning": "Occipital bone",
"3dSlicerLabel": "occipital bone",
That number is the index of the color in the
GenericAnatomyColors color table
I think you can preserve the indices by checking the
Use color table values checkbox in Segmentations module, see here
I’m not sure why only the
User type color tables show up (at least that’s what happened for me on Linux using 2022-11-13), maybe someone else knows. If not, then let me look in the latest version later.
Thats the same behavior I am seeing. I cannot select a color table if I haven’t loaded/generated on in Slicer. I will also argue that this somewhat defeats the purpose of the having a segmentation terminology. If a proper segmentation terminology is used, the export to labelmap needs to happen automatically. I can envision a use case where the user assigns a terminology to a segmentation, and while it is being exported if there are “unnamed” segments (e.g., Segment_23) this generates a warning error about lack of terminology in the segment.