NRRD segmentation file header

Hi! I’m developing an automatic segmentation algorithm on python and I am trying to export obtained segmentations in a .nrrd file. Looking at .nrrd file obtained from Slicer I can see some header I can’t understand how to include in the .nrrd file got in python.

Someone can help me finding how to include the right header in my .nrrd file?

You probably will want to use the SlicerIO package:

And set the custom metadata:

https://slicer.readthedocs.io/en/latest/developer_guide/modules/segmentations.html

1 Like