def get_bounding_box(in_file):
    """ Retrieve the bounding box of a volume in millimetres."""
    from itertools import product
    import nibabel as nib
    import numpy as np
    img = nib.load(in_file)
    corners = np.array(list(product([0, 1], repeat=3)))
    corners = corners * (np.array(img.shape[:3]) - 1)
    corners = img.affine.dot(np.hstack([corners, np.ones((8, 1))]).T).T[:, :3]
    low_corner = np.min(corners, axis=0)
    high_corner = np.max(corners, axis=0)
    return [low_corner.tolist(), high_corner.tolist()]
