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

Pyramids with small top levels #620

Open
s-n-i opened this issue Jul 29, 2022 · 3 comments · May be fixed by #633
Open

Pyramids with small top levels #620

s-n-i opened this issue Jul 29, 2022 · 3 comments · May be fixed by #633

Comments

@s-n-i
Copy link
Contributor

s-n-i commented Jul 29, 2022

User story
I would like to be able to load a Zarr pyramid into Aviator, which has top levels in it that are smaller than the tile size on the lower levels. Doing so results in the image having a black box around it. The highest level of the pyramid is 1x1 pixel. I changed the canvas background-color in Avivator to white to make this clearly visible.

image

This black box is also present when I load a dataset without these top levels, but the black box is smaller in this case.

Preferred solution
Modify viv, such that it does not draw the black box.

Possible alternatives
An alternative solution would be to remove these top levels from the data. However, we would like to have them for a performance boost, when loading multiple pyramids at once.

@ilan-gold
Copy link
Collaborator

ilan-gold commented Jul 30, 2022

Would it be possible to provide some data we could test on? I think most images have top levels smaller than the tile size, so I'm a bit confused - for example, this demo has top level 240x240 which is smaller than the tile size but renders fine. I think I'm not following what you are saying - the image you have looks like it has black pixels written into the image. You could actually fix this if you were using the layers directly by setting the transparentColor prop (although any other true black pixels in the real image would be transparent too).

@s-n-i
Copy link
Contributor Author

s-n-i commented Aug 16, 2022

It took a bit of time for us to put together a live example because multiple people needed to be involved:

https://avivator.gehlenborglab.org/?image_url=https://viv-files.ci.aws.labshare.org/LuCa-7color_Scan_c(0-5)/

@ilan-gold
Copy link
Collaborator

Ok, I understand the issue now, sorry about the confusion. Zarr pads by default out to the chunk size i.e the tile size. @manzt I think we could implement something in the MultiscaleImageLayer to clip these low res tiles, no? Leave the loaders alone? We went through this a while ago so maybe I'm forgetting something.

@ilan-gold ilan-gold linked a pull request Aug 25, 2022 that will close this issue
2 tasks
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 a pull request may close this issue.

2 participants