Method

Several different readers capable of reading BigTiff files were compared. All measurements were done using Windows 10 x64 on the same machine using the same file stored on the same drive. Particular care had to be taken to control for file-system caching on Windows.

Note: These benchmarks were run some time ago and readers have hopefully become faster in the meantime. The examples below are still useful if you want to test things for yourself.

Python details

In python, we used tifffile via scikit-image.

../_images/python_skimage_tiffile.png

Python benchmark using tifffile via scikit.image

ImageJ details

Results in ImageJ were highly variable. Repeated measurements often differed by as much as 60s and varied from 45 s-175 s. We used Fiji running ImageJ 1.51a.

../_images/imagej_not_cached.png

Loading a BigTiff in Fiji (ImageJ).

Matlab details

Tests were running using Matlab 2015b. Two methods for reading the image stack were explored. The first relies on imread(). This turned out to be the slowest method (by far), but is probably the most accessible way of reading image stacks in matlab because imread represents a nice default interface for reading images.

../_images/matlab_readstack_imread.png

Reading an image stack using imread.

../_images/matlab_readstack_imread_times.png

Run time for the imread-based method (uncached).

The second method relied on Matlab’s Tiff class which wraps libtiff. It is a more flexible and performant than imread, but harder to use.

../_images/matlab_readstack_code_TiffClass.png

Reading an image stack using the Tiff class in Matlab.

../_images/matlab_readstack_TiffClass.png

Run time for the Tiff-based method (uncached).

Just for comparison, using the ScanImageTiffReader in Matlab is also very simple:

../_images/matlab_si.png

Run time for the ScanImageTiffReader in matlab.