bioio-devs / bioio

Image reading, metadata management, and image writing for Microscopy images in Python
https://bioio-devs.github.io/bioio/OVERVIEW.html
BSD 3-Clause "New" or "Revised" License
32 stars 3 forks source link

bioio-tifffile takes precedence over bioio-ome-tiff for ome-tiffs #54

Closed evamaxfield closed 1 month ago

evamaxfield commented 1 month ago

Describe the Bug

bioio-tifffile takes precedence over bioio-ome-tiff even for ome.tiff files.

Expected Behavior

OME-TIFFs should be correctly picked up by bioio-ome-tiff

Reproduction

I am in napari_bioio but its the same test data:

from bioio import BioImage

img = BioImage("napari_bioio/tests/resources/variance-cfe.ome.tiff")
img

img returns as <BioImage [plugin: bioio-tifffile installed at 2024-07-18 16:09:20.787038, Image-is-in-Memory: False]>

Environment

❯ pip freeze | grep bioio

bioio==1.0.3
bioio-base==1.0.4
bioio-imageio==1.0.0
bioio-ome-tiff==1.0.0
bioio-ome-zarr==1.0.1
bioio-tiff-glob==1.0.0
bioio-tifffile==1.0.0

Already determined that the issue is that plugin list isn't sorted into longest matching suffix first (i.e. longer suffixes are more specific and we should try them first in the case of plugins handling multiple filetypes)

toloudis commented 1 month ago

Is this possibly related to #38 ?

evamaxfield commented 1 month ago

Finally answering your question @toloudis:

Yes I believe this is the same bug as #38! Hopefully anyway.