One significant difficulty is that stage coordinates are expressed in an arbitrary stage unit, rather than anything convertible such as pixels or microns. Hence, we must use some kind of heuristic to convert from stage units to pixels, which is what the Fiji stitching plugin requires as input.
The current approach requires the user to provide a rough approximation of tile overlap as a percentage, with a default of 20% overlap. We assume image tiles were collected in a roughly rectangular grid; the heuristic will probably fail with most other tile configurations.
The stage unit scaling algorithm (implemented in the
computeScale(loci.formats.meta.IMetadata, double, double, boolean)
method below) is as follows:
Once we have the stage unit scale factors, we can write out the stage positions to the tile configuration file in pixels, for use by the Fiji stitching plugin. There is one other minor detail, however: the stage positions may be in a reverse coordinate system from the pixels. Hence, we provide an "Invert stage coordinates" checkbox to indicate this. With this option enabled, the stage unit scale factors will be negative, which will result in the conversion to pixels in the proper direction.
|Modifier and Type||Class and Description|
|Constructor and Description|
Copyright © 2015–2017 SciJava. All rights reserved.