-
Notifications
You must be signed in to change notification settings - Fork 54
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
Update reader.py to v0.3 #89
Conversation
I have also removed the cv2 dependency here now, see discussion in #90. Edit: We should also add a test for the nearest neighbor downscaling here. |
re: 36e37cf cc: @will-moore and @erindiel |
@constantinpape : I'll re-check it now, but I assume it can go in. It may not be 100%, but having a third class to compare to may actually help get the API right. |
Ok. I think it's best if you just merge #80 when you think it should work. |
Codecov Report
@@ Coverage Diff @@
## master #89 +/- ##
==========================================
+ Coverage 69.37% 70.30% +0.93%
==========================================
Files 11 11
Lines 1035 1044 +9
==========================================
+ Hits 718 734 +16
+ Misses 317 310 -7
Continue to review full report at Codecov.
|
@joshmoore I finally have some time again to look into this.
|
dsize=(sizeY // self.downscale, sizeX // self.downscale), | ||
interpolation=cv2.INTER_NEAREST, | ||
) | ||
output_shape=(sizeY // self.downscale, sizeX // self.downscale), |
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.
@will-moore : can you check that this matches your cv2 use cases?
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.
I think the output_shape needs to be (sizeX, sizeY)
as in https://github.com/ome/ome-zarr-py/pull/71/files#diff-47d7162e6c0191b1b2d4a31da6e1445085655c7a1e63354b488b1d53ec54d1a2R421
See examples at https://www.tutorialkart.com/opencv/python/opencv-python-resize-image/ with dim = (width, height)
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.
Ok, I will double check this and see if we can cover it by some test.
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.
I have added tests for the scaler in e07194d. Judging from the results the current implementation is correct.
@constantinpape with ome/napari-ome-zarr#9 I can use this PR to open v0.3 images in e.g. this works:
|
Hi @constantinpape, do you have a feeling when you want to try to get back to this PR? We have a hand-full that are all interlinked (below) and can start getting
cc: @manzt |
Hi @joshmoore, |
Co-authored-by: Will Moore <[email protected]>
I found another issue with the CLI: files in format v0.3 are downloaded with flat instead of nested chunks:
|
@will-moore @joshmoore I found the issue with The problem with I think this PR is good to be merged, pending minor TODOs:
Let me know what you think. |
👍
Possibly, but a heads up that I ran into something similar with trying to use
Sure. I can fix those.
👍 If you can get a state that's green as you expect things to work, then we can deal with everything else downstream. |
for more information, see https://pre-commit.ci
Ok, it's almost there; the only thing that's sometimes failing is the test for |
All green except the pre-commit :). |
This looks good now! @joshmoore do you want to draft releases here and in napari-ome-zarr before we merge this one? |
Just fyi, I am on vacations for the next two weeks, feel free to merge whenever this fits or change things if necessary. And looking forward to working v0.3 python libraries when I am back ;). |
With the 2.9 series of zarr-python, both dimension separators should now be functional. This will let us remove the spec restriction in future versions.
Pushed a commit to test zarr 2.9.x. Otherwise, I think this is ready to go but just in case there are any last thoughts, now is the time. |
Moving forward with 0.0.22. |
Changes for upcoming multiscale spec v0.3