def copy_header(im_src, im_dest):
    im_out = im_src.copy()
    im_out.data = im_dest.data
    im_out.setFileName(im_dest.absolutepath)
    return im_out
Copy header from the source image to the destination image
dataset/ETHPy150Open neuropoly/spinalcordtoolbox/scripts/sct_image.py/copy_header