Merged
Conversation
Compute EDT-based radii, longest shortest path distance, and branch count for each skeleton. Write results to a _with_skeletons.csv alongside the input CSV. Add a note that Lee's algorithm has known limitations.
…etrics The 2x2 cross-section was too thin for skimage.skeletonize to produce branch points. Use 4x4 arms with distinct lengths and add assertions for branch count, longest shortest path, and radii on ID 5.
… test Assert ID 5 has exactly 3 branches and longest shortest path ~160 nm.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #53 +/- ##
==========================================
+ Coverage 81.17% 81.89% +0.72%
==========================================
Files 24 24
Lines 2969 3016 +47
==========================================
+ Hits 2410 2470 +60
+ Misses 559 546 -13 ☔ 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 a comprehensive update to the skeletonization process in
src/cellmap_analyze/process/skeletonize.py, adding the computation and export of quantitative skeleton metrics for each segmented object. The changes include new metric calculations (such as branch count, path length, and radii), integration with parallel processing, and CSV output, along with corresponding updates to the test suite and test data. These improvements provide richer analysis and facilitate downstream evaluation of skeleton structures.Skeleton Metrics Calculation and Export:
longest_shortest_path_nm,num_branches,radius_mean_nm,radius_std_nm) for each segmented object, using EDT for radii and NetworkX for graph-based path analysis. Metrics are returned for each object and exported to a CSV file alongside the original segmentation table. (src/cellmap_analyze/process/skeletonize.py, [1] [2] [3] [4] [5] [6] [7] [8]src/cellmap_analyze/process/skeletonize.py, [1] [2] [3] [4] [5]src/cellmap_analyze/process/skeletonize.py, src/cellmap_analyze/process/skeletonize.pyR371-R412)Test Suite Enhancements:
test_skeletonize_without_erosionto verify the new skeleton metrics CSV, including checks for branch count, path length, and radius values for a cross-shaped object. (tests/operations/test_skeletonize.py, tests/operations/test_skeletonize.pyR292-R316)tests/conftest.py, tests/conftest.pyL649-R656)Minor Improvements and Cleanups:
tests/operations/test_morphological_operations.py, [1] [2]These changes significantly enhance the skeletonization pipeline, providing quantitative metrics for each object and improving test coverage and robustness.