def xyz2zxy(vol):
    """
    Swaps axes to ELEKTRONN convention ([X, Y, Z] -> [Z, X, Y]). If additional
    channel axis is provided: [X, Y, Z, CH] -> [Z, X, Y, CH]

    Parameters
    ----------
    vol : np.array [X, Y, Z]

    Returns
    -------
    np.array [Z, X, Y]
    """
    assert vol.ndim >= 3
    vol = vol.swapaxes(1, 0)
    vol = vol.swapaxes(0, 2)
    return vol
