Y coordinate direction for plane position and image pixels are not consistent across formats

I noticed that the Plane PositionY for all BioFormats formats we produce in our lab, except Metamorph, is inverted from the local positive Y direction in the image planes themselves. In other words, if you use the Plane PositionX/PositionY to place the image planes in space (like the ImageJ BioFormats importer “stitch tiles” option) then the image tiles are all obviously upside down. I haven’t done a systematic study of public example files from other formats.

I can’t find any statement in the OME data model docs or BioFormats code about this issue. I know that there are at least these two conventions on where the origin for a raster image should be (top left or bottom left), so it would be very helpful if BioFormats could address this to aid in writing tools to perform image stitching. Is this something that would be considered? One non-breaking solution would be a new property on Plane to indicate which convention is used and a new ReaderWrapper that uses that information to normalize the Plane orientation.

1 Like

Hi @jmuhlich, what formats specifically are you working with? The plane positions in Bio-Formats should be the same as the underlying format, we are not inverting them or changing the origin of them.

Though if you are using the Tile Stitcher option for reading then it will read them as though top left is the origin which may be why they are appearing inverted. In that case having extra metadata on the plane to note the origin could be useful and is something that might be possible to consider in the future.

I’m performing my own stitching using the plane position metadata as a starting point. I get that Bio-Formats is taking the plane positions as given in the underlying format, I just wondered if the orientation info is something that could be extracted in the future. Unfortunately, the more I look the more I feel that orientation may not be explicitly considered by many format producers, and any consistency is likely by accident rather than by design. I think tools consuming this data will always need the ability to override it.

By the way, the discussion here at Improve Bio-Formats Image Position Metadata is very relevant.

Agreed that it would certainly be useful metadata to have and be able to configure. Unfortunately as you suggest, the vast majority of proprietary formats do not currently store this information.