ome / ome-ngff-validator

Web page for validating OME-NGFF files
https://ome.github.io/ome-ngff-validator
BSD 2-Clause "Simplified" License
4 stars 3 forks source link

Load zarr chunks #21

Closed will-moore closed 1 year ago

will-moore commented 1 year ago

This addresses the "Load chunks with zarr.js and display" from https://github.com/ome/ome-ngff-validator/issues/6 and the feature request "how can I load a specific location in the hierarchy to check it? i.e. 1/0/0/6/10/4 and /0/0/0/8/23/2?" from https://forum.image.sc/t/error-in-import-of-ome-zarr-in-omero/74252/4

We load chunks according to the indices chosen by the user.

To test:

Screenshot 2022-11-30 at 23 04 32

https://minio-dev.openmicroscopy.org/idr/v0.4/idr0077/9836832_z_dtype_fix.zarr

netlify[bot] commented 1 year ago

Deploy Preview for ome-ngff-validator ready!

Name Link
Latest commit 0fc5bada69370b839a27d69de103b0068dd6744e
Latest deploy log https://app.netlify.com/sites/ome-ngff-validator/deploys/6387e1d73cff2600087462c4
Deploy Preview https://deploy-preview-21--ome-ngff-validator.netlify.app/
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

imagesc-bot commented 1 year ago

This pull request has been mentioned on Image.sc Forum. There might be relevant details there:

https://forum.image.sc/t/error-in-import-of-ome-zarr-in-omero/74252/6

ac744 commented 1 year ago

Hi anatole here, thanks again will for that.

I do not see anything on my zarr (which otherwise validate fine), ie. the image is blank whatever the coordinate I put. Actually the validator seem to crash once I check 'load chunk'...

Chunks are reported to be 7Mb, not sure if that's an issue? also data is XYZC but I do see the sliders to make them 2D.

I tried on other IDR data online and it worked as expected

will-moore commented 1 year ago

@ac744 I wonder if you could check the dev-tools Console or Network and reproduce the crash to see if you see anything useful? A screenshot would be great, thanks. I might add the ability to see the min/max values for each chunk and maybe even a histogram to check if "black" is really black.

ac744 commented 1 year ago

@will-moore yes I got that error:

index.63c4df9c.js:39 Uncaught (in promise) DOMException: Failed to construct 'ImageData': The input data length is not a multiple of (4 * width).
    at https://deploy-preview-21--ome-ngff-validator.netlify.app/assets/index.63c4df9c.js:39:2025
    at xt (https://deploy-preview-21--ome-ngff-validator.netlify.app/assets/index.63c4df9c.js:1:1342)
    at Array.map (<anonymous>)
    at https://deploy-preview-21--ome-ngff-validator.netlify.app/assets/index.63c4df9c.js:4:4319
    at nE (https://deploy-preview-21--ome-ngff-validator.netlify.app/assets/index.63c4df9c.js:4:1587)
will-moore commented 1 year ago

Thanks @ac744 I hopefully fixed that error, and I also now display the Min / Max pixel values for the chunks so you can see if it really is "black" or not.

joshmoore commented 1 year ago

Happy to get this in. Moving forward I imagine we may want to streamline and unify the terminology a bit.

For example perhaps "Load Metadata" to go with "Load Chunks".

Also, the chunks section now shows up between bits that are all "Shape" related.

Maybe something like:

> Size information (pre-loaded)
> Load Metadata
> Load Chunks (at the bottom since it's the biggest)

Random side note: clicking on .zarray might should just copy the URL rather than downloading it. (Or is even that useful?)