# Matching Monai orientation with "arrayFromVolume" output

**URL:** <https://discourse.slicer.org/t/matching-monai-orientation-with-arrayfromvolume-output/37810>\
**Category:** Development\
**Tags:** python, monai\
**Created:** [August 9, 2024, 10:11pm UTC](https://discourse.slicer.org/t/matching-monai-orientation-with-arrayfromvolume-output/37810 "2024-08-09T22:11:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![chbricout](https://avatars.discourse-cdn.com/v4/letter/c/b38774/32.png) [@chbricout](https://discourse.slicer.org/u/chbricout)\
**Post date:** [August 9, 2024, 10:11pm UTC](https://discourse.slicer.org/t/matching-monai-orientation-with-arrayfromvolume-output/37810/1 "2024-08-09T22:11:29Z")

</div>

Hi everyone,

I’m developing a simple extension to integrate a motion estimation model into Slicer. I’m using MONAI for most of the training, including data loading. However, I’ve noticed that the volume I get when using `slicer.util.arrayFromVolume` is rotated compared to the output from my MONAI pipeline.

Has anyone else encountered this issue? If so, how did you resolve it? Specifically, I’m trying to determine how to retrieve the orientation of the array returned by Slicer so I can decide which transform to apply.

Thanks in advance for your help!  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/4/c/4c060a244cc8bfe412893a98f682c8fe196baaf2.jpeg)

---

<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:** [August 11, 2024, 9:32pm UTC](https://discourse.slicer.org/t/matching-monai-orientation-with-arrayfromvolume-output/37810/2 "2024-08-11T21:32:51Z")

</div>

A raw numpy array doesn’t have the `ijkToRAS` (index to physical) transform. See [https://slicer.readthedocs.io/en/latest/user\_guide/coordinate\_systems.html](https://slicer.readthedocs.io/en/latest/user_guide/coordinate_systems.html)
