def flipNormalsWithViewDirection(polyData, viewDirection):
    normals = vnp.getNumpyFromVtk(polyData, 'normals')
    normals[np.dot(normals, viewDirection) > 0] *= -1
dataset/ETHPy150Open RobotLocomotion/director/src/python/director/segmentation.py/flipNormalsWithViewDirection/original