Export segmentation with multiple labels as nifti doesn't work


System: Linux Ubuntu
Slicer: 5.2.2
Input: nifti (both source volume and segmentation map)

So I have some sort of lesion map (nifti) I want to edit. This lesion map consists of non-overlapping segmentations ranging in value from 1 to 15. The source volume is a brain nifti and I load the lesion map as a segmentation. Next I can edit it with the segmentation editor but there is a problem if I want to export my new map. If I try to export it using export to files or export to labelmap, it picks random voxels from all the different segments in the map (visible on images below).
However, if I export it using the save module (where I unfortunately cannot select nifti but only nrrd) I can export my new map with all my new segmentations just fine.

The problem is that the scripts we are working with need nifti. Currently, the only way to get these from the edited map is to next reload the nrrd as a volume and then save it in the Save module as a nifti.
I have worked with segmentations consisting of different labels before on nifti’s and so far never had an issue with exporting them all together as a nifti, so I don’t know where these random voxel selected exports come from or how I can fix this.

Images for illustration of the problem:

Is there a way to export my complete segmentation map directly as a nifti or to make this export to files as nifti work as before?

You can export the segmentation into a labelmap and then save that labelmap as a nifti.

Thank you for the reply, but I tried that already, and it also generates this exact same random voxel labelmap then, so it doesn’t work

5.2.2 is a bit old - try a more recent release or preview build and if you still have the problem share some example files so people can investigate.