

def thresholdPoints(polyData, arrayName, thresholdRange):
    assert polyData.GetPointData().GetArray(arrayName)
    f = vtk.vtkThresholdPoints()
    f.SetInput(polyData)
    f.ThresholdBetween(thresholdRange[0], thresholdRange[1])
    f.SetInputArrayToProcess(0, 0, 0, vtk.vtkDataObject.FIELD_ASSOCIATION_POINTS, arrayName)
    f.Update()
    return shallowCopy(f.GetOutput())

dataset/ETHPy150Open RobotLocomotion/director/src/python/director/filterUtils.py thresholdPoints/original