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

Account for scatter layers when determining ipyvolume volume resolution #64

Merged
merged 1 commit into from
Oct 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion glue_ar/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,8 @@
try:
from glue_jupyter.common.state3d import VolumeViewerState
if isinstance(viewer_state, VolumeViewerState):
return max((getattr(state, 'max_resolution', 256) for state in viewer_state.layers), default=256)
resolutions = tuple(getattr(state, 'max_resolution', None) for state in viewer_state.layers)
return max((res for res in resolutions if res is not None), default=256)

Check warning on line 283 in glue_ar/utils.py

View check run for this annotation

Codecov / codecov/patch

glue_ar/utils.py#L282-L283

Added lines #L282 - L283 were not covered by tests
except ImportError:
pass

Expand Down