Merged
Conversation
A 1x1 erosion footprint is the identity transformation, so `contour = seg - erosion(seg, footprint_rectangle((1,1)))` is zero everywhere and the outline silently disappears. Raise ValueError with guidance to use contour_px >= 2 instead of failing silently.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #645 +/- ##
==========================================
- Coverage 76.39% 76.31% -0.08%
==========================================
Files 11 11
Lines 3237 3239 +2
Branches 761 762 +1
==========================================
- Hits 2473 2472 -1
- Misses 466 467 +1
- Partials 298 300 +2
🚀 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.
Summary
render_labels(..., contour_px=1)silently produced a blank outline becausefootprint_rectangle((1, 1))is the identity for erosion, soseg - erosion(seg)was zero everywhere.ValueErrorwith guidance to usecontour_px >= 2, consistent with the existing positive-number check and the silent-failure fix in render_labels(fill_alpha=0, outline_alpha=0) silently renders invisible labels instead of erroring #630.contour_pxdocstring to document the requirement.Closes #631.