def segmentTableAndFrame(polyData, searchPoint):
    '''
    Segment a table using a searchPoint on the table top
    and then recover its coordinate frame, facing away from the robot
    Objects/points on the table are ignored

    Input: polyData and searchPoint on the table

    Output: FieldContainer with:
    - all relevent details about the table (only)

    '''

    polyData, tablePoints, _, _ = segmentTable(polyData, searchPoint)
    tableMesh = computeDelaunay3D(tablePoints)

    viewFrame = SegmentationContext.getGlobalInstance().getViewFrame()
    viewDirection = SegmentationContext.getGlobalInstance().getViewDirection()
    robotYaw = math.atan2( viewDirection[1], viewDirection[0] )*np.pi/180.0
    linkFrame = transformUtils.frameFromPositionAndRPY( viewFrame.GetPosition() , [0,0, robotYaw ] )    

    # Function returns corner point that is far right from the robot
    cornerTransform, rectDepth, rectWidth, _ = findMinimumBoundingRectangle(tablePoints, linkFrame)
    rectHeight = 0.02 # arbitrary table width
   
    # recover mid point
    t = transformUtils.copyFrame(cornerTransform)
    t.PreMultiply()
    table_center = [-rectDepth/2, rectWidth/2, 0]
    t3 = transformUtils.frameFromPositionAndRPY(table_center,[0,0,0])
    t.Concatenate(t3)

    # Create required outputs
    edgeLengths = [rectDepth, rectWidth, rectHeight]
    tableXAxis, tableYAxis, tableZAxis = transformUtils.getAxesFromTransform(t)
    axes = tableXAxis, tableYAxis, tableZAxis
    wf = vtk.vtkOutlineSource()
    wf.SetBounds([-rectDepth/2,rectDepth/2, -rectWidth/2,rectWidth/2, -rectHeight/2,rectHeight/2])
    #wf.SetBoxTypeToOriented()
    #cube =[0,0,0,1,0,0,0,1,0,1,1,0,0,0,1,1,0,1,0,1,1,1,1,1]
    #wf.SetCorners(cube)
    wireframe = wf.GetOutput()

    tablePoints = transformPolyData(tablePoints, t.GetLinearInverse())
    #wireframe = transformPolyData(wireframe, t.GetLinearInverse())
    tableMesh = transformPolyData(tableMesh, t.GetLinearInverse())

    return FieldContainer(points=tablePoints, box=wireframe, mesh=tableMesh, frame=t, dims=edgeLengths, axes=axes), polyData
dataset/ETHPy150Open RobotLocomotion/director/src/python/director/segmentation.py/segmentTableAndFrame/swapped operands of `/`