Skip to content

Conversation

@Kirill888
Copy link
Member

Don't consider pasting from source to destination
when computing reproject roi if axis is flipped.

Closes #244

Don't consider pasting from source to destination
when computing reproject roi if axis is flipped.
@codecov
Copy link

codecov bot commented Aug 12, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.21%. Comparing base (60df011) to head (4a14cab).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop     #246   +/-   ##
========================================
  Coverage    94.21%   94.21%           
========================================
  Files           34       34           
  Lines         5855     5857    +2     
========================================
+ Hits          5516     5518    +2     
  Misses         339      339           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Kirill888 Kirill888 requested a review from pjonsson August 12, 2025 11:57
@github-actions
Copy link

@github-actions github-actions bot temporarily deployed to pull request August 12, 2025 11:58 Inactive
Copy link
Contributor

@pjonsson pjonsson left a comment

Choose a reason for hiding this comment

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

I don't know the surrounding code, but taking the slow path is better than being wrong.

@Kirill888 Kirill888 merged commit 8316a60 into develop Aug 12, 2025
20 checks passed
@Kirill888 Kirill888 deleted the kk/fix-244 branch August 12, 2025 12:20
return False, "flipped axis"

# Expect identity for scale change
if any(abs(abs(s) - 1) > stol for s in (sx, sy)): # not equal scaling across axis?

Choose a reason for hiding this comment

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

One question on this line - not particularly important as this fixes my original issue but.

Is there a need for the two calls to abs?

I found that changing this line to if any(abs(s - 1) > stol for s in (sx, sy)): made more sense in my head and also meant that can_paste is set to false if any axes are flipped.

Copy link
Member Author

Choose a reason for hiding this comment

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

yes, especially since "reason" messages aren't used, most likely, probably an early debugging tool

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.

compute_reproject_roi broken for "flippped" axis case

4 participants