Open evamaxfield opened 1 year ago
I put a quick PR to address item 1. https://github.com/bioio-devs/bioio/pull/19
Item number 5 is addressed here : https://github.com/bioio-devs/bioio/pull/20
Item number 2 is address here: #21
Item numbers 3 & 4 are addressed here: #22
I think this will address item number 6 #23. I did not try all the readers, but I tried ome-tiff
sldy
ome-zarr
and tifffile
which seemed problematic in your and Dan's tests
@evamaxfield @SeanLeRoy @toloudis looks like all 6 of these have been addressed! Anything else here?
Wanted to give the new libraries a whirl and figured I would make a couple of notes as I go along. I will try to resolve these issues / features this weekend or something as many of them are "optional" / maybe nice for dev and debugging experience.
BIOIO_BASE_DIST_NAME
needs to be updated frombioio-types
tobioio-base
It would be nice to have access to what plugin read the file somehow. Currently on image read, the
__repr__
returns:<BioImage [Reader: Reader, Image-is-in-Memory: False]>
but it might be better to return<BioImage [plugin: {plugin_name}, Image-is-in-Memory: False]>
, esp. because most plugins will generally all use the same class name ofReader
instead of sayOmeTiffReader
, better might be<BioImage [reader_path: {python_module_path_of_reader}, Image-is-in-Memory: False]>
plugin_cache
should be made into a set, dict, or deduped list:get_plugins
should be called at the top ofdetermine_reader
? Currently cannot read files until manualget_plugins
call (ignore debugging print statements):I think the error that is throw in
determine_reader
should include the image path (and parameter type) rather than just the parameter type. For example:UnsupportedFileFormatError: BioImage does not support the image: '<class 'str'>'. You may need to install an extra format dependency. See bioio README for list of some known plugins.
is a confusing error because uhhh "what do you mean you don't take astr
path? Do you want apathlib.Path
path?"Related to 2 and 4, I think all of the readers calling their image reading class
Reader
is causing namespace / object override issues? I havebioio-lif
installed locally and can read LIF files directly using it's reader but reading fails frombioio
directly. I think this is especially true because I installedbioio-tifffile
later thanbioio-ome-tiff
and even though I am trying to read an OME-TIFF, it is using thetifffile
reader. I also wonder if this is because each of the plugins has this line in their base level__init__.py
:from .reader import Reader
and that is causing the namespace override, whichever plugin is installed most recently is the only plugin that has a "valid"Reader
object. All the others are just pointers to the newly installedReader
?