ahnlabb / BioformatsLoader.jl

A julia package to load images using bioformats
Other
17 stars 7 forks source link

Problem with importing UnsignedShort Data. #11

Closed RainerHeintzmann closed 3 years ago

RainerHeintzmann commented 3 years ago

When reading in an ome.tif file of type unsigned short the BioformatsLoader.jl messes up the singed bit. You can try this dataset: https://mirror.imagej.net/images/m51.tif which reads in fine in ImageJ and also via the load() function of "Images" but not in BioformatsLoader.jl.

ahnlabb commented 3 years ago

Thank you for reporting this bug and providing an example. The issue was caused by a mistake in the logic that checks whether a file is stored in big-endian order. It should now be fixed on the master branch. Please verify if you get a chance.

RainerHeintzmann commented 3 years ago

In the current master branch three seems to be a file missing: failed to load external entity .... "BioformatsLoader.jl/src/../deps/ome.xsd"

ahnlabb commented 3 years ago

ome.xsd is not directly provided by this package, instead it is downloaded from the OME website when the package is built. This should happen automatically but if the download has failed for any reason you can retrigger the download by using ]build BioformatsLoader:

(TemporaryEnvironment) pkg> build BioformatsLoader
  Progress [========================================>]  2/2
2 dependencies successfully precompiled in 3 seconds (47 already precompiled)

A failure could look like:

(TemporaryEnvironment) pkg> build BioformatsLoader
    Building BioformatsLoader → `~/.julia/scratchspaces/44cfe95a-1eb2-52ea-b672-e2afdf69b78f/6fb9fa2dbe439a9ec5a9642ee0f0b35cc8cbb2b6/build.log`
ERROR: Error building `BioformatsLoader`:
[ Info: Downloading version 6.5.1 of bioformats_package.jar from https://downloads.openmicroscopy.org/bio-formats/6.5.1/artifacts/bioformats_package.jar
ERROR: LoadError: Could not resolve host: downloads.openmicroscopy.org while requesting https://downloads.openmicroscopy.org/bio-formats/6.5.1/artifacts/bioformats_package.jar
Stacktrace:
[...]

Cf. #5 and #9 .

RainerHeintzmann commented 3 years ago

Great. This time it worked. Funnily the same happened last time I tried to install it. Maybe you could catch this error and put out a message indicating to rerun the build? This may be quite helpful.