I want to modify the nrrd file with the segmented Labelmaps

I want to save the segmented Labelmpas as nrrd and open this file again to add, delete or smooth the Labelmap.

I tried opening the saved nrrd file but couldn’t find the function I wanted.

Doesn’t the 3D Slicer provide that feature?

By default, Slicer saves segmentation as a 4D nrrd file that you can reload and continue to edit. Is this not what you would need?

If you need a 3D (merged) labelmap then you need to export the segmentation to a labelmap before saving it. When you load the merged labelmap, make sure to select “Labelmap” option in “Add data” and import it into segmentation for editing.

1 Like

4D labelmaps are not available because I don’t know how to open them using vtk. But I decided to save the seg.nrrd file, reload it, modify it, and save it as an nrrd file using the method you mentioned.

1 Like

how can I do this by code, I don’t find some code for labelmap