-
Notifications
You must be signed in to change notification settings - Fork 26
Multi sources with transforms #259
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
base: main
Are you sure you want to change the base?
Multi sources with transforms #259
Conversation
Hey @will-moore, thanks for the PR! I added support for building up the Would you mind if I made a PR cherry picking these changes in a separate PR and maybe we focus this PR on multiple sources? The utility is from Vitessce and been used for some time. Also #242 has some changes to ensure that the the the initial zoom state is aware of the |
@manzt Great, thanks. Go ahead 👍 |
Ok, I merged #261 and rebased #242 on those changes. That really cleaned up the diff for that PR. Perhaps here we could revert the changes other than in for (const source of sources) {
await viewer.addImage({ source });
} In general, it would be nice to think a bit about the URL API we really want for the website. |
c793829
to
237bb4a
Compare
OK, I pushed just my first commit on top of Definitely thinking about url structure. If you wanted to add different config for each source then how would that look?
|
b62c124
to
06c34fc
Compare
@manzt I don't know if you've had time to think about URL API, but I just pushed a commit that at least allows you to specify different config values for each source image, without breaking the existing URL structure. E.g. if you have This relies on Do you have some docs on what are all the config values supported in the URL query params? |
This is an investigation into supporting overlays of multiple images in vizarr, with the support of coordinateTransformations to allow relative positioning and scaling.
Test at https://deploy-preview-259--vizarr.netlify.app/?source=https://uk1s3.embassy.ebi.ac.uk/idr/zarr/v0.4/idr0101A/13457537.zarr&source=https://uk1s3.embassy.ebi.ac.uk/idr/zarr/v0.4/idr0101A/13457227.zarr
Multiple
source
query parameters are supported for loading multiple images: `?source=url1&source=url2E.g. using the sample images from idr0101: https://ome.github.io/ome-ngff-validator/?source=https://uk1s3.embassy.ebi.ac.uk/idr/zarr/v0.4/idr0101A/13457537.zarr and https://ome.github.io/ome-ngff-validator/?source=https://uk1s3.embassy.ebi.ac.uk/idr/zarr/v0.4/idr0101A/13457227.zarr which have
scale
andtransform
metadata, we can see them overlaid as expected.If there is any matrix specified in the URL e.g.
&model_matrix=[0.5403023058681398,0.8414709848078965,0,0,-0.8414709848078965,0.5403023058681398,0,0,0,0,1,0,0,0,0,1]
, thecoordinateTransformations
are applied on top of this.A couple questions/issues:
addImage()
calls happend asynchronously, we can't reliably control which image appears "on top" of the other. Refreshing the page can lead to the images displayed in different orders.In the example you can see that the smaller image has fewer Z sections than the larger one, but it's not possible to "align" them in any way.