public class StitchOmeTiff extends Object implements ij.plugin.PlugIn
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 |
---|---|
static class |
StitchOmeTiff.FusionMethod |
Constructor and Description |
---|
StitchOmeTiff() |
public void run(String arg)
run
in interface ij.plugin.PlugIn
Copyright © 2015–2022 SciJava. All rights reserved.