This page is a reference documentation. It only explains the function signature, and not how to use it. Please refer to the user guide for the big picture.
Returns an image with the affine diagonal (by permuting axes). The orientation of the new image will be RAS (Right, Anterior, Superior). If it is impossible to get xyz ordering by permuting the axes, a ‘ValueError’ is raised.
img: Niimg-like object