def convert_voxels_padding(voxels, pad_width):
    """
    Convert the voxels gained before padding
    to the voxels after padding.
    (i.e. position at small image -> position at large image).
    """
    dim = voxels.shape[1]
    new_voxels = voxels.copy()
    if type(pad_width) == int:
        pad_width = tuple([pad_width] * dim)
    for axis in range(dim):
        new_voxels[:, axis] += pad_width[axis]
    return new_voxels