dataset_adapter dictionary interface broken - infinite hang
Something is causing dataset_adapter to hang indefinitely using 100% CPU when data is requested via the dictionary interface. I am using Python 2.7.14 with vtk 6.3.0 build py27_1 on a linux machine, as installed via Anaconda. Here are a couple of minimum working examples:
Assume filename is the location of a legacy ascii vtk dataset with a field entry 'TIME' corresponding to the number 10. In this example, I will suppose it contains rectilinear grid info, but it doesn't really matter.
import vtk
from vtk.numpy_interface import dataset_adapter as dsa
def read_file(filename):
reader = vtk.vtkRectilinearGridReader()
reader.SetFileName(filename)
reader.Update()
vtk_data = reader.GetOutput()
py_data = dsa.WrapDataObject(vtk_data)
vtktime = py_data.FieldData['TIME']
Expected: vtktime contains a vtkArray that can then be converted to numpy, etc.
Actual behavior: Infinite hang on the last line.
Here is another. Assume filename is the location of a legacy ascii vtk dataset of unstructured grid points.
import vtk
from vtk.numpy_interface import dataset_adapter as dsa
def read_grid_points(filename):
reader = vtk.vtkRectilinearGridReader()
reader.SetFileName(filename)
reader.Update()
vtk_data = reader.GetOutput()
py_data = dsa.WrapDataObject(vtk_data)
vtkpoints = py_data.Points
Expected: a vtk object with point data.
Actual behavior: Infinite hang on the last line.
I'd be happy to attach some data under 1 MB per file if someone likes.