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

channel-z ordering problem when reading lif #508

Closed
TomPJWyatt opened this issue May 26, 2023 · 7 comments
Closed

channel-z ordering problem when reading lif #508

TomPJWyatt opened this issue May 26, 2023 · 7 comments
Labels
third party dependency Requires a feature or bugfix from a third party dependency outside the scope of this package

Comments

@TomPJWyatt
Copy link

System and Software

  • aicsimageio Version: 4.11.0
  • Python Version: 3.9.16
  • Operating System: OS X Ventura 13.3.1

I have a lif with e.g. 5 channels and 27 z-slices, it opens fine as a hyperstack in fiji but when I open with aicsimageio the channels and z are all mixed up.

@SeanLeRoy
Copy link
Collaborator

Hi @TomPJWyatt, do you have an example file we could test with? I'd also be interested in knowing how you are initializing the image, like if perhaps supplying the LifReader directly may change anything (like so)

from aicsimageio import AICSImage
from aicsimageio.readers import LifReader

img = AICSImage(filepath, reader=LifReader)
img.dims
img.shape

img = AICSImage(filepath)
img.dims
img.shape

@TomPJWyatt
Copy link
Author

Hi Sean, I have an example file but github won't allow uploading of lif files, any ideas?

I just tried your suggestiong with supplying the LifReader directly and the channels/z are still mixed up I'm afraid.

@toloudis
Copy link
Collaborator

@TomPJWyatt Maybe you can use dropbox, or other cloud file storage that allows link sharing. We can just download the file and then you could remove it once we confirm we got it.

@TomPJWyatt
Copy link
Author

Hello, here's a link to a lif that opens fine in fiji but with aicsimagebio the chanel/z-slices get mixed up:
https://we.tl/t-zlX9sCoO9j

It should have 5 channels and 27 z-slices and should be clear that they are mixed up e.g. from the fact that the first channel is the only nuclei stain but you'll see slices from this channel showing up in other channels

@SeanLeRoy SeanLeRoy self-assigned this Jun 6, 2023
@SeanLeRoy
Copy link
Collaborator

I am able to reproduce this with your file; other LIF files I have on hand seem to not have this issue. I'm able to get it to read correctly using a change to the way the xy dimensions are ordered together, but it doesn't seem to solve the issue consistently nor am I sure how to flag files like yours as needing to be arranged differently (compared to the other LIF files I have for example) such that if that fix worked we could apply it when needed.

That is all to say this might not be an issue with aicsimageio per se. Was this file saved using the LAS X Stage Navigator? This might be a known issue with readlif the underlying package responsible for reading LIF files in aicsimageio as described here. I'll keep poking around a bit longer to see if I can find something to assist this.

@TomPJWyatt
Copy link
Author

Hi @SeanLeRoy yes it was saved with LAS X Navigator. Thanks for the update!

@SeanLeRoy SeanLeRoy added the third party dependency Requires a feature or bugfix from a third party dependency outside the scope of this package label Jun 22, 2023
@SeanLeRoy SeanLeRoy removed their assignment Jun 22, 2023
@SeanLeRoy
Copy link
Collaborator

Moving this issue over to bioio-lif. aicsimageio is moving into "maintenance" mode where only easy to implement bugfixes deemed critical (or community contributed) work will be done in aicsimageio. Instead of aicsimageio, we are creating a package soon to be released called bioio and plugins like the one aforementioned. See the reason for this change here.

@SeanLeRoy SeanLeRoy closed this as not planned Won't fix, can't repro, duplicate, stale Nov 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
third party dependency Requires a feature or bugfix from a third party dependency outside the scope of this package
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants