def decodePolyData(data):

    if not hasattr(vtk, 'vtkCommunicator'):
        r = vtk.vtkPolyDataReader()
        r.ReadFromInputStringOn()
        r.SetInputString(str(data.data))
        r.Update()
        return shallowCopy(r.GetOutput())

    charArray = vnp.getVtkFromNumpy(data)
    assert isinstance(charArray, vtk.vtkCharArray)
    polyData = vtk.vtkPolyData()
    vtk.vtkCommunicator.UnMarshalDataObject(charArray, polyData)
    return polyData
Given a numpy int8 array, deserializes the data to construct a new
dataset/ETHPy150Open RobotLocomotion/director/src/python/director/geometryencoder.py/decodePolyData