question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

imageio v3 api fails to read all frames in a MetaMorph stk file

See original GitHub issue

The following zip file contains a single .stk image stack (https://support.moleculardevices.com/s/article/MetaMorph-Software-TIFF-and-STK-file-formats) with 2 frames: test.zip (I zipped it because github doesn’t support uploading stks but does support zips…) imageio v2 volread reads it fine, but the v3 API only sees the first frame:

In [17]: imageio.volread("test.stk").shape
Out[17]: (2, 290, 364)

In [18]: imageio.v3.imread("test.stk", index=...).shape
Out[18]: (1, 290, 364)

In [19]: len([*imageio.v3.imiter("test.stk")])
Out[19]: 1

(Note that stk files are explicitly listed as supported by the tifffile module.)

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:17 (15 by maintainers)

github_iconTop GitHub Comments

1reaction
anntzercommented, Aug 18, 2022

Here is a small stk file that I hereby allow you to add to the test suite of imageio: movie.zip.

1reaction
FirefoxMetzgercommented, May 25, 2022

The Molecular Devices support said that they don’t believe that there is any licence that applies to the images and that they “make them available and assume that they will be used for positive applications”. I asked for clarification regarding the online terms of use that @cgohlke found.

In the interest of not stalling for too long, I will go ahead and merge #805 with a regression test that xfails until we have clarity about the applicable copyright.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Imageio Usage Examples — imageio 2.23.0 documentation
import imageio.v3 as iio # index=None means: read all images in the file and stack along first axis frames = iio.imread("imageio:newtonscradle.gif", ...
Read more >
Reading MetaMorph stk file failed with PIL and tifffile
I am using PIL to read a MetaMorph stk file that contains a series of cryo-EM images. Here is the code: from PIL...
Read more >
imageio Documentation - Read the Docs
index=None means: read all images in the file and stack along first axis frames ... ImageIO Core. The user-facing APIs (legacy + v3)...
Read more >
Version history — Bio-Formats 6.6.1 documentation
MetaMorph. ensured dimension metadata read from tags and/or .nd file rather than allowing the underlying TIFF reader to treat each IFD as a ......
Read more >
tifffile 2021.2.1 - PyPI
Read and write TIFF(r) files. ... Pass all is_flag arguments from imread to TiffFile. ... STK (MetaMorph Stack) contains additional image planes stored ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found