Skip to content

Pass Scale to RegionPropsNodes - #5

Closed
leonfroehlich wants to merge 1 commit into
royerlab:mainfrom
leonfroehlich:patch-1
Closed

leonfroehlich wants to merge 1 commit into
royerlab:mainfrom
leonfroehlich:patch-1

Conversation

@leonfroehlich

Copy link
Copy Markdown

Hi Jordao,
as Max mentioned in the email, we had an issue with hoct handling the scale parameter of our anisotropic data correctly. This change seems to fix the issue for us.
Best,
Leon & Max

Copilot AI lite review requested due to automatic review settings September 3, 2026 16:41

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The behavioral fix isn’t covered by a regression test, so it’s easy to accidentally break in the future without detection.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR addresses incorrect handling of the scale parameter for anisotropic datasets during graph construction by ensuring regionprops-derived node features are computed in the correct physical units.

Changes:

  • Pass spatial spacing (scale[1:] → z/y/x) into td.nodes.RegionPropsNodes so regionprops-derived features respect anisotropic voxel size.
File summaries
File Description
src/hoct/features/graph.py Provides spacing to RegionPropsNodes so regionprops-based node features reflect anisotropic scale.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines 175 to 178
td.nodes.RegionPropsNodes(
extra_properties=extra_properties,
spacing=scale[1:],
).add_nodes(graph, labels=labels, intensity_image=images)
@leonfroehlich
leonfroehlich deleted the patch-1 branch September 10, 2026 07:28
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.

2 participants