# How to save in .mat format

**URL:** <https://discourse.slicer.org/t/how-to-save-in-mat-format/24593>\
**Category:** Support\
**Tags:** build, segmentation, extensions-manager, dicom, 3d-model\
**Created:** [August 1, 2022, 4:16pm UTC](https://discourse.slicer.org/t/how-to-save-in-mat-format/24593 "2022-08-01T16:16:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![akmal871026](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/akmal871026/32/11642_2.png) [@akmal871026](https://discourse.slicer.org/u/akmal871026)\
**Post date:** [August 1, 2022, 4:16pm UTC](https://discourse.slicer.org/t/how-to-save-in-mat-format/24593/1 "2022-08-01T16:16:19Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [August 1, 2022, 5:03pm UTC](https://discourse.slicer.org/t/how-to-save-in-mat-format/24593/2 "2022-08-01T17:03:22Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [August 2, 2022, 10:19am UTC](https://discourse.slicer.org/t/how-to-save-in-mat-format/24593/3 "2022-08-02T10:19:45Z")

</div>

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

> <https://github.com/PerkLab/SlicerMatlabBridge/blob/master/MatlabCommander/commandserver/nrrdread.m>
