How to convert vtkPoints to numpy?

wrc
Fri, 07 Jul 2023 08:06:37 +0000
Development

Hello, I want to convert vtkPoints to numpy. I used

vtk.util.numpy_support.vtk_to_numpy(vtkPoints)

But I got

  File "/Applications/Slicer.app/Contents/bin/Python/vtkmodules/util/numpy_support.py", line 220, in vtk_to_numpy
    shape = vtk_array.GetNumberOfTuples(), \
AttributeError: 'vtkmodules.vtkCommonCore.vtkPoints' object has no attribute 'GetNumberOfTuples'

How to solve this problem?
Thank you very much.

2 posts - 2 participants