-
Notifications
You must be signed in to change notification settings - Fork 10
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
Empty dims when importing TIFF, LIF (vs say CZI) #24
Comments
Ahhhhh this is because we use the Basically, a while back we made a decision to have This is basically to protect against formats that have a ton of dimensions that can be useful for visualization. We didn't want to clip those when we convert to standard. So it's not that the LIF or TIFF is missing those dims, those dims just aren't specified in the file / metadata. I think there is value in always having the standard dims. I.e. if a standard dimension isn't in the reader file just add it as a singleton. Thoughts? |
Maybe I wasn't clear: it's not that LIF and TIFF are missing dims, it's that empty dims are passed to napari. Napari doesn't care, but some plugins do—arguably they should be able to figure out that [0 0 Y X] is a 2D image and not 4D, but... CZI import on the other hand (properly) eliminates empty dims and returns just dims that have data. I worked around this with my open file importing using AICSImageIO, but it's a kludge? (BTW, I'm trying to enable colleagues to move a Fiji workflow to napari. Not code savvy, so it which relies on drag-n-drop to import and using napari plugins for segmentation and analysis.) |
Oh interesting.... Huh I will look into this. |
didnt have time to get to this... I also just don't know how to test it? How can I access the data once it is in the viewer? |
If you use the file i mention above in
If you use
|
Ahhhh thanks! Will try to get to this next week! |
Maybe I find some time to take a look—I'm getting braver 🤕 |
Description
When importing LIF, for example
test/resources/s_1_t_1_c_2_z_1.lif
the two image layers (1 per C) are returned as [0 0 Y X] with T and Z being 0.
This means that tools like
napari-stardist
pre-trained 2D model doesn't work, because it requires just YX.The same happens with
s_1_t_1_c_1_z_1.ome.tiff
By comparison, importing example
test/resources/s_1_t_1_c_1_z_1.czi
returns an image layer with [Y X] and no extra dims.Expected Behavior
All file types should have the same behavior, that of CZI.
Reproduction
Drag-and-drop any combination of LIF, TIFF, and CZI files from test/resources that don't have all channels used, so for example T=1 or Z=1.
Environment
The text was updated successfully, but these errors were encountered: