[SciPy-User] Microscopy TIFF files

Robert Kern robert.kern at gmail.com
Fri Jan 24 12:24:58 EST 2014


On Fri, Jan 24, 2014 at 5:13 PM, Chris Weisiger <cweisiger at msg.ucsf.edu>
wrote:
>
> Apologies for the somewhat off-topic nature of this post, but I'm not
aware of any more-pertinent communities. Please feel free to redirect me
elsewhere.
>
> Our microscope control software currently outputs files in MRC format. In
the interests of interoperability with the rest of the microscope
community, it would be nice if we had TIFF support as well. There exist
programs that convert MRC to TIFF and vice versa, but a native solution is
always preferable if only to reduce the number of steps involved.
Personally I have next to no experience with the TIFF format as used in
microscopy, so I'm starting out by doing some research.
>
> There exist Python libraries for writing TIFF files, of course; my
concern with them is that they perform writes "atomically" (that is, the
entire image data is written at once). This requires you to *have* all of
the image data at the time you perform the writing, and means that for
large datasets you need lots of RAM (to hold the dataset in memory) and
lots of time (to write the data to disk all at once). I prefer to stream
data to disk as it comes in, which greatly reduces RAM requirements and
also improves performance by allowing writes to happen in parallel with
data acquisition. However, I'm not aware of a Python/TIFF library that
allows for this.

These are perfectly good reasons to save to your own format, MRC, and have
the conversion take place as a post-processing step. The cost of that extra
step is not that great, IMO.

> I've taken a brief look at the TIFF spec (
http://partners.adobe.com/public/developer/en/tiff/TIFF6.pdf ). Is this
actually the same format that is used for microscopy data? I've seen
OME-TIFF as well (
http://www.openmicroscopy.org/site/support/ome-model/ome-tiff/ ) but I
don't know how widely it is supported (though I do see that Micro-Manager
supports it). The Adobe TIFF standard specifies a limit in filesize of 4GB,
which could be potentially troublesome. I don't know if OME-TIFF has
similar limitations.

I don't know the microscopy field, but the answer is "sort of". TIFF is
kind of a framework for building an image file format than an image format
per se. Sure, you can stick to the defaults, write out one image with
standard metadata, and most general image programs will be able to read it.
However, there are a bunch of standards for extra, domain-specific (and
application-specific!) metadata that build on top of the general TIFF spec
to specify the semantics of certain metadata fields and what kind of raster
data can go in, etc. OME-TIFF is, essentially, an instantiation of the
general class of the TIFF standard and not a different standard altogether.
The 4GB limitation is probably inherited.

--
Robert Kern
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20140124/32df3362/attachment.html>


More information about the SciPy-User mailing list