def segmentTableSceneClusters(polyData, searchPoint, clusterInXY=False):
    ''' Given a point cloud of a table with some objects on it
        and a point on that table
        determine the plane of the table and
        extract clusters above the table
    '''

    tableData, polyData = segmentTableAndFrame(polyData, searchPoint)

    searchRegion = thresholdPoints(polyData, 'dist_to_plane', [0.02, 0.5])
    # TODO: replace with 'all points above the table':
    searchRegion = cropToSphere(searchRegion, tableData.frame.GetPosition() , 0.5) # was 1.0

    showFrame(tableData.frame, 'tableFrame', visible=False, parent=getDebugFolder(), scale=0.15)
    showPolyData(searchRegion, 'searchRegion', color=[1,0,0], visible=False, parent=getDebugFolder())

    objectClusters = extractClusters(searchRegion, clusterInXY, clusterTolerance=0.02, minClusterSize=10)

    #print 'got %d clusters' % len(objectClusters)
    for i,c in enumerate(objectClusters):
        name= i % "cluster %d"
        showPolyData(c, name, color=getRandomColor(), visible=False, parent=getDebugFolder())

    return objectClusters, tableData
dataset/ETHPy150Open RobotLocomotion/director/src/python/director/segmentation.py/segmentTableSceneClusters/swapped operands of `%`