Hi Andras,
I am writing vtk file from within slicer using meshio. I am getting the following error. Is there any solution?
mesh = n.GetMesh()
points = mesh.GetPoints()
cells = mesh.GetCells()
import meshio
meshio.write_points_cells(“example.vtk”, points, cells)
Traceback (most recent call last):
File “”, line 1, in
File “/home/saima/Slicer-4.11.0-2020-02-25-linux-amd64/lib/Python/lib/python3.6/site-packages/meshio/_helpers.py”, line 81, in write_points_cells
cells = {key: numpy.asarray(value) for key, value in cells.items()}
AttributeError: ‘vtkCommonDataModelPython.vtkCellArray’ object has no attribute ‘items’
thank you
Regards,
Saima Safdar