Skip to content

Restore full scikit-image regionprops output for cell statistics (2D and 3D)#157

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/restore-cell-statistics-features
Draft

Restore full scikit-image regionprops output for cell statistics (2D and 3D)#157
Copilot wants to merge 2 commits intomainfrom
copilot/restore-cell-statistics-features

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 10, 2026

The 3D branch of _calculate_cell_statistics only computed area and label, yielding ≤ 4 columns in the exported CSV. The 2D branch was also missing intensity_std.

Changes

src/epitools/analysis/cell_statistics.py

  • 3D branch: Expanded from ["area", "label"] to the full set of regionprops_table properties valid for 3D images — shape descriptors (axis_major/minor_length, feret_diameter_max, solidity, extent, …), all centroid variants, inertia tensor, moments, intensity stats including intensity_std. 2D-only properties (eccentricity, orientation, perimeter, perimeter_crofton) are explicitly excluded.
  • 2D branch: Added intensity_std; removed stale TODO and dead commented-out entries.
  • Updated docstring to describe the actual output for each dimensionality.

tests/test_cell_statistics.py

  • test_calculate_cell_statistics_2d_properties: asserts key 2D properties and neighbour columns are present.
  • test_calculate_cell_statistics_3d_properties: asserts full 3D property set is present and 2D-only properties (eccentricity, perimeter, orientation) are absent.
Original prompt

This section details on the original issue you should resolve

<issue_title>Restore cell statistics with all the features</issue_title>
<issue_description>Is your feature request related to a problem? Please describe.
Output table of cell statistics it has now only a few columns (< 5).

Describe the solution you'd like
Restore cell statistics with all the features coming from scikit region props. It'd be nice to consider time and space as extra dimensions
</issue_description>

<agent_instructions>A csv table exported with all the features that scikit allows with regionprops.</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Restore cell statistics with all scikit features Restore full scikit-image regionprops output for cell statistics (2D and 3D) Mar 10, 2026
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.

Restore cell statistics with all the features

2 participants