def is_point_inside_surf(point, selector, conv_iter, max_iter):
    """
    Call repeatedly to VTK methods until a consensuous is reached
    :param point: point coordinates
    :param selector: vtkSelectEnclosedPoints object for the surface
    :param conv_iter: number of iterations for convergence
    :param max_iter: maximum number of iterations
    :return: True if the opoint is inside after the repeated calls, otherwise False
    """
    count_p, count_n, total = 0, 0, 0
    for i in range(max_iter):
        if selector.IsInsideSurface(point) > 0:
            count_p += 1
            count_n = 0
            total += 1
        else:
            count_p = 0
            count_n += 1
            total -= 1
        if count_p >= conv_iter:
            return True
        if count_n >= conv_iter:
            return False
    if total > 0:
        return True
    else:
        return False