Skip to content

Mask.regionprops property to calculate properties.#210

Merged
JoOkuma merged 6 commits intoroyerlab:mainfrom
yfukai:mask_centroid_calc
Nov 24, 2025
Merged

Mask.regionprops property to calculate properties.#210
JoOkuma merged 6 commits intoroyerlab:mainfrom
yfukai:mask_centroid_calc

Conversation

@yfukai
Copy link
Copy Markdown
Contributor

@yfukai yfukai commented Nov 20, 2025

I added Mask.regionprops to calculate the properties of the masked region.
Ideally we could think of

  • Automatically updating the props upon mask update
  • Calculating image-dependent props such as mean intensity etc

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Nov 20, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.38%. Comparing base (5d51270) to head (4555062).
⚠️ Report is 12 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #210      +/-   ##
==========================================
+ Coverage   88.22%   88.38%   +0.16%     
==========================================
  Files          51       54       +3     
  Lines        3592     3849     +257     
  Branches      617      665      +48     
==========================================
+ Hits         3169     3402     +233     
- Misses        254      267      +13     
- Partials      169      180      +11     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Member

@JoOkuma JoOkuma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yfukai, thanks for the PR

I left a few comments to improve the typing.

Comment thread src/tracksdata/nodes/_mask.py
Comment thread src/tracksdata/nodes/_mask.py Outdated
Comment thread src/tracksdata/nodes/_mask.py Outdated
Comment thread src/tracksdata/nodes/_mask.py Outdated
yfukai and others added 3 commits November 23, 2025 08:09
Co-authored-by: Jordão Bragantini <jordao.bragantini@gmail.com>
Co-authored-by: Jordão Bragantini <jordao.bragantini@gmail.com>
Co-authored-by: Jordão Bragantini <jordao.bragantini@gmail.com>
@yfukai
Copy link
Copy Markdown
Contributor Author

yfukai commented Nov 22, 2025

I noticed that setting this as a property causes an issue with pickling, and changed this to a function.

@JoOkuma JoOkuma merged commit 1796cc5 into royerlab:main Nov 24, 2025
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants