ipygany
ipygany copied to clipboard
Use vtk dataset_adapter for faster vtk loading
There is a dataset_adapter in vtk that should speed up the vtk file loading:
from vtk.numpy_interface import dataset_adapter as dsa
# Get vertices as a NumPy array without going through a for-loop
vertices = dsa.WrapDataObject(grid).Points