Tiling¶
OME Files supports the creation of images which are stored as a series
of tiles, using the FormatWriter
setTileSizeX()
and setTileSizeY()
methods. For the TIFF format, these are
stored as either tiles or strips.
When chosing a tile size for TIFF data, consider these factors:
- The tile size must be a multiple of 16.
- The tile size should be a multiple of the image size or else storage space will be wasted due to tiles overlapping the right and/or bottom borders of the image.
- A smaller tile size results in more tiles; there is a small storage overhead and a larger processing overhead which makes larger tile sizes more efficient.
- Larger tile sizes do not affect write performance, but may affect read performance if it results in data being read and discarded; consider the read access patterns of the stored data.
For images with a width less than 2048 pixels, the OME Files TIFF writers currently default to writing strips of approximately 216 pixels (the strip size varies depending upon the image width). For images with a width of 2048 and larger, tiles are used with a default size of 216 pixels (256×256). These satisfy the above requirements for many typical cases. If your needs do not match these defaults, please specify your own. Consider profiling with your own hardware and data for optimal performance.
The figures which follow detail various considerations when chosing an appropriate tile size. In all the figures, the separate panels show images of different sizes, from small (4096×4096) to large (131072×131072). Different pixel types have different storage sizes, with consequent changes in storage size and upon performance. These are shown on the panels as separate lines.
These plots were computed using an R script
, based upon empirical testing with a TIFF tiling
benchmark.