Why to invert the order of the indices between numpy and SimpleITK?

Based on the little I remember when I implemented this and what I can see in the implementation of _GetImageViewFromArray() which allows to import images in ITK from NumPy arrays that have Fortran or C ordering, it should be possible to add an option to _GetArrayViewFromImage() to select the ordering in the imported NumPy array. Does anybody want to give it a shot? Potentially it is just a matter of changing the order of the size vector components.

1 Like