quantumjot / btrack

Bayesian multi-object tracking
https://btrack.readthedocs.io
MIT License
311 stars 50 forks source link

Add dimensionality inference when converting to napari layer #205

Closed quantumjot closed 1 year ago

quantumjot commented 1 year ago

Relates to https://github.com/lowe-lab-ucl/napari-btrack/issues/52

This lets the napari reader try to infer whether the data are 2D or 3D, based on the data in the file. It was previously hard-coded into the reader:

https://github.com/quantumjot/BayesianTracker/blob/8139868c06ba9ac4754299494cb49a7bf3160d5a/btrack/napari/reader.py#L82

It might be an idea to store this as an HDF5 attribute at some point, but in lieu of that this will work.

Also added a quick test to check the inference works.

deprecated-napari-hub-preview-bot[bot] commented 1 year ago

Preview page for your plugin is ready here: https://preview.napari-hub.org/quantumjot/BayesianTracker/205 Updated: 2023-03-08T19:16:51.200481

codecov-commenter commented 1 year ago

Codecov Report

Patch coverage: 85.71% and project coverage change: +0.03 :tada:

Comparison is base (20d504e) 88.54% compared to head (90ce3ce) 88.58%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #205 +/- ## ========================================== + Coverage 88.54% 88.58% +0.03% ========================================== Files 19 19 Lines 1519 1524 +5 ========================================== + Hits 1345 1350 +5 Misses 174 174 ``` | [Impacted Files](https://codecov.io/gh/quantumjot/BayesianTracker/pull/205?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Alan+R+Lowe) | Coverage Δ | | |---|---|---| | [btrack/napari/reader.py](https://codecov.io/gh/quantumjot/BayesianTracker/pull/205?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Alan+R+Lowe#diff-YnRyYWNrL25hcGFyaS9yZWFkZXIucHk=) | `80.00% <0.00%> (ø)` | | | [btrack/core.py](https://codecov.io/gh/quantumjot/BayesianTracker/pull/205?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Alan+R+Lowe#diff-YnRyYWNrL2NvcmUucHk=) | `88.68% <100.00%> (+0.10%)` | :arrow_up: | | [btrack/utils.py](https://codecov.io/gh/quantumjot/BayesianTracker/pull/205?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Alan+R+Lowe#diff-YnRyYWNrL3V0aWxzLnB5) | `92.30% <100.00%> (+0.22%)` | :arrow_up: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Alan+R+Lowe). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Alan+R+Lowe)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.