How to save in .mat format

Dear all,

Does anyone know how to save labeling images in slicer?

Let’s say labeled a tumor in the liver. then I want to save it in a logical/categorical data set (.mat)

because currently just have .nrrd format, then it cannot be open in matlab.

I don’t use matlab myself but I understand there is code available to open nrrd files in matlab. It should be pretty trivial.

You can use this Matlab nrrd reader to read segmentations (.seg.nrrd files) saved by Slicer: