blink1073 / tifffile

Deprecated: Read and write image data from and to TIFF files.
Other
61 stars 41 forks source link

Tifffile version 0.14 does not work with imageio #40

Closed rgerum closed 6 years ago

rgerum commented 6 years ago

I have updated tifffile and now cannot import tif image using the imageio library, which relies on tifffile:

import imageio im = imageio.imread("20160405-134018_Mic4_rep0_pos0_x0_y0_mode0_z0.tif") Traceback (most recent call last): File "", line 1, in File "...\Anaconda3\lib\site-packages\imageio\core\functions.py", line 202, in imread return reader.get_data(0) File "...\Anaconda3\lib\site-packages\imageio\core\format.py", line 341, in get_data im, meta = self._get_data(index, **kwargs) File "...\Anaconda3\lib\site-packages\imageio\plugins\tifffile.py", line 200, in _get_data if index < 0 or index >= len(self._tf): TypeError: object of type 'TiffFile' has no len()

I am using imageio 2.2.0 and python 3.6.3. The error also occurs with tifffile 0.13.5 so it was probably caused by the transition from 0.12.1 to 0.13.5

rgerum commented 6 years ago

ok, I found out, that the problem is solved in the current imageio repository version, which is not published yet.