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

Ability to standardize aicsimageio output to 6D #344

Closed
MosGeo opened this issue Nov 3, 2021 · 2 comments
Closed

Ability to standardize aicsimageio output to 6D #344

MosGeo opened this issue Nov 3, 2021 · 2 comments
Labels

Comments

@MosGeo
Copy link

MosGeo commented Nov 3, 2021

Use Case

A standard predictable output from aicsimageio is needed for designing functions (and napari plugins) that will easily work on multiple types of image formats.

aicsimageio is great as great reader that produces a standard 5D array for all types of images. Currently, CZI reader produces 6D array for RGB images (edit, I am noting the RGB tiff files produces 6D too). This is great but it is not consistent with the 5D standard for all other types of images.

Solution

Add the ability (optional) to standardize the output of aicsimageio to 6D. One proposed implementation (napari-aicsimageio issue) is to have fill_all_optional_default_dims boolean to force aicsimageio to produce the 6D array.

Alternatives

In each processing workflow, the functions needs to check if the image is 5D or 6D.

EDIT:
Reading more about the issue, i noticed that aicsimageio are following the zarr standard (t,c,x,y,z) which is great. Now, it is the CZI that is not following that as they distinguish between RGB color channels and 'other' channels. I don't know what is the best solution. Is there a way to figure out if the channels represent RGB in the (t,c,x,y,z) format? just thinking out loud.

@toloudis
Copy link
Collaborator

toloudis commented Nov 5, 2021

Arguably aicsimageio is biased toward scalar intensity storage rather than RGB. The Zeiss CZI file format is an important one to cover and we didn't want to start mixing rgb channels with "other" image channels (e.g. different laser wavelength captures) because it would confuse a lot of things. We opted to go to TCZYXS where S is samples and dims["S"] = 3 for rgb.

The expected way for users of aicsimageio to know if they got a RGB image or not, is to either (a) know this before loading the image somehow, or (b) actually check the number of dimensions or check for the presence of a "S" dim.

One thing we considered is having some kind of mode or flag in AICSImage such that it always will add the S dimension.
So if you create myimg = AICSImage(..., has_samples=True) then all standard data accesses would be expected to be 6D instead of 5D.

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the Stale label Mar 29, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants