def get_orientation_3d(im, filename=False):
    from sct_utils import run
    string_out = 'Input image orientation : '
    # get orientation
    if filename:
        status, output = run('isct_orientation3d -i '+im+' -get ', 0)
    else:
        status, output = run('isct_orientation3d -i '+im.absolutepath+' -get ', 0)
    # check status
    if status != 0:
        printv('ERROR in get_orientation.', 1, 'error')
    orientation = output[output.index(string_out)+len(string_out):]
    # orientation = output[26:]
    return orientation


# set_orientation
# ==========================================================================================
Sends a prepare request to all Acceptors as the first step in attempting to
dataset/ETHPy150Open neuropoly/spinalcordtoolbox/scripts/sct_image.py/get_orientation_3d--crossover with--dataset/ETHPy150Open cocagne/paxos/paxos/essential.py/Proposer.prepare