# How to auto export Segmentation-Labels.tiff and Original images from .mrb file?

**URL:** <https://discourse.slicer.org/t/how-to-auto-export-segmentation-labels-tiff-and-original-images-from-mrb-file/30986>\
**Category:** Support\
**Tags:** file-export\
**Created:** [August 4, 2023, 7:13pm UTC](https://discourse.slicer.org/t/how-to-auto-export-segmentation-labels-tiff-and-original-images-from-mrb-file/30986 "2023-08-04T19:13:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jeff\_Boker](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jeff_boker/32/67074_2.png) [@Jeff\_Boker](https://discourse.slicer.org/u/Jeff_Boker)\
**Post date:** [August 4, 2023, 7:13pm UTC](https://discourse.slicer.org/t/how-to-auto-export-segmentation-labels-tiff-and-original-images-from-mrb-file/30986/1 "2023-08-04T19:13:35Z")

</div>

I have several .mrb files which contain images and segmentation annotations. I currently manually open the .mrb file in 3D slicer and then go to “Data” → “Export visible segments to binary labelmap” → “Save” and then select “Tiff” for the export format for the segmentations. However since there are so many .mrb files, I was wondering if there is an automatic way of exporting all the data quicker.

Thanks

---

<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 5, 2023, 10:35am UTC](https://discourse.slicer.org/t/how-to-auto-export-segmentation-labels-tiff-and-original-images-from-mrb-file/30986/2 "2023-08-05T10:35:04Z")

</div>

You can write a Python script to automate this. Probably all the necessary steps are described in the [script repository](https://slicer.readthedocs.io/en/latest/developer_guide/script_repository.html) but if there is anything specific that you cannot find then you can ask here.
