-
Notifications
You must be signed in to change notification settings - Fork 276
Closed
Description
Seems GetData and SetCells is deprecated as of vtk 9.6.0. See the traceback below:
brainglobe_atlasapi/atlas_generation/mesh_utils.py:237: in create_region_mesh
extract_mesh_from_mask(
brainglobe_atlasapi/atlas_generation/mesh_utils.py:151: in extract_mesh_from_mask
write(mesh, str(obj_filepath))
.tox/py311/lib/python3.11/site-packages/vedo/file_io.py:1354: in write
for i, f in enumerate(objct.cells):
^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <vedo.mesh.Mesh object at 0x7f55b19e6790>
@property
def cells(cls):
"""
Get the cells connectivity ids as a numpy array.
The output format is: `[[id0 ... idn], [id0 ... idm], etc]`.
"""
try:
# valid for unstructured grid
arr1d = utils.vtk2numpy(cls.dataset.GetCells().GetData())
except AttributeError:
try:
# valid for polydata
> arr1d = utils.vtk2numpy(cls.dataset.GetPolys().GetData())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E DeprecationWarning: Call to deprecated method GetData. (Use ExportLegacyFormat, or GetOffsetsArray/GetConnectivityArray instead.) -- Deprecated since version 9.6.0.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels