openmicroscopy/bioformats — pull request #1363 by rleigh-dundee (2014-10-06 16:04:09+00:00)
Title: C++: Add TIFF strip/tile write support

This PR Includes a number of new features to enable flexible tile and strip I/O:

- `TileBuffer` class for transfer of strip/tile data from libtiff
- `TileCache` class for caching tiles (for the case that we write in an order and tile size which results in needing to retain tiles which can't be immediately written)
- `TileCoverage` class for efficient storage and query of transferred pixel regions using an R*Tree; includes support for automatic region coalescing on insert for keeping region counts (and hence insert and query times) low; PlaneRegion union operator added for this purpose.
- `IFD` caches some commonly needed TIFF tags and provides methods to get and set them.
- `IFD` `WriteVisitor` implements strip and tile writing
- Tests updated to include write tests.

--------

Testing: All code comes with test cases. TIFF read and write are tested using multiple tile and strip configurations including whole image, aligned and unaligned (ordered and random) tile and strip sequences.