[ome-devel] Speeding up the TIFF reader in common cases

Curtis Rueden ctrueden at wisc.edu
Thu Nov 1 18:39:54 GMT 2012


Hi all,

Johannes & I were discussing how the speed of the Bio-Formats TIFF reader
could be improved in common cases. Two main ideas:

1) If the data was written by either ImageJ or Bio-Formats (either which
can be detected by examining the first IFD), we could make assumptions
about the structure of the pixel data. ImageJ itself does this when reading
TIFF files (assumes planes are written in contiguous order) which allows it
to read in TIFFs very quickly. Unfortunately, ImageJ fails to handle TIFFs
that do not meet these assumptions. But Bio-Formats could fall back to its
more general parsing logic.

2) Parse IFDs only lazily per plane as each plane is requested, rather than
fully populating them all up front. AFAIK, the first IFD is really the only
important one for detecting whether a file should be classified as a
particular subtype of TIFF. Also AFAIK, we would still need to walk the IFD
linked list just to count the total number of image planes (unless we could
obtain that information in some other format-specific way), but it would
probably be faster than parsing all IFDs fully up-front.

We think that Bio-Formats could deliver the best of both worlds
(correctness and performance), if we added some heuristics along these
lines in common cases. It could make a big difference in usability.

Do other Bio-Formats devs agree? If so, I can file a ticket on the OME Trac
for it, if one doesn't already exist.

Regards,
Curtis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-devel/attachments/20121101/41573e03/attachment.html>


More information about the ome-devel mailing list