Incorrect image dimensions after reading in 3D+c TIFF
See original GitHub issueI’m trying to read the following file:
https://www.dropbox.com/s/0ynbscx4cmd5k91/E_z2_512_1um_CONTROL.tif?dl=1
skimage (ie tifffile) reads this correctly, but imageio doesn’t — even though I thought it also used tifffile as a backend for tiffs?
In [1]: import imageio
In [2]: from skimage import io
In [3]: im_iio = imageio.imread('E_z2_512_1um_CONTROL.tif')
In [4]: im_iio.shape
Out[4]: (159, 320, 512)
In [5]: im_ski = io.imread('E_z2_512_1um_CONTROL.tif')
In [6]: im_ski.shape
Out[6]: (53, 320, 512, 3)
What imageio is doing is reading the file in the array order present in the file (plane, channel, row, column), and squashing pln and ch dimensions together, while skimage is behaving as expected and producing two separate dimensions for pln and ch and (maybe a bit more than expected) moving ch to the last dimension, which is the dimension order expected by most scipy packages.
Any ideas about what is going wrong here?
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:19 (19 by maintainers)
Top Results From Across the Web
Big TIFF problem - Engineering - ITK Discourse
Hi, I want to be able to convert (to 8-bit) and compress large 16-bit grayscale 3D images. I've been sent a sample file,...
Read more >Python image analysis: reading a multidimensional TIFF file ...
The image dimensions are 1024x1024. I can, in principle, read the file with skimage (which I plan to use to further analyse the...
Read more >Can't load .tif images - Civil 3D Community - Autodesk Forums
I'm trying to import a .tif image into autocad 2013 this image I clipped in ArcMap 10.1 and reprojected. The size of the...
Read more >"Invalid or Unsupported Image File" when trying to open tiff in ...
I am trying to open .tiff orthos created with Pix4D in AutoCad 2017. When I drag and drop, I have an “invalid or...
Read more >Lazy loading of TIFF 3D - Usage & Issues - Image.sc Forum
Hello, I am working on a plugin for the previewing of different light sheet microscopes images, and I am trying to lazy load...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’d say adopt the skimage convention.
Attempt at a fix: #255