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

Test file conversions with notebook #1

Open
mariehbourget opened this issue Jul 19, 2021 · 1 comment
Open

Test file conversions with notebook #1

mariehbourget opened this issue Jul 19, 2021 · 1 comment

Comments

@mariehbourget
Copy link
Member

mariehbourget commented Jul 19, 2021

I tested the notebook on Ubuntu 20.04 in WSL 1:

I have a few questions/observations about the tests.

1) Read OME-TIFF image + metadata:

  • I got this message when running the cell: OME series: failed to read 'tubhiswt_C1.ome.tif', which is normal because the file C1 is not in the repo.
  • However, in the displayed metadata, there is some metadata for C1, ex: {'UUID': {'FileName': 'tubhiswt_C1.ome.tif', 'value': 'urn:uuid:f801ea0a-e93e-4f4f-99b3-7ecc15048c12'}, 'FirstC': 1, 'FirstT': 2, 'FirstZ': 0, 'IFD': 2, 'PlaneCount': 1}
  • And the display of "timepoints" gives me the following image, with the second row being empty:
    tubhiswt_timepoints
  • It looks like the 2 files are "linked" somehow through metadata in OMETIFF? (I suspect Etienne had the two files on his drive, but only 1 is in the repo). If that is the case, this is an OMETIFF feature that I was not aware of...

Write OME-TIFF image + metadata:

  • If I understand correctly, I think the file should have 10 "timepoints" and 3 "channels". However, when I read the OMETIFF file written by tifffile in Fiji/Bioformats, I get an image and metadata with 30 "timepoints" (SizeT = 30) and 1 "channel" (SizeC = 1).
  • Also, we should document what compress=7 means in the call of tifffile.imwrite.

3.1) TIFF to OME-TIFF:

  • Why do we need to add an alpha channel? This should be documented.
  • When I read the OMETIFF file written by pyvids in Fiji/Bioformats, I got the right dimension in metadata but the image is a repetition of a tiles?
    tof_to_ometiff
  • There is also a warning in the console, I don't know if it's related:
[WARN] SamplesPerPixel mismatch: OME=-1, TIFF=1
[WARN] Image ID 'Image:0': missing plane #0
[WARN] Using TiffReader to determine the number of planes.

3.2.2) Generate the OMETIFF with the NDPI data:

  • For some unknown reason, when I open the generated OMETIFF file in Fiji/Bioformats, the image on the 3 channels appears totally black, although the validation at point 3.2.3 shows the correct image. I updated the Bioformats version to the latest i.e. 6.6.1.
@etiennebergeron
Copy link
Member

Hello Marie-Hélène,

About the first part 1) Read OME-TIFF image + metadata, I added the file tubhiswt_C1.ome.tif to the repo; it was indeed in my test folder, so the message should not appear again. I have to say that I was not aware either that those two OMETIFF files were linked...

For the 2) Write OME-TIFF image + metadata part; yes, there should be 10 "timepoints" and 3 "channels". I added in the notebook a cell to read and print the metadata of the random OMETIFF generated. The 'SizeT' and 'SizeC' are respectively '10' and '3' and the XML seems ok as well when I look at the file properties in the Windows Explorer. It looks like Fiji has some problems with OMETIFF from tifffile. I'll search on that and keep you updated.
I also added a comment cell to document the possible values of the parameter compress.

About the alpha channel in 3.1), I think we can just comment the two lines if we don't need them. I tried without them and it seems to work just fine. I added those when I saw it in an issue while testing.
For the repetition of a tile in Fiji, I have no clue. As in 2), it might just be a compatibility problem with the tifffile OMETIFF, same for 3.2.2).

Hope it helps,

Etienne

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

2 participants