openmicroscopy/bioformats — pull request #396 by hinerm (2013-02-23 19:39:49+00:00)
Title: Interleaved fixes

Fixes two bugs regarding interleaved images:

- ChannelMerger.isInterleaved() now delegates to reader.isInterleaved() if canMerge() returns false. This prevents ChannelMergers from always forcing isInterleaved() to return false.

- FormatTools.openThumbBytes() now interleaves the channel byte arrays returned by AWTImageTools if the provided reader.isInterleaved() returns true, instead of always writing each full channel out sequentially.

To test:
open an interleaved RGB/multi-channel (>3) image and verify that the thumbnail displays correctly (e.g. in ImageViewer) and looks the same when actually opened.

Note: if comparing results with/without these changes, don't use tools/showinf. It seems like it doesn't wrap using a ChannelMerger, so interleaved images display properly because isInterleaved() is unaffected. But when manually executing ImageInfo the image will open as though it's not interleaved.

Thumbnails when using showinf without these chaings should still display improperly

Test image used:
ome/data/repo/test/images/good/zeiss-zvi/BY4741NQ2.zvi