mehta-lab / recOrder

3D quantitative label-free imaging with phase and polarization
BSD 3-Clause "New" or "Revised" License
11 stars 4 forks source link

Sample contribution #427

Closed talonchandler closed 10 months ago

talonchandler commented 10 months ago

Fixes #361, #370.

This .gif demonstrates the sample contributions (from local files for now) and demonstrates the birefringence overlay improvements in #426. output2

TODO:

deprecated-napari-hub-preview-bot[bot] commented 10 months ago

Preview page for your plugin is ready here: https://preview.napari-hub.org/mehta-lab/recOrder/427 Updated: 2023-08-25T23:37:31.994487

codecov[bot] commented 10 months ago

Codecov Report

Merging #427 (1b1e30d) into fix-scale (749bda4) will increase coverage by 0.28%. Report is 3 commits behind head on fix-scale. The diff coverage is 11.36%.

@@             Coverage Diff              @@
##           fix-scale    #427      +/-   ##
============================================
+ Coverage       8.58%   8.87%   +0.28%     
============================================
  Files             26      29       +3     
  Lines           4483    4541      +58     
============================================
+ Hits             385     403      +18     
- Misses          4098    4138      +40     
Files Changed Coverage Δ
recOrder/scripts/samples.py 0.00% <0.00%> (ø)
...er/tests/widget_tests/test_sample_contributions.py 100.00% <100.00%> (ø)

... and 2 files with indirect coverage changes

mattersoflight commented 10 months ago

@talonchandler @ziw-liu created a zenodo entry here: https://zenodo.org/record/8280720

talonchandler commented 10 months ago

Thanks for the upload @mattersoflight!

Do we need to register the method for reading the sample as a reader contribution with napari?

I'm currently loading the data into the viewer myself to make this as easy and as stable as possible.

@ziw-liu I just implemented the download_and_unzip function we talked about. I'm storing the data in tempfile.gettempdir() which returns platform-specific temporary directories. My basic CI is passing across platforms and I tested by hand on Windows and macOS. Any comments on this @ziw-liu?

ziw-liu commented 10 months ago

I'm storing the data in tempfile.gettempdir() which returns platform-specific temporary directories.

This is a clean way to store temporary files. However the files may not persist across sessions. Napari gets its built-in samples from skimage, which are stored in the application cache directories determined with platformdirs.

talonchandler commented 10 months ago

Just changed to platformdirs...much better. Thanks @ziw-liu.