scifio / scifio-bf-compat

SCIFIO (@scifio/scifio) plug-in allowing use of Bio-Formats readers.
http://scif.io/
BSD 2-Clause "Simplified" License
3 stars 5 forks source link

Do not attempt to load non-File instances via Bio-Formats #7

Closed dscho closed 10 years ago

dscho commented 10 years ago

There is apparently code in Bio-Formats that can open random access streams that are not backed by local files, but we do not use that code path anyway (at least if this developer understood Curtis Rueden's generous education correctly).

So let's not have tons of attempts by each Bio-Formats reader to read something that we know it cannot read, at least the way we asked them to read it.

Signed-off-by: Johannes Schindelin johannes.schindelin@gmx.de

dscho commented 10 years ago

@ctrueden could you have a look, please?

ctrueden commented 10 years ago

Thanks @dscho, as a stopgap I think this solution is great. We will be changing the Checker logic soon anyway to be more robust (see scijava-common robust-io for the start of that), at which point we can reevaluate the situation.

For the benefit of @hinerm and any lurkers: the issue came up because the SCIFIO ZipReader tries to delegate to BioFormatsFormat to read a TIFF inside, and passes the name of the TIFF from the ZIP entry, and Bio-Formats has no idea what to do with that, since it does not have the relevant RandomAccessInputStream.