-
-
Notifications
You must be signed in to change notification settings - Fork 410
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Select Mode of Points Layer broken in 4 dimensions #6680
Comments
Hi there, gave this a check and seems like changing the logic at napari/napari/layers/base/base.py Lines 1644 to 1658 in 1ee84b3
@staticmethod
def _world_to_layer_dims_impl(
world_dims: npt.NDArray, ndim_world: int, ndim: int
) -> npt.NDArray:
"""
Static for ease of testing
"""
offset = ndim_world - ndim
order = np.array(world_dims)
if offset == 0:
return order
if offset < 0:
return np.concatenate((np.arange(-offset), order - offset))
return order[order >= offset] - offset helps. I think the relevant PR where the logic changed is #6210 where an attempt to simplify the logic for the |
Not right now and it seems @dalthviz has a starting point. It would be good to see a PR with an example to see if this all makes sense! |
馃悰 Bug Report
When displaying points 4D with the 3D view, selecting the "Select" mode of the Points layer then dragging the mouse across the canvas (not moving point, just dragging the cursor as if to create the usual selection bounding box) does nothing and raises an Assertion error. If a point is clicked instead, it can be moved normally without any error.
Here's the error I get
When the cursor is not dragged but clicked, an Axis error raises (
axisa: axis -1 is out of bounds for array of dimension 0
). I won't show the error stack as it is quite long.馃挕 Steps to Reproduce
馃挕 Expected Behavior
Normally, the action described should draw a thin blue rectangular bounding box that allows selecting the points.
馃寧 Environment
napari: 0.1.dev3244+g0747da5
Platform: Linux-5.15.0-91-generic-x86_64-with-glibc2.31
System: Ubuntu 20.04.6 LTS
Python: 3.9.0 (default, Nov 15 2020, 14:28:56) [GCC 7.3.0]
Qt: 5.15.2
PyQt5: 5.15.9
NumPy: 1.24.2
SciPy: 1.9.1
Dask: 2023.4.0
VisPy: 0.14.1
magicgui: 0.7.2
superqt: 0.6.1
in-n-out: 0.1.7
app-model: 0.2.4
npe2: 0.7.4
OpenGL:
Settings path:
Plugins:
馃挕 Additional Context
No response
The text was updated successfully, but these errors were encountered: