I am currently working with brain MRI DICOM files and, for further post processing pipelines, I would like to export it as npy. files. When I do that (programmatically) I found that the each volume is orient as the original acquisition (for example if the sequence was a T1 coronal, the first dimension in the npy will be the coronal…)
To optimize the automatization I would like to export all the volumes as Axial, Coronal, Sagittal.
I think the solution is use Orient Scalar Volume module, that allows me set the output orientation of of the volume and the I can export it as a npy file with arrayFromVolume(volumeNode)
MONAI provides well-tested tools to conveniently address common needs like this. For example, in deep learning pipelines usually there is an Orientationd transform that can reorder or resample the voxel array to be bring all images to a canonical orientation. The transform can also compute the inverse operation to get output in the original space.