# Can I export my segmentation as Voxels instead of triangular/Tetrahedral Mesh?

**URL:** <https://discourse.slicer.org/t/can-i-export-my-segmentation-as-voxels-instead-of-triangular-tetrahedral-mesh/10210>\
**Category:** Support\
**Created:** [February 12, 2020, 6:57am UTC](https://discourse.slicer.org/t/can-i-export-my-segmentation-as-voxels-instead-of-triangular-tetrahedral-mesh/10210 "2020-02-12T06:57:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mohammad\_Tanjib\_Rahm](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/mohammad_tanjib_rahm/32/5934_2.png) [@Mohammad\_Tanjib\_Rahm](https://discourse.slicer.org/u/Mohammad_Tanjib_Rahm)\
**Post date:** [February 12, 2020, 6:57am UTC](https://discourse.slicer.org/t/can-i-export-my-segmentation-as-voxels-instead-of-triangular-tetrahedral-mesh/10210/1 "2020-02-12T06:57:50Z")

</div>

I am segmenting some MRI data. But I see that the generated 3D model uses triangular mesh instead of voxels. Is there anyway to do this?

---

<div class="post-metadata">

**Author:** ![Juicy](https://avatars.discourse-cdn.com/v4/letter/j/74df32/32.png) [@Juicy](https://discourse.slicer.org/u/Juicy)\
**Post date:** [February 12, 2020, 7:19am UTC](https://discourse.slicer.org/t/can-i-export-my-segmentation-as-voxels-instead-of-triangular-tetrahedral-mesh/10210/2 "2020-02-12T07:19:04Z")

</div>

You can export the segment as a labelmap which is made up of voxels using the “Segmentation” module in the “Export/import models and labelmaps” area with the settings set to “Export” and “Labelmap”.

Is that what you mean?

---

<div class="post-metadata">

**Author:** ![Ilias\_Paraskevas](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ilias_paraskevas/32/11474_2.png) [@Ilias\_Paraskevas](https://discourse.slicer.org/u/Ilias_Paraskevas)\
**Post date:** [July 2, 2021, 5:03pm UTC](https://discourse.slicer.org/t/can-i-export-my-segmentation-as-voxels-instead-of-triangular-tetrahedral-mesh/10210/3 "2021-07-02T17:03:33Z")

</div>

I want to ask on the same subject. How do I open the export file in MATLAB?

---

<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:** [July 2, 2021, 5:12pm UTC](https://discourse.slicer.org/t/can-i-export-my-segmentation-as-voxels-instead-of-triangular-tetrahedral-mesh/10210/4 "2021-07-02T17:12:17Z")

</div>

If you simply save the segmentation as a .nrrd file (or export to nrrd file as @Juicy described above) then you can load that file into Matlab using [nrrdread.m](https://github.com/PerkLab/SlicerMatlabBridge/blob/master/MatlabCommander/commandserver/nrrdread.m).

I would recommend to reconsider using Matlab. Nowadays you can achieve so much more with Python. Also, software development skills in Python are highly valued in both industry and academia, while Matlab is getting irrelevant in most application areas.
