feat: support multiscales#22
Conversation
|
Hey @jo-mueller, this is super cool 😍😎🚀 Will have a look at the code tomorrow! |
|
Perfect, so with the changes you made the stitching plugin gets multiscale xarray images from multiscale napari layers 🥳🥳 That will allow the plugin to use the right resolution layer from the napari layer for registration. For fusion, napari-stitcher is a bit behind multiview-stitcher and still fuses individual resolution layers. If you don't mind I'll hijack your PR branch and add changes to complete full multiscales support. |
Not at all :) Actually maybe you could also hijack the resolution level selector in the latest napari version? I.e., you could set the resolution on a per layer basis and then use that as an indicator on which level to use? 🤔 |
|
I like the idea! The closer the control is to vanilla / built-in napari the better :) How about the following: If the resolution is set to a given resolution for a given layer, that's used within the stitcher. If it's left on |
…into support-multiscales
|
Okay, I
I also added a multiscale sample dataset which illustrates the multiscale behaviour :) multiscale_digits.mp4 |
|
Woah awesomeI! Love the numbering in the scale levels, very cool idea 💪 |
Codecov Report❌ Patch coverage is Please upload reports for the commit 52a5358 to get more accurate results. Additional details and impacted files@@ Coverage Diff @@
## main #22 +/- ##
==========================================
+ Coverage 86.24% 88.75% +2.51%
==========================================
Files 13 14 +1
Lines 858 1290 +432
==========================================
+ Hits 740 1145 +405
- Misses 118 145 +27 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Following this, it would probably be really cool to have a writer in napari so one could then save the stitched output into ome-zarr 🤔 |
|
Definitely! Maybe napari-ome-zarr would be a good place for this, or maybe even already has a writer? Next to the stitched image it'd be cool to be able to save the refined transformation parameters (without writing image data) to individual multiscales, or an OME-Zarr v06 scene. |
|
Napari-ome-zarr would be the right place, but can't do it yet 👍 |
|
I see, do you know why it is that it cannot do it yet? Is it simply that it's not implemented yet or are there blockers? |
|
Totally in scope! I think since the more recent API changes at ome-zarr-py, it should be relatively straightforward. Project for Thursday? Edit: ome/napari-ome-zarr#163 |
|
Sounds great :) |
…is way, stitcher msims are backed by zarr rather than dask arrays.
|
Merging here! Thanks for kicking this off @jo-mueller :) |
Hi @m-albert ,
small QOL feature to enable working with multiscales in napari that are not
xarraymultiscales. This makes the napari-multiview stitcher compatible with ome-zarr 0.6-backed scenes. In anapri, you can then just drag&drop an entire scene along with the coordinates of each tile, hitfuseorregisterand you're done :)multiview_stitcher_example.mp4