def get_dx(p0, p1, smooth_line, cl_id, id_end, id_mid, id_start):
    """Get the displacement for the Voronoi point

    Args:
        p0 (ndarray): Point i on the old centerline.
        p1 (ndarray): Point i on the new centerline.
        smooth_line (bool): Turn on/off increasing curvuature.
        cl_id (int): ID of point i
        id_end (int): Point ID of start transition region.
        id_mid (int): Point ID of start end transition.
        id_start (int): Point ID of end point.

    Return:
        dx (float): Displacement
    """
    if smooth_line:
        dx = p1 - p0
    else:
        dx = -(p1 - p0)

    # Smooth transition at inlet and at end of region of interest
    if cl_id < id_start:
        dx *= cl_id / float(id_start)
    elif cl_id > id_mid:
        dx *= (id_end - cl_id) / float(id_end - id_mid)

    return dx