Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce PixelRegion.overlaps #438

Open
adonath opened this issue Mar 2, 2022 · 0 comments
Open

Introduce PixelRegion.overlaps #438

adonath opened this issue Mar 2, 2022 · 0 comments

Comments

@adonath
Copy link
Member

adonath commented Mar 2, 2022

For some use cases e.g. when placing regions algorithmically a method like PixelRegion.overlaps(other_region) would be useful. This will be easily to implement once e.g. CompoundRegion.area is supported (see #433). In this case the implementation would reduce to:

def overlaps(self, other):
    intersection = self.intersection(other)
    return intersection.area > 0

For some specific cases it could also be implemented analytically if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants