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

5D or List< 4D > #20

Closed
tischi opened this issue Nov 29, 2020 · 7 comments
Closed

5D or List< 4D > #20

tischi opened this issue Nov 29, 2020 · 7 comments

Comments

@tischi
Copy link

tischi commented Nov 29, 2020

@joshmoore

Citing @will-moore about opening ome.zarr in Napari

...since each image channel is split into a separate 4D layer, and then the labels are another 4D layer ...

I am doing the same for opening it in BDV as there the data model is List< 4D >.

This makes me wonder about the considerations that made you go for 5D rather than a list of 4D arrays (x,y,z,t)?!

I am not saying that I think List< 4D > is better, to me 5D feels quite natural and effective, I am just wondering!

@will-moore
Copy link
Member

will-moore commented Nov 29, 2020

What we give napari is <5D array> & {channel_index: 2}, so napari does the slicing of the 5D array into channels (layers).

@tischi
Copy link
Author

tischi commented Nov 29, 2020

Just thinking out loud:

I have use cases where different channels should be displayed using a different transform in order to compensate for chromatic aberrations during the acquisition. For this I feel List< 4D > may be more natural, because every channel would have its own metadata such as the transform. However this could also be covered by channel specific metadata. One may also decide to just store different channels into different ome.zarr containers if they are "too different" from each other.

An advantage of 5D could be that one could downsample along the channel dimension in the resolution pyramids. I cannot think of a use case right now, but who knows, maybe for mass-spec imaging or other modalities with lots of channels this maybe be something useful at some point.

@jni
Copy link

jni commented Feb 24, 2021

Small note: in napari, I think passing in [4D arrays] and {channel_axis=0} probably works.

Having said that, I very much have a philosophical preference for a 5D array. I do think channel-specific metadata solves the chromatic aberration etc problems. For many image processing operations, it's easier to just have a 5D array than a list of arrays, at least in Python. e.g. background_intensity_over_time = np.percentile(im5d, 0.05, axis=(2, 3, 4)).

@tischi
Copy link
Author

tischi commented Feb 24, 2021

After the discussion yesterday in the NGFF meeting I wonder whether this issue could be closed and a new one should be opened in order to discuss the number of dimensions and axis labels in a broader sense?

Personally, I am happy to stick with 5D (XYZ, channel, time) for the time being.

@joshmoore
Copy link
Member

a new one should be opened in order to discuss the number of dimensions and axis labels in a broader sense?

This makes sense from my POV, @tischi, but it may be good to leave this open until the other one exists ;)

@constantinpape
Copy link
Contributor

I would second opening another more general discussion about dimension ordering and number of dimensions; this is also relevant for the transformation spec #28.

@constantinpape
Copy link
Contributor

Ok, I went ahead and opened a new issue for the more general discussion, see #35.

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

5 participants