Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make regionprops available per mask #1610

Merged
merged 1 commit into from
Oct 17, 2019
Merged

Make regionprops available per mask #1610

merged 1 commit into from
Oct 17, 2019

Conversation

ttung
Copy link
Collaborator

@ttung ttung commented Oct 10, 2019

regionprops are useful to characterize and filter segmented cells. This PR changes what we store for mask data to be a tuple of binary mask and regionprops. If we construct a mask collection from a labeled image, we retain the region props that are automatically calculated as a part of this conversion process. If we construct a mask collection from what's stored on disk, we will calculate the regionprops when requested.

Test plan: Save to disk a mask collection generated from a labeled image, and after loading it from disk, verify that the region props of the two mask collections match.

Part of #1497

@ttung ttung requested a review from shanaxel42 October 10, 2019 23:52
@codecov-io
Copy link

codecov-io commented Oct 11, 2019

Codecov Report

Merging #1610 into master will increase coverage by <.01%.
The diff coverage is 84%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1610      +/-   ##
==========================================
+ Coverage   88.04%   88.04%   +<.01%     
==========================================
  Files         155      155              
  Lines        5438     5455      +17     
==========================================
+ Hits         4788     4803      +15     
- Misses        650      652       +2
Impacted Files Coverage Δ
...arfish/core/segmentation_mask/segmentation_mask.py 93.2% <84%> (-0.99%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4378e25...3429923. Read the comment docs.

@ttung ttung force-pushed the tonytung-regionprops branch from f631229 to f9189b5 Compare October 16, 2019 21:35
regionprops are useful to characterize and filter segmented cells.  This PR changes what we store for mask data to be a tuple of binary mask and regionprops.  If we construct a mask collection from a labeled image, we retain the region props that are automatically calculated as a part of this conversion process.  If we construct a mask collection from what's stored on disk, we will calculate the regionprops when requested.

Test plan: Save to disk a mask collection generated from a labeled image, and after loading it from disk, verify that the region props of the two mask collections match.

Part of #1497
@ttung ttung force-pushed the tonytung-regionprops branch from f9189b5 to 3429923 Compare October 17, 2019 20:03
@ttung ttung merged commit d2df275 into master Oct 17, 2019
@ttung ttung deleted the tonytung-regionprops branch October 17, 2019 21:11
ttung pushed a commit that referenced this pull request Oct 18, 2019
We will use BinaryMaskCollection for other useful purposes, where it may not necessarily be the product of segmentation.

Test plan: travis.
Depends on #1610
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