chanzuckerberg / napari-cryoet-data-portal

A napari plugin to list, preview, and open data from the CZ Imaging Institute's CryoET Data Portal
MIT License
9 stars 2 forks source link

Support dense segmentation and oriented-point annotations #21

Closed andy-sweet closed 6 months ago

andy-sweet commented 11 months ago

This adds support for segmentation-mask and oriented-points annotations types.

Screenshot 2024-05-15 at 16 42 33

Segmentation masks are supported by loading the corresponding OME-Zarrs in a similar way to the tomogram (i.e. according to resolution).

Oriented points are currently read and displayed as regular points. We can follow up with another PR to augment that with the orientation information (e.g. with a vectors layer).

As some datasets contain tomograms with lots of different annotations (e.g. 10000), performance can suffer both while waiting for data to arrive and when interacting with napari once it has.

This also fixes an alignment issue caused by the highest resolution tomogram volume having a non-unit volume. I originally separated that into #31, but there was some overlap with the changes here, so I brought it into this PR.

Closes #22 and #23

codecov[bot] commented 11 months ago

Codecov Report

Attention: Patch coverage is 42.10526% with 33 lines in your changes are missing coverage. Please review.

Project coverage is 80.73%. Comparing base (8f5c5c5) to head (8efcc9b).

:exclamation: Current head 8efcc9b differs from pull request most recent head 83c1ed6

Please upload reports for the commit 83c1ed6 to get more accurate results.

Files Patch % Lines
src/napari_cryoet_data_portal/_open_widget.py 13.63% 19 Missing :warning:
src/napari_cryoet_data_portal/_reader.py 60.00% 14 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #21 +/- ## ========================================== - Coverage 81.87% 80.73% -1.15% ========================================== Files 14 14 Lines 673 711 +38 ========================================== + Hits 551 574 +23 - Misses 122 137 +15 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

andy-sweet commented 6 months ago

Thanks for the review!