Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with 4D meshes #84

Open
kephale opened this issue Aug 9, 2023 · 1 comment
Open

Issues with 4D meshes #84

kephale opened this issue Aug 9, 2023 · 1 comment

Comments

@kephale
Copy link

kephale commented Aug 9, 2023

Hey Friends!

I ran into an issue using nppas on a 4D mesh (json export of layer.data = https://gist.github.com/kephale/2357e3b9567f3bdedcc43c906a6de245).

The error is:

  File "/Users/kharrington/mambaforge/envs/nesoi/lib/python3.10/site-packages/psygnal/_signal.py", line 950, in _run_emit_loop
    caller.cb(args)
  File "/Users/kharrington/mambaforge/envs/nesoi/lib/python3.10/site-packages/psygnal/_weak_callback.py", line 265, in cb
    self._f(*self._args, *args, **self._kwargs)
  File "/Users/kharrington/mambaforge/envs/nesoi/lib/python3.10/site-packages/magicgui/widgets/_function_gui.py", line 218, in _disable_button_and_call
    self.__call__()
  File "/Users/kharrington/mambaforge/envs/nesoi/lib/python3.10/site-packages/magicgui/widgets/_function_gui.py", line 331, in __call__
    value = self._function(*bound.args, **bound.kwargs)
  File "/Users/kharrington/mambaforge/envs/nesoi/lib/python3.10/site-packages/napari_process_points_and_surfaces/_quantification.py", line 134, in _surface_quality_table
    return surface_quality_table(surface, qualities, napari_viewer)
  File "/Users/kharrington/mambaforge/envs/nesoi/lib/python3.10/site-packages/napari_process_points_and_surfaces/_quantification.py", line 155, in surface_quality_table
    result = add_quality(surface, quality)
  File "/Users/kharrington/mambaforge/envs/nesoi/lib/python3.10/site-packages/napari_process_points_and_surfaces/_quantification.py", line 90, in add_quality
    mesh = vedo.mesh.Mesh((surface[0], surface[1]))
  File "/Users/kharrington/mambaforge/envs/nesoi/lib/python3.10/site-packages/vedo/mesh.py", line 149, in __init__
    self._data = buildPolyData(inputobj[0], inputobj[1])
  File "/Users/kharrington/mambaforge/envs/nesoi/lib/python3.10/site-packages/vedo/utils.py", line 585, in buildPolyData
    vertices = make3d(vertices)
  File "/Users/kharrington/mambaforge/envs/nesoi/lib/python3.10/site-packages/vedo/utils.py", line 512, in make3d
    raise ValueError("input shape is not supported.")
ValueError: input shape is not supported.

Since napari supports surfaces that are >3D it seems like a call like this should either throw a warning about the dimension of the input and either fail or show the results for the currently selected timestep.

@haesleinhuepf
Copy link
Owner

Thanks for pointing this out @kephale ! We're aware of this and actually have a partial solution in napari-stress. See this issue:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants