Comments (5)
I wonder if it would be enough to have:
get_all_readers_for_given_file(filepath)
then loop over readers, try each one, get some string message back about why it didn't work.
from bioio.
The difference between what it does now and what you are proposing being that currently we stop at the first reader that works but it would be ideal to see all working readers? That seems doable & easy to implement
from bioio.
If I recall correctly, the main issue was about surfacing why something didn't work (not just that it didn't work). The Bioformats reader is particularly tough because it requires a java runtime, so even if you have bioformats_jar
installed, but don't have openjdk or the like, then you'll get an error, but the implementation as it was in aicsimageio didn't surface that issue, it just said:
>>> rdr = AICSImage.determine_reader('/Users/talley/Downloads/coupe shg stack_0001.oir')
AICSImage does not support the image:
'/Users/talley/Downloads/coupe shg stack_0001.oir'. File extension suggests
format: 'oir'. Install extra format dependency with: `pip install bioformats_jar`.
when in fact the real issue was only surfaced if you manually went in and tried to instantiate a bioformats reader:
>>> im = BioformatsReader('/Users/talley/Downloads/coupe shg stack_0001.oir')
RuntimeError:
BioformatsReader requires a java executable to be available
in your environment. If you are using conda, you can install
with `conda install -c conda-forge scyjava`.
Note: you may need to reactivate your conda environment after
installing opendjk. If you still have this error, try:
# mac and linux:
export JAVA_HOME=$CONDA_PREFIX
# windows:
set JAVA_HOME=%CONDA_PREFIX%\Library
so, the crux of that issue was more about surfacing useful error messages. Without it, would probably bang their head against a wall saying "I DID install bioformats_jar darn it!"
from bioio.
but, I'd need to familiarize myself with whatever equivalent you have for determine_reader
here to have a suggestion
from bioio.
I wonder if we need better logging / path tracing then?
We should have different errors for ReaderInitError
vs UnsupportedFileFormatError
?
from bioio.
Related Issues (20)
- Features / Bugs / Eva Notes HOT 6
- Anaconda Distribution HOT 1
- Add units to PhysicalPixelSizes
- Improve error message on UnsupportedFileFormatError HOT 5
- can't instantiate BioImage in v1.0 HOT 3
- Unable to open czi line-scan kymographs - missing raw frame(t) pixel data HOT 1
- reader chunk_dims are too coarse-grained for dask
- read physical time metadata HOT 1
- writer compression parameter HOT 1
- bioio-tifffile and bioio-ome-tiff parse ome-tiff metadata differently HOT 2
- Add ArrayLikeReader
- HTTP URL for ZARR fails to be validated by `determine_plugin` for bioio-ome-zarr HOT 6
- Clarify that the equivalent of aicsimageio.types.PhysicalPixelSizes is bioio_base.types.PhysicalPixelSizes
- Add new ome-zarr-writer
- Centralized guess dim order HOT 2
- Admin: update pre-commit to `ruff` HOT 1
- remove zarr<2.18.0 constraint
- bioio-tifffile takes precedence over bioio-ome-tiff for ome-tiffs HOT 2
- Plugin Reader Metadata Does Not Standardize Supported Suffixes HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bioio.