Merged
Conversation
Support optional raw_sum, raw_sum_sq, raw_count kwargs for tracking per-label intensity statistics. Derived mean_intensity and std_intensity are computed from accumulators. Updated __add__ to merge and __eq__ to compare raw intensity fields.
…rmation New function computes per-label sum, sum of squares, and count using fastremap and bincount. get_object_information now accepts an optional raw_data kwarg and passes intensity accumulators to ObjectInformation.
Measure now accepts optional raw_path kwarg to compute per-label mean and std intensity from a raw zarr dataset. Resolution differences are handled via ImageDataInterface output_voxel_size. CSV output includes Mean Intensity and Std Intensity columns when raw_path is provided.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #54 +/- ##
==========================================
+ Coverage 81.89% 81.92% +0.02%
==========================================
Files 24 24
Lines 3016 3076 +60
==========================================
+ Hits 2470 2520 +50
- Misses 546 556 +10 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces support for measuring raw intensity statistics for segmented objects, including their mean and standard deviation, and integrates these statistics throughout the measurement pipeline. The changes add new functionality for handling raw intensity data, updating object information, and outputting these statistics, as well as comprehensive tests to ensure correctness.
Raw intensity support and integration:
raw_pathin theMeasureclass, loading raw intensity data and propagating it through blockwise measurement processing (src/cellmap_analyze/analyze/measure.py). [1] [2]src/cellmap_analyze/analyze/measure.py). [1] [2]Object information enhancements:
raw_sum,raw_sum_sq,raw_count,mean_intensity,std_intensity,has_raw_intensity) inObjectInformation, including validation and aggregation in addition and equality operations (src/cellmap_analyze/util/information_holders.py). [1] [2] [3]Measurement utilities:
get_raw_intensity_statsto efficiently compute per-label raw intensity statistics, and integrated it intoget_object_informationfor both whole and blockwise measurements (src/cellmap_analyze/util/measure_util.py). [1] [2] [3] [4]Testing improvements:
tests/conftest.py,tests/operations/test_measure.py). [1] [2] [3] [4]Expanded test coverage:
ObjectInformationobjects with raw intensity, and end-to-end measurement with raw intensity input (tests/operations/test_measure.py).