# Export segmentation or np.array from 3d bounding box

**URL:** <https://discourse.slicer.org/t/export-segmentation-or-np-array-from-3d-bounding-box/22658>\
**Category:** Development\
**Tags:** segmentation, markups\
**Created:** [March 23, 2022, 8:22pm UTC](https://discourse.slicer.org/t/export-segmentation-or-np-array-from-3d-bounding-box/22658 "2022-03-23T20:22:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![laurentletg](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/laurentletg/32/10051_2.png) [@laurentletg](https://discourse.slicer.org/u/laurentletg)\
**Post date:** [March 23, 2022, 8:22pm UTC](https://discourse.slicer.org/t/export-segmentation-or-np-array-from-3d-bounding-box/22658/1 "2022-03-23T20:22:28Z")

</div>

Hello,

I am interested in performing weak labelling using 3d bounding boxes. I know it is possible to use the scissor tool in the Segment Editor to perform this task but I find the MarkupsROI tool easier to use. The file output for the MarkupsROI is either a .json or .fcsv.

1. Is there a way I can export this as a segmentation instead?
2. Alternatively, how can I convert the data contained in the MarkupsROI json to obtain a np.array that can be used as a segmentation mask for a given volume ?

Thanks!

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/1/6/16cb89e8d3e27706a238f5fb422197cc1d73bf32.jpeg)
