[ome-devel] TIFF part of OME-TIFF and standards

Curtis Rueden ctrueden at wisc.edu
Fri Sep 18 15:18:10 BST 2009


Hi everyone,

On Mon, Sep 7, 2009 at 6:59 AM, Nick Perry <nperry at stanford.edu> wrote:

> I'm converting a file format to OME-TIFF, and I was wondering if there were
> any sort of standards for the TIFF 'part' of the OME-TIFF. For example:
>
> 1. is it suggested to have IFDs before or after the raw image data they
> describe?
> 2. is there a preferred number for RowsPerStrip? For example, should
> RowsPerStrip just be 1? Should each image plane just be a single strip?
>

I answered these questions earlier on the list and/or privately to Nick, but
thought I would repost the answers here, for the thread archive.

-Curtis

---------- Forwarded message ----------
From: Curtis Rueden <ctrueden at wisc.edu>
Date: Tue, Sep 8, 2009 at 1:41 PM
Subject: Re: [ome-devel] Required TIFF IFD Fields in OME-TIFF?
To: Nick Perry <nperry at stanford.edu>
Cc: ome-devel at lists.openmicroscopy.org.uk

Hi Nick,

Of perhaps more importance: does OME care about IFDs? Are there required IFD
> data? Or does the completeness of my IFDs only make the file more compatible
> with TIFF readers and not really effect OME? Like, could I just skip the
> details in the TIFF IFDs and just have things like ImageWidth, ImageLength,
> etc, which I'm sure the bio-formats tools need to correctly parse the data?


OME does not specifically care about any IFD values, no -- at least, not any
above and beyond what would normally be required for a regular TIFF. You
should populate exactly what you would normally populate if the file were
not OME-TIFF. Any overlap between OME metadata and TIFF IFD values (SizeX
vs. ImageWidth, SizeY vs. ImageHeight, etc.) should be consistent -- if it
is not, Bio-Formats will issue a warning message and the resultant behavior
may not be what you want.

-Curtis

---------- Forwarded message ----------
From: Curtis Rueden <ctrueden at wisc.edu>
Date: Tue, Sep 8, 2009 at 4:39 PM
Subject: Re: [ome-devel] Required TIFF IFD Fields in OME-TIFF?
To: Nick Perry <nperry at stanford.edu>

Hi Nick,

Quick question - as far as RowsPerStrip is concerned, I see in one of your
> examples from the LOCI site that for an image (tubhiswt_C1.ome.tif, from the
> 3D) with 512 as ImageLength (y = 512), you also put 512 as the number of
> rows per strip (giving StripByteCount a value of 262,144). Do you recommend
> putting all the rows of an image plane in each strip? Does it make a
> difference? I see on the TIFF6 specification from adobe that they recommend
> each strip having about 8k bytes. Does it actually affect efficiency in
> reading/buffering?
>

Are you coding a TIFF writer from scratch? If working in C/C++, I would
suggest using libtiff, and if using Java, I would suggest using the
Bio-Formats TiffWriter implementation.

That said, I'm sure the performance depends on the TIFF reader
implementation when reading the file back in. For a naive TIFF reader, it
might suck in one strip at a time, so you might want your strip size to
equal your buffer size. In the past 8K was a good buffer size, but these
days something more like 256K is better (at least in my experience with
empirical tests). But off the top of the head I'm not sure what our TIFF
writer does -- it might always put all the rows in one strip. I wouldn't
worry about it too much though unless you have absolutely huge image planes.

-Curtis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-devel/attachments/20090918/23599377/attachment.html>


More information about the ome-devel mailing list