Why are dimensions transposed in `arrayFromVolume`?

In the function slicer.util.arrayFromVolume, it looks like the IJK directions get permuted, see the reversed here. Can anyone explain the reason for this?

If I understand correctly, this permutes I,J,K to K,J,I, so for example the 0th dimension of the array returned by arrayFromVolume ends up corresponding to the K direction. That seems weird, so maybe I am missing something here…

Take a look at this comment

linked from this ITK thread

1 Like

Thank you, I suppose this explains the reasoning. K,J,I order is trying to be like (slice, row, column).