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

If Layer BoundingBoxes intersect, Use Intersection Center for all Layer Thumbnails #6411

Merged
merged 3 commits into from
Aug 18, 2022

Conversation

fm3
Copy link
Member

@fm3 fm3 commented Aug 18, 2022

URL of deployed dev instance (used for testing):

Steps to test:

  • Set up a dataset with properties so that the layer bounding boxes are not equal
  • Request thumbnails for these layers, i.e. http://localhost:9000/api/datasets/sample_organization/dsA/layers/segmentation/thumbnail, http://localhost:9000/api/datasets/sample_organization/dsA/layers/color/thumbnail
  • The thumbnails should show the same region of the dataset

Issues:


  • Ready for review

@fm3 fm3 self-assigned this Aug 18, 2022
@fm3 fm3 requested a review from jstriebel August 18, 2022 08:57
@fm3 fm3 marked this pull request as ready for review August 18, 2022 09:00
Copy link
Contributor

@jstriebel jstriebel left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@philippotto
Copy link
Member

👍

What happens if the intersection is empty? Rather unlikely, but a reasonable default would be cool.

@fm3
Copy link
Member Author

fm3 commented Aug 18, 2022

I wanted to return None if there is no intersection, because otherwise the returned empty bbox carries an arbitrary topleft, which seemed weird. Also, the center of a zero-volume box may still be defined, depending on how you understand it. And my code needs to find out if there is no intersection, because then it passes None to the datastore as center, which will then again use each layer’s individual bounding box, to answer @philippotto’s question as well

@fm3 fm3 merged commit 85c97e0 into master Aug 18, 2022
@fm3 fm3 deleted the thumbnail-stable-center branch August 18, 2022 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Thumbnails for layers don’t seem to use the same position/zoom
3 participants