openmicroscopy/bioformats — pull request #116 by ctrueden (2012-08-06 18:54:36+00:00)
Title: PrairieReader: add support for inverted X/Y coords

This works by checking the CFG file for the xYStageXPositionIncreasesLeftToRight and/or xYStageYPositionIncreasesBottomToTop properties being set to True, and then inverting all X and/or Y positions respectively if so.

With this change, Prairie data with X and/or Y coordinates inverted will still stitch properly using Fiji's "Grid/Collection stitching" plugin.

Please note, however, that there is one pending change necessary in PrairieReader before this will work completely correctly. At the moment, PrairieReader populates the OME MetadataStore *before* parsing the CFG file which inverts the stage coordinates. So the OME metadata is never properly adjusted with the inverted coordinates. Hence, the data will still stitch backwards by default.

Refactoring the PrairieReader to populate OME metadata *after* the CFG file is fully parsed will address this issue. But in the meantime, this change to PrairieReader still gets us closer to supporting the stage coordinate inversion feature.