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

Problem with reading 2D dataset - Scale vector of length 3 to 2d data #54

Closed
sebi06 opened this issue Jun 30, 2022 · 5 comments
Closed

Comments

@sebi06
Copy link

sebi06 commented Jun 30, 2022

The bug is decribed here:

https://forum.image.sc/t/napari-napari-aicsimageio-faild-to-open-ome-tiff/68942?u=sebi06

@evamaxfield
Copy link
Collaborator

Will look at this maybe next week.

@toloudis
Copy link

I believe this is an issue for the napari plugin and not aicsimageio - is that correct?

@evamaxfield
Copy link
Collaborator

I believe it to be an issue with the plugin not aicsimageio-core

@evamaxfield evamaxfield transferred this issue from AllenCellModeling/aicsimageio Aug 2, 2022
@psobolewskiPhD
Copy link
Collaborator

psobolewskiPhD commented Aug 21, 2022

This issue relates to the fact that the original data looks like this:

In [4]: img = aicsimageio.AICSImage(path)
In [5]: img.shape
Out[5]: (1, 1, 1, 2755, 3675)

the plugin squeezes the singletons and returns a 2D array.
But the metadata used for the scale info is:

In [9]: img.physical_pixel_sizes
Out[9]: PhysicalPixelSizes(Z=1.0, Y=0.227, X=0.227)

Edit: in contrast, the test files report Z=None in these types of cases, so then it's handled here:

scale_val = getattr(img.physical_pixel_sizes, dim)
if scale_val is not None:
scale.append(scale_val)

I think I have an idea how to fix, will try a PR.

@psobolewskiPhD
Copy link
Collaborator

Should be fixed with #60 which has been released.
Feel free to re-open if this pops up again.

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

4 participants