# Export binary mask of the segmentation as jpeg/png

**URL:** <https://discourse.slicer.org/t/export-binary-mask-of-the-segmentation-as-jpeg-png/28256>\
**Category:** Support\
**Created:** [March 9, 2023, 9:44am UTC](https://discourse.slicer.org/t/export-binary-mask-of-the-segmentation-as-jpeg-png/28256 "2023-03-09T09:44:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![yoav\_benhaim](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/yoav_benhaim/32/13756_2.png) [@yoav\_benhaim](https://discourse.slicer.org/u/yoav_benhaim)\
**Post date:** [March 9, 2023, 9:44am UTC](https://discourse.slicer.org/t/export-binary-mask-of-the-segmentation-as-jpeg-png/28256/1 "2023-03-09T09:44:14Z")

</div>

hi!  
how can I export the segmentation as a binary image?  
the preference file format is jpeg or png/ but other format can also help  
thank you

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [March 9, 2023, 5:09pm UTC](https://discourse.slicer.org/t/export-binary-mask-of-the-segmentation-as-jpeg-png/28256/2 "2023-03-09T17:09:41Z")

</div>

Right click, and choose Export as LabelMap. Then, you can save as NRRD or Nifti basde on your usage. Slicer does not allow exporting 3D volumes as sequences of 2D formats (like JPG). You should be able to do DICOM, though.

---

<div class="post-metadata">

**Author:** ![ahmad\_alminnawi](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ahmad_alminnawi/32/66700_2.png) [@ahmad\_alminnawi](https://discourse.slicer.org/u/ahmad_alminnawi)\
**Post date:** [April 18, 2024, 10:06am UTC](https://discourse.slicer.org/t/export-binary-mask-of-the-segmentation-as-jpeg-png/28256/3 "2024-04-18T10:06:06Z")

</div>

Hi Yoav,

Were you able to export the segmentation as binary image?  
Can you please share how you did it? (preferably through jupyter Notebook)

thanks in advance!
