Skip to content

ome-tiff files are being read with wrong preference #79

@TimMonko

Description

@TimMonko

Describe the Bug

Given an image saved with bioio.OmeTiffWriter.save(), BioImage is still defaulting to bioio-tifffile.Reader instead of bioio-ome-tiff.Reader on bioio version 1.1.0.

Expected Behavior

After #55, bioio-ome-tiff is supposed to take precedence over bioio-tifffile when doing BioImage(file_path). From what I understand, the file does not need to end with .ome.tiff but could just end in .tiff and bioio-ome-tiff should take preference (this is for an image with a .tiff ending).

Reproduction

bioio.plugin_feasibility_report(file_path)

{'bioio-ome-tiff': PluginSupport(supported=True, error=None),
 'bioio-imageio': PluginSupport(supported=True, error=None),
 'bioio-tifffile': PluginSupport(supported=True, error=None),
 'bioio-ome-zarr': PluginSupport(supported=False, error=None),
 'bioio-czi': PluginSupport(supported=False, error=None),
 'bioio-lif': PluginSupport(supported=False, error=None),
 'bioio-nd2': PluginSupport(supported=False, error=None),
 'ArrayLike': PluginSupport(supported=False, error=None)}

Reader defaults to bioio-tifffile:

BioImage.determine_plugin(file_path)

PluginEntry(entrypoint=EntryPoint(name='bioio-tifffile', value='bioio_tifffile', group='bioio.readers'), metadata=<class 'bioio_tifffile.reader_metadata.ReaderMetadata'>, timestamp=1734118509.7816575)

But, bioio_ome_tiff shows that it was saved properly as an OME-TIFF via OmeTiffWriter

img = BioImage(image_files[0], reader=bioio_ome_tiff.Reader)
img.ome_metadata

OME(
images=[<1 field_type>],
creator='bioio 1.1.0',
)

bioio.plugins.dump_plugins()

bioio-czi
  Author  : Not Specified
  Version : 1.0.1
  License : MIT License
  Date    : 2024-12-13 13:35:12.960038
  Supported Extensions : .czi
bioio-imageio
  Author  : Not Specified
  Version : 1.0.0
  License : MIT License
  Date    : 2024-12-13 13:35:05.444297
  Supported Extensions : 264, 265, 3fr, 3g2, A64, IMT, MCIDAS, PCX, SPIDER, XVTHUMB, a64, adp, amr, amv, apng, arw, asf, avc, avi, avs, avs2, bay, bif, bmp, cdg, cgi, cif, ct, dcr, dib, dip, dng, dnxhd, dv, dvd, erf, exr, fff, gif, icb, if, iiq, ism, jif, jfif, jng, jp2, jpg, mov, mp4, mpo, msp, pdf, pngppm, ps, zif
bioio-ome-zarr
  Author  : Not Specified
  Version : 1.0.1
  License : MIT License
  Date    : 2024-12-13 13:35:06.050469
  Supported Extensions : .zarr
bioio-ome-tiff
  Author  : Not Specified
  Version : 1.0.1
  License : MIT License
  Date    : 2024-12-13 13:35:06.013810
  Supported Extensions : .ome.tiff, .tiff, ome.tif, .tif
bioio-tifffile
  Author  : Not Specified
  Version : 1.0.0
  License : MIT License
  Date    : 2024-12-13 13:35:09.781657
  Supported Extensions : tif, tiff
bioio-lif
  Author  : Not Specified
  Version : 1.0.0
  License : MIT License
  Date    : 2024-12-13 13:35:12.998235
  Supported Extensions : .lif
bioio-nd2
  Author  : Not Specified
  Version : 1.0.0
  License : MIT License
  Date    : 2024-12-13 13:35:05.899621
  Supported Extensions : .nd2

Environment

  • OS Version: Windows 11
  • bioio Version: 1.1.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions