Skip to content

feat: add XYZ scale to ArrayDisplayModel #165

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

tlambert03
Copy link
Member

@tlambert03 tlambert03 commented Mar 30, 2025

something we've needed here at the QI course...

exposes the ability to set the scale part of the transform (and only the scale for now) on the image being displayed. mostly needed for anisotropic z sampling

may introduce some additional changes needed for the camera centering

Copy link

codecov bot commented Mar 30, 2025

Codecov Report

Attention: Patch coverage is 64.70588% with 12 lines in your changes missing coverage. Please review.

Project coverage is 45.53%. Comparing base (cdc4f5d) to head (d5da376).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/ndv/models/_array_display_model.py 76.19% 5 Missing ⚠️
src/ndv/views/_pygfx/_array_canvas.py 0.00% 4 Missing ⚠️
src/ndv/controllers/_array_viewer.py 50.00% 3 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (cdc4f5d) and HEAD (d5da376). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (cdc4f5d) HEAD (d5da376)
2 1
Additional details and impacted files
@@             Coverage Diff             @@
##             main     #165       +/-   ##
===========================================
- Coverage   80.80%   45.53%   -35.28%     
===========================================
  Files          45       45               
  Lines        4271     4553      +282     
===========================================
- Hits         3451     2073     -1378     
- Misses        820     2480     +1660     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tlambert03
Copy link
Member Author

one challenge this PR generally exposes: how does a user pass data-related metadata (like channel names, scales, etc...). Yes, we support named arrays and we try to get all this info from xarray etc... but i don't want someone to have to create an xarray just to add some metadata. The DataWrapper is the natural place for this to live... but someone shouldn't have to subclass it to customize it (if it's not in the array info itself already).

this PR could just make the visualization possible, without weighing in on the public API

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

Successfully merging this pull request may close these issues.

1 participant