# Radiologist saved segmentations without references -\> annotations come out cropped when loading as numpy arrays

**URL:** <https://discourse.slicer.org/t/radiologist-saved-segmentations-without-references-annotations-come-out-cropped-when-loading-as-numpy-arrays/32277>\
**Category:** Support\
**Tags:** segmentation\
**Created:** [October 17, 2023, 3:30pm UTC](https://discourse.slicer.org/t/radiologist-saved-segmentations-without-references-annotations-come-out-cropped-when-loading-as-numpy-arrays/32277 "2023-10-17T15:30:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![neuronflow](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/neuronflow/32/67904_2.png) [@neuronflow](https://discourse.slicer.org/u/neuronflow)\
**Post date:** [October 17, 2023, 3:30pm UTC](https://discourse.slicer.org/t/radiologist-saved-segmentations-without-references-annotations-come-out-cropped-when-loading-as-numpy-arrays/32277/1 "2023-10-17T15:30:10Z")

</div>

Dear forum,

My dear radiologists saved all the segmentations they created without a reference as compressed niftis. Therefore, all the annotations appear cropped if I load them as numpy arrays using nibabel.

My image data is 240x240x192; however, when loading the images they appear with varying sizes cropped around the actual annotations.

**How can I load numpy arrays from the with the proper dimensions of the reference image and in the correct location?**

Probably, the necessary information is saved somewhere in the header because I can still open the images with slicer and they show up correctly.

Thanks for your help!

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [October 18, 2023, 2:21pm UTC](https://discourse.slicer.org/t/radiologist-saved-segmentations-without-references-annotations-come-out-cropped-when-loading-as-numpy-arrays/32277/2 "2023-10-18T14:21:59Z")

</div>

You can write a script in Slicer to export the segmentations with respect to a reference geometry, e.g. [like this](https://slicer.readthedocs.io/en/latest/developer_guide/script_repository.html#export-labelmap-node-from-segmentation-node).
