-
Notifications
You must be signed in to change notification settings - Fork 21
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
v0.4 axes transforms #31
Conversation
Without scale metadata, scale-bar shows pixels. Using pixel sizes in microns to add: See IDR https://idr.openmicroscopy.org/webclient/img_detail/6001240/ |
You can also set units with |
This pull request has been mentioned on Image.sc Forum. There might be relevant details there: https://forum.image.sc/t/napari-non-integer-step-size/31847/8 |
@will-moore what version of napari are you on? Do you think you would be able to make a reproducible example with just NumPy arrays? This works fine on main: import napari
import numpy as np
_ = napari.view_image(
np.random.random((10, 256, 256)),
scale=(0.5, 0.3, 0.3),
)
napari.run() I get a slider with 10 positions from 0 to 9 inclusive. The broadcasting of the scale doesn't seem to be the issue either, as the sliders also seem fine with this: import napari
import numpy as np
_ = napari.view_image(
np.random.random((3, 10, 256, 256)),
scale=(0.5, 0.3, 0.3),
)
napari.run() |
@jni Thanks for that. I'm using |
Looks like it's not possible to handle units yet - see napari/napari#1701 |
Currently the tests are failing because the code now depends on ome/ome-zarr-py#124 |
Yes that's one of the driver for the pre-release. The other one being ome/omero-cli-zarr#93 which is only passing because there are no tests. I propose we review how close we are later today on signing off on the two open HCS ome-zarr-py and then decide on a 0.3.0 pre-release? |
tested using |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few minor points but happy to get this in for the meeting. I assume we keep it at a pre-release version until ome-zarr-py is ready.
Get a list of these for each level in data. Just use first? | ||
""" | ||
if "transformations" in node_metadata: | ||
level_0_transforms = node_metadata["transformations"][0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a reminder that here we should probably think of a proper model (even if just using @property
s) as the mode
@will-moore can any of the three points raised in #31 (review) be addressed/resolved quickly? Otherwise, I agree to get this merged and tagged as a pre-release in preparation of the community call. |
Codecov Report
@@ Coverage Diff @@
## main #31 +/- ##
==========================================
- Coverage 92.77% 85.92% -6.85%
==========================================
Files 3 3
Lines 180 199 +19
==========================================
+ Hits 167 171 +4
- Misses 13 28 +15
Continue to review full report at Codecov.
|
Thanks @will-moore. Merging and creating a pre-release |
WIP:
Test
napari https://minio-dev.openmicroscopy.org/idr/v0.4/2022-01-05/idr0062/6001240.zarr
.To show scale-bar, open the napari terminal and (on latest napari):
(This was previously
viewer.scale_bar_visible
napari/napari#1720)This PR requires https://pypi.org/project/ome-zarr/0.3a1/
To do:
Not sure yet how to convert affine transform in the spec into what napari is expecting? https://napari.org/api/stable/napari.Viewer.html#napari.Viewer.add_image