Vtk.util cannot be found in ParrallelProcessing

Hi, I want to transfer numpy array to vtkPoints in a script under the extension ParrallelProcessing. I use

import vtk
fp = vtk.vtkPoints()
fp.SetData(vtk.util.numpy_support.numpy_to_vtk(points))

but return

AttributeError: module 'vtk' has no attribute 'util'

However, vtk.util works fine in the main python script (not in ParrallelProcessing). Is there any limitation of the ParrallelProcessing? Thank you.

You’ll need to explicitly do import vtk.util. The Slicer app imports several packages (vtk, ctk, qt…) but when you run in in the PythonSlicer environment you get Slicer’s python build but without the Slicer parts.