# Segmentations export

**URL:** <https://discourse.slicer.org/t/segmentations-export/31043>\
**Category:** Support\
**Created:** [August 8, 2023, 12:12pm UTC](https://discourse.slicer.org/t/segmentations-export/31043 "2023-08-08T12:12:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![zhuyingying1234](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/zhuyingying1234/32/67107_2.png) [@zhuyingying1234](https://discourse.slicer.org/u/zhuyingying1234)\
**Post date:** [August 8, 2023, 12:12pm UTC](https://discourse.slicer.org/t/segmentations-export/31043/1 "2023-08-08T12:12:13Z")

</div>

Dear slicer experts  
I have a problem， In segmentations, I want to convert the stru-5 export to lable-5, the result is that the two ranges are not the same after exporting, what is the problem？ In segmentations, nothing has changed, it is the default state.

 ![截屏2023-08-08 17.12.52](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/b/c/bc29c3fe8126c1d7c37f411d7e16371959c005eb.jpeg)

 ![截屏2023-08-08 17.12.36](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/e/8/e821ae6feb139045618645675ce94d2f3870d3cc.jpeg)

 ![截屏2023-08-08 20.08.46](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/2/f/2f429b7565e735ce972c05e41646a3439b664cf4.png)

Looking forward to your reply. Thank you.

---

<div class="post-metadata">

**Author:** ![AJ\_ZHU](https://avatars.discourse-cdn.com/v4/letter/a/db5fbb/32.png) [@AJ\_ZHU](https://discourse.slicer.org/u/AJ_ZHU)\
**Post date:** [August 8, 2023, 12:34pm UTC](https://discourse.slicer.org/t/segmentations-export/31043/2 "2023-08-08T12:34:19Z")

</div>

Hi  
Kind-of I did encounter the same issue inside this “Export” there since this module has a “smart” way while exporting: the exported part is cropped based on the boundary box of segments (that’s why the output size is being changed.).  
Better to do some of your own python modules, using the function ==\>  
slicer.vtkSlicerSegmentationsModuleLogic.ExportSegmentsToLabelmapNode(segmentationNode, segmentIds, labelmapVolumeNode, referenceVolumeNode)

so the output of “labelmapVolumeNode” will take dimensions of the ref. vol. node

---

<div class="post-metadata">

**Author:** ![AJ\_ZHU](https://avatars.discourse-cdn.com/v4/letter/a/db5fbb/32.png) [@AJ\_ZHU](https://discourse.slicer.org/u/AJ_ZHU)\
**Post date:** [August 8, 2023, 12:48pm UTC](https://discourse.slicer.org/t/segmentations-export/31043/3 "2023-08-08T12:48:41Z")

</div>

addition, the above module need have a defined ref. vol.

 ![image.png](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/c/6/c63e12148972fcf3fb628c4a4bbb208e1011a282.png)

---

<div class="post-metadata">

**Author:** ![zhuyingying1234](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/zhuyingying1234/32/67107_2.png) [@zhuyingying1234](https://discourse.slicer.org/u/zhuyingying1234)\
**Post date:** [August 9, 2023, 10:27pm UTC](https://discourse.slicer.org/t/segmentations-export/31043/4 "2023-08-09T22:27:18Z")

</div>

Thank you very much your answer.
