Pass Scale to RegionPropsNodes - #5
Closed
leonfroehlich wants to merge 1 commit into
Closed
leonfroehlich wants to merge 1 commit into
leonfroehlich wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
🟡 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) intotd.nodes.RegionPropsNodesso 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) |
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.
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