Convert a nibabel image to an ANTsImage

def from_nibabel(nib_image):
    """
    Convert a nibabel image to an ANTsImage
    """
    tmpfile = mktemp(suffix='.nii.gz')
    nib_image.to_filename(tmpfile)
    new_img = iio2.image_read(tmpfile)
    os.remove(tmpfile)
    return new_img