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

Rendering Large X/Y/(RGB) In N5 Viewer #37

Open
jmdelahanty opened this issue Dec 19, 2023 · 3 comments
Open

Rendering Large X/Y/(RGB) In N5 Viewer #37

jmdelahanty opened this issue Dec 19, 2023 · 3 comments

Comments

@jmdelahanty
Copy link

Hello N5 Devs! I was curious if there was any help I could find for rendering an image that is X/Y/(RGB) in the N5 viewer. I have an HDF5 dataset that's about 10GB. Its shape when inspected using:

import h5py

with h5py.File('test.hdf5', 'r') as f:

    dataset = f['test'] 

    print(dataset.shape)

Gives me: (21534, 88200, 3)

When I open it in N5 (it opens just fine), I don't actually see my image for some reason! It is displayed as in the viewer as this:

test (3 x 88200 x 21534)

And all I get is a big blank box:

image

I've been having some trouble getting it to view my big 2D image properly, any tips on how I can get it working? Thank you!

@jmdelahanty
Copy link
Author

This actually appears to function correctly, it can just be really tough to find your image after it's been loaded. Rotating around a little in the viewer finds a sliver of my image in the space it makes that I can then zoom into and, eventually, visualize well! Interesting... but since I'm looking at a 2D image I would think I should be able to stay around my the image easier. Am I missing something?

Also your lab is super cool and I love these tools.

@bogovicj
Copy link
Contributor

Thanks @jmdelahanty for reporting this weird behavior and nice words ❤️ .

My guess is that n5-viewer made some incorrect assumptions about the data (possibly that it's 3D, not 2D+color).
I'll try to replicate with an h5 and I expect it will be easy to do so with the information you've given.

Long term, I'd like to provide users with an easy way to assign meaning to the the dimensions of their data. There is currently a semi-programmatic way to do this which I can explain in a follow up message after I replicate.

Medium term - would you be open to writing a little extra metadata in your h5's that will tell n5-viewer how to interpret the data dimensions? If so, I can give you an example.

@jmdelahanty
Copy link
Author

I love metadata! More than happy to include some in the file. Thank you for your quick response and help! I'm really grateful!

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

No branches or pull requests

2 participants