Edge-detection follow-ups: Canny anisotropy honesty, ROI/orientation, docs#14
Merged
Conversation
…tion, docs) - Medium: Canny is honest about anisotropy. canny_edges accepts pixel_size_x_nm/pixel_size_y_nm, records per-axis sigma_x_nm/sigma_y_nm, and the docstring states smoothing is pixel-space (scalar sigma), not physically isotropic. The dialog sigma label shows both axes when pixels are anisotropic. - Low: active-mask channel mismatch is surfaced, not silent. The viewer warns (non-blocking) when the active mask's recorded source_channel differs from the channel currently displayed. - Low: README no longer overstates plane-fit exclusion — it now says statistics are restricted directly and a plane fit is excluded after converting the mask to ROI(s). The integration test is renamed test_mask_to_roi_excludes_region_ from_plane_fit to reflect the bridge. - Low: gradient_filter now ROI-bounds the returned gradient_orientation field (previously only display/magnitude/edge_mask were masked). Adds regression tests for per-axis sigma_nm provenance and ROI-bounded orientation. Full suite green, ruff clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Follow-up to #12 / #13 addressing a further review pass.
Changes
canny_edgesacceptspixel_size_x_nm/pixel_size_y_nm, records per-axissigma_x_nm/sigma_y_nm, and the docstring states the smoothing is pixel-space (scalar sigma), not physically isotropic. The dialog sigma label shows both axes on anisotropic scans.source_channeldiffers from the channel currently displayed, instead of applying a same-shape stale mask silently.test_mask_to_roi_excludes_region_from_plane_fit.gradient_filternow ROI-bounds the returnedgradient_orientationfield (previously only display/magnitude/edge_mask were masked).Verification
ruff checkclean.sigma_nmprovenance; ROI-bounded orientation.🤖 Generated with Claude Code