public class TileConfigurationSPIM extends Object
| Modifier and Type | Field and Description |
|---|---|
protected int |
debugLevel |
| Constructor and Description |
|---|
TileConfigurationSPIM(int debugLevel) |
| Modifier and Type | Method and Description |
|---|---|
void |
addTile(TileSPIM t)
Add a single
Tile. |
void |
addTiles(Collection<? extends TileSPIM> t)
Add a
Collection of Tiles. |
void |
addTiles(TileConfigurationSPIM t)
Add all
Tiles of another TileConfiguration. |
void |
clear()
Cleanup.
|
void |
computeError() |
void |
fixTile(TileSPIM t)
Fix a single
Tile. |
ArrayList<PointMatch> |
getConnectingPointMatches(Tile<?> targetTile,
Tile<?> referenceTile)
Returns an
ArrayList of PointMatch that connect the targetTile and the referenceTile. |
double |
getError() |
Set<TileSPIM> |
getFixedTiles() |
double |
getMaxError() |
double |
getMinError() |
Set<TileSPIM> |
getTiles() |
void |
optimize(double maxAllowedError,
int maxIterations,
int maxPlateauwidth,
int debugLevel)
Minimize the displacement of all
Correspondence pairs
of all Tiles |
void |
optimizeWithSketchTikZ(double maxAllowedError,
int maxIterations,
int maxPlateauwidth,
int debugLevel)
Minimize the displacement of all
Correspondence pairs
of all Tiles |
void |
optimizeWithSketchTikZNuclei(double maxAllowedError,
int maxIterations,
int maxPlateauwidth,
int debugLevel)
Minimize the displacement of all
Correspondence pairs
of all Tiles |
List<Tile<?>> |
preAlign()
Computes a pre-alignemnt of all non-fixed
Tiles by propagating the pairwise
models. |
protected void |
println(String s) |
protected void |
update()
Update all
Correspondences in all Tiles
and estimate the average displacement. |
public final double getMinError()
public final double getMaxError()
public final double getError()
protected void println(String s)
public void clear()
public final void addTiles(Collection<? extends TileSPIM> t)
Collection of Tiles.t - public final void addTiles(TileConfigurationSPIM t)
Tiles of another TileConfiguration.t - protected final void update()
Correspondences in all Tiles
and estimate the average displacement.public final void computeError()
public void optimize(double maxAllowedError,
int maxIterations,
int maxPlateauwidth,
int debugLevel)
throws NotEnoughDataPointsException,
IllDefinedDataPointsException
Correspondence pairs
of all TilesmaxAllowedError - do not accept convergence if error is < max_errormaxIterations - stop after that many iterations even if there was
no minimum foundmaxPlateauwidth - convergence is reached if the average absolute
slope in an interval of this size and half this size is smaller than
0.0001 (in double accuracy). This is assumed to prevent the algorithm
from stopping at plateaus smaller than this value.debugLevel - defines if the Optimizer prints the output at the end of the processNotEnoughDataPointsExceptionIllDefinedDataPointsExceptionpublic void optimizeWithSketchTikZ(double maxAllowedError,
int maxIterations,
int maxPlateauwidth,
int debugLevel)
throws NotEnoughDataPointsException,
IllDefinedDataPointsException
Correspondence pairs
of all TilesmaxAllowedError - do not accept convergence if error is < max_errormaxIterations - stop after that many iterations even if there was
no minimum foundmaxPlateauwidth - convergence is reached if the average absolute
slope in an interval of this size and half this size is smaller than
0.0001 (in double accuracy). This is assumed to prevent the algorithm
from stopping at plateaus smaller than this value.debugLevel - defines if the Optimizer prints the output at the end of the processNotEnoughDataPointsExceptionIllDefinedDataPointsExceptionpublic void optimizeWithSketchTikZNuclei(double maxAllowedError,
int maxIterations,
int maxPlateauwidth,
int debugLevel)
throws NotEnoughDataPointsException,
IllDefinedDataPointsException
Correspondence pairs
of all TilesmaxAllowedError - do not accept convergence if error is > max_errormaxIterations - stop after that many iterations even if there was
no minimum foundmaxPlateauwidth - convergence is reached if the average absolute
slope in an interval of this size and half this size is smaller than
0.0001 (in double accuracy). This is assumed to prevent the algorithm
from stopping at plateaus smaller than this value.debugLevel - defines if the Optimizer prints the output at the end of the processNotEnoughDataPointsExceptionIllDefinedDataPointsExceptionpublic List<Tile<?>> preAlign() throws NotEnoughDataPointsException, IllDefinedDataPointsException
Tiles by propagating the pairwise
models. This does not give a correct registration but a very good starting point
for the global optimization. This is necessary for models where the global optimization
is not guaranteed to converge like the HomographyModel2D, RigidModel3D, ...Tiles that could not be pre-alignedNotEnoughDataPointsException - // * @throws IllDefinedDataPointsExceptionIllDefinedDataPointsExceptionpublic ArrayList<PointMatch> getConnectingPointMatches(Tile<?> targetTile, Tile<?> referenceTile)
ArrayList of PointMatch that connect the targetTile and the referenceTile. The order of the
PointMatch is PointMatch.p1 = target, PointMatch.p2 = reference. A Model.fit() will then solve the fit
so that target.p1.l is mapped to reference.p2.w.targetTile - - the Tile for which a Model can fitreferenceTile - - the Tile to which target will mapArrayList of all PointMatch that target and reference shareCopyright © 2015–2021 Fiji. All rights reserved.