Skip to content

Why does bioio-imageio read tiff files? #29

@TimMonko

Description

@TimMonko

From my understanding of the documentation, supported extensions for a plugin are defined by the plugin itself, such as:

def get_supported_extensions() -> List[str]:
"""
Return a list of file extensions this plugin supports reading.
"""
# See ever growing list from imageio
# https://imageio.readthedocs.io/en/stable/formats/index.html
return [

However, in an environment with bioio_imageio and tifffile, a file such as RGB_metadata.tiff will be read by bioio_imageio. This leads to different behavior (not that I mind) compared to bioio_tifffile so it took me a bit to debug and understand that bioio was reader with bioio_imageio isntead. (img.reader.__module__ was a solution I figured out)

note, bioio-tifffile doesn't even need to be in the environment as bioio-ome-tiff brings in tifffile

{'bioio-ome-tiff': PluginSupport(supported=False, error="bioio-ome-tiff does not support the image: 'C:/Users/timmo/ndev-kit/ndevio/tests/resources/RGB_bad_metadata.tiff'. Failed to parse XML for the provided file. Error: no element found: line 1, column 0"),
 '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="bioio-czi  does not support the image: 'C:/Users/timmo/ndev-kit/ndevio/tests/resources/RGB_bad_metadata.tiff'. bioio-czi[pylibczirw mode] does not support the image: 'C:/Users/timmo/ndev-kit/ndevio/tests/resources/RGB_bad_metadata.tiff'. Illegal data detected at offset 0 -> Invalid FileHdr-magic, bioio-czi[aicspylibczi mode] does not support the image: 'C:/Users/timmo/ndev-kit/ndevio/tests/resources/RGB_bad_metadata.tiff'. Illegal data detected at offset 0 -> Invalid FileHdr-magic"),
 'ArrayLike': PluginSupport(supported=False, error="ArrayLikeReader does not support the image: 'Unsupported image type: <class 'fsspec.implementations.local.LocalFileSystem'>. ArrayLikeReader supported types are numpy ndarray, dask Array,or xarray DataArray.'.")}

Metadata

Metadata

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions