juglab / n2v

This is the implementation of Noise2Void training.
Other
392 stars 107 forks source link

Can't open LZW compressed tiff files #44

Closed tibuch closed 4 years ago

tibuch commented 4 years ago

tifffile does not support LZW compressed tiff files.

We should check if Pillow can read such files and if so, we should probably use Pillow to read the images.

turekg commented 4 years ago

I took the train.tif file and ran it thru https://www.ps2pdf.com/compress-tiff to get an LZW compressed tif file. Then wrote a quick test to read it with tifffile and pillow. Actually it worked with tiffile but failed with pillow. So what can I use as another test file? @tibuch do you have one that you know was failing?

turekg commented 4 years ago

OK I've added a test and test file that shows that it works....

turekg commented 4 years ago

So, interesting.... ,my test fails on Travis but not on my machine. It turns out that if you also install Imagecodecs 2020.5.30 (see https://github.com/cgohlke/tifffile) then it works fine. It must have been installed by my version of tifffile. So if add a min version to tifffile in setup.py it'll solve that problem.

turekg commented 4 years ago

Hum, no I guess tifffile did not automatically add imagecodecs. Added those to setup.py

turekg commented 4 years ago

OK, test passes now with setup.py updated