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

Unsure if extra scene in file or sub-block attachment #83

Open
evamaxfield opened this issue May 27, 2021 · 5 comments
Open

Unsure if extra scene in file or sub-block attachment #83

evamaxfield opened this issue May 27, 2021 · 5 comments
Labels
question Further information is requested

Comments

@evamaxfield
Copy link
Collaborator

System and Software

  • aicspylibczi Version: 3.0.1
  • Python Version: 3.9
  • Operating System: Ubuntu 20.04

Description

A clear description of the bug

Using the test file aicsimageio/tests/resources/variable_scene_shape_first_scene_pyramid.czi -- We can tell this by how it is read in:

from aicspylibczi import CziFile
r = CziFile("aicsimageio/tests/resources/variable_scene_shape_first_scene_pyramid.czi")
r.get_dims_shape()  # returns: [{'X': (0, 2752), 'Y': (0, 2208), 'C': (0, 3), 'M': (0, 9), 'S': (0, 1)}]

The dims shape above shows that aicspylibczi is reading only a single scene, the first of which is mosaic. AND note that this file is also a pyramid and we are reading the highest resolution of the pyramid.

But if we use bfconvert to convert this file to OME-TIFF we can see there are actually two scenes in the file.
bfconvert -noflat -stitch aicsimageio/tests/resources/variable_scene_shape_first_scene_pyramid.czi test-convert.ome.tiff

-noflat and -stitch to ensure that this stays a single file and that the scenes stay together.

from aicsimageio.readers.ome_tiff_reader import OmeTiffReader
r = OmeTiffReader("test-convert.ome.tiff")
r.scenes  # returns ('Image:0', 'Image:1')

Expected Behavior

What did you expect to happen instead?

All scene information to be returned from the reader.

@heeler
Copy link
Member

heeler commented May 31, 2021

I'll have a look at this. I'm still trying to get my head around what might be going on here. Are there 2 images: 1 mosaic, 1 standard, or is it a mosaic with 2 scenes, or is it something else? If it's the first case I can see that going wrong mostly because I haven't ever seen a mixed mosaic/starndard image before so the logic in the library probably goes sideways in that case. Thanks for catching this.

@toloudis
Copy link
Collaborator

Perhaps bfconvert turns pyramid levels into scenes?

@evamaxfield
Copy link
Collaborator Author

We think this is related to the fact that FIJI / ImageJ / BioFormats / something expands all available "image-like" objects into images in FIJI. See related: fiji/fiji#280

@evamaxfield evamaxfield added question Further information is requested and removed bug Something isn't working labels Jun 21, 2021
@evamaxfield evamaxfield changed the title Not able to retrieve all scenes from multi-scene file Unsure if extra scene in file or sub-block attachment Jun 21, 2021
@zeissmicroscopy
Copy link

Just guessing, but could it be that this image a has a preview image attached, which is read by BioFormats as an additional series? (sebi06)

@evamaxfield
Copy link
Collaborator Author

Yea thats what we thought as well!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants