Matching Monai orientation with "arrayFromVolume" output

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

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