openmicroscopy/bioformats — pull request #1371 by rleigh-dundee (2014-10-15 16:18:11+00:00)
Title: C++: Read and write all pixel types and validate all tags and pixel data

This was happening with the previous PR, but it lacked the unit tests to validate it, and the BIT type wasn't correctly supported (it needed special casing). We now:

- special case BIT support
- have unit tests to write, read and verify TIFF tags and pixel data for all pixel types
- plus minor fixes needed for the above
- travis runs a subset of the tests to avoid timing out, and this can be further adjusted if needed

--------

Testing:

- Travis and the CI jobs should remain green

The unit tests validate that the pixel data read is the same as the data which was written. However, *this does not necessarily mean it's correct* since if there's a bug in both the writing and the reading then it will validate but *still be incorrect*. This requires visual inspection.

- Build and run `cpp/test/ome-bioformats/tiff` (slow on MacOS X/BSD; build in release mode to speed it up)
- Look at the generated images in `cpp/test/ome-bioformats/*.tiff` (there will be several thousand, testing many pixel type/strip size/tile size/write ordering variants)
- All images should be identical bar differences in the pixel type (BIT is thresholded), but note that

- There appear to be some bioformats Java TIFF tiling bugs which show corrupted tiles. But "gm convert" should be able to let you look at PNG images to verify that this is actually OK. All uint[8-32]/int[8-32]/bit/float/double images should be viewable and should batch import into OMERO (this is an easy way to have an overview of the entire set of images to spot discrepancies). The complex and double-complex images will not be.