After segmenting with Segment Editor Module and saving it, I closed 3D slicer and then I tried to reload my segmentation, but I noticed that the label colors have been changed. For example, I segmented a tumor with label color 31, necrosis with label color 15, and fat with label color 12. After saving my work, I re-opened the saved files (label and etc.) in 3D slicer and found out that the labels have changed to 1, 2, and 3! How can I fix this issue?
This should not happen if you keep the segmentation in seg.nrrd format. Make sure you are saving the original segmentation, not the exported labelmap in this format.
When I save it in seg.nrrd, there would be no issue. But the thing is that I want to save it in Nifti format, because the algorithm we use for feature extraction is based on Nifti format(nii). So, after I am done with the segmentation in “Segment Editor Module”, I go to “Import\export nodes”, then I go to the Export/Import models and labelmaps and put the Operation on Export and the Output type on Labelmap and then I click on Export. Then for saving the segmentation, I uncheck the “Segmentation.seg.nrrd” box and I change the “Segmentation-label.nrrd”'s format to Nifti. After I am done with saving, and when I re-open my segmentation, I see that the labels have been changed.
Which part did I do wrong and what can I do to fix it?
Is there any way to save my segmentation in Nifti format?
If you need to export your label with assigning specific indices, then you need to create a color table and specify that. Specifically you need to use this section of the Segmentations module: