mpicbg.trakem2.align
Class AbstractAffineTile2D<A extends mpicbg.models.AbstractAffineModel2D<A>>

java.lang.Object
  extended by mpicbg.models.Tile<A>
      extended by mpicbg.trakem2.align.AbstractAffineTile2D<A>
Direct Known Subclasses:
AffineTile2D, RigidTile2D, SimilarityTile2D, TranslationTile2D

public abstract class AbstractAffineTile2D<A extends mpicbg.models.AbstractAffineModel2D<A>>
extends mpicbg.models.Tile<A>


Field Summary
protected  Patch patch
           
protected  java.util.Set<mpicbg.models.PointMatch> virtualMatches
          A set of virtual point correspondences that are used to connect a tile to the rest of the TileConfiguration assuming that the initial layout was correct.
 
Fields inherited from class mpicbg.models.Tile
connectedTiles, cost, matches, model
 
Constructor Summary
AbstractAffineTile2D(A model, Patch patch)
           
 
Method Summary
 boolean addVirtualMatch(mpicbg.models.PointMatch match)
           
 void clearVirtualMatches()
          Remove all virtual matches.
 void commonPointMatches(mpicbg.models.Tile<?> other, java.util.Collection<mpicbg.models.PointMatch> commonMatches)
          Extract the common PointMatches of two tiles.
 java.awt.geom.AffineTransform createAffine()
           
 ij.process.ByteProcessor createMaskedByteImage()
           
 double getHeight()
           
 Patch getPatch()
           
 java.util.Set<mpicbg.models.PointMatch> getVirtualMatches()
           
 double getWidth()
           
protected abstract  void initModel()
           
 boolean intersects(AbstractAffineTile2D<?> t)
           
 void makeVirtualConnection(AbstractAffineTile2D<?> t)
          Add a virtual connection between two Tiles.
static void pairOverlappingTiles(java.util.List<AbstractAffineTile2D<?>> tiles, java.util.List<AbstractAffineTile2D<?>[]> tilePairs)
          Search a List of Tiles for overlapping pairs.
static void pairOverlappingTiles(java.util.List<AbstractAffineTile2D<?>> tilesA, java.util.List<AbstractAffineTile2D<?>> tilesB, java.util.List<AbstractAffineTile2D<?>[]> tilePairs)
          Search two Lists of Tiles for overlapping pairs.
static void pairTiles(java.util.List<AbstractAffineTile2D<?>> tiles, java.util.List<AbstractAffineTile2D<?>[]> tilePairs)
          Pair all Tiles from a List.
static void pairTiles(java.util.List<AbstractAffineTile2D<?>> tilesA, java.util.List<AbstractAffineTile2D<?>> tilesB, java.util.List<AbstractAffineTile2D<?>[]> tilePairs)
          Pair all Tiles from two Lists.
 boolean removeVirtualMatch(mpicbg.models.PointMatch match)
           
 void updatePatch()
           
 
Methods inherited from class mpicbg.models.Tile
addConnectedTile, addMatch, addMatches, apply, connect, findConnectedTile, fitModel, getConnectedTiles, getCost, getDistance, getMatches, getModel, identifyConnectedGraphs, removeConnectedTile, removeMatch, traceConnectedGraph, update, update, updateCost
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

patch

protected final Patch patch

virtualMatches

protected final java.util.Set<mpicbg.models.PointMatch> virtualMatches
A set of virtual point correspondences that are used to connect a tile to the rest of the TileConfiguration assuming that the initial layout was correct. Virtual point correspondences are also stored in matches. This is just to keep track about them. Virtual point correspondences have to be removed for real connections. TODO Not yet tested---Do we need these virtual connections?

Constructor Detail

AbstractAffineTile2D

public AbstractAffineTile2D(A model,
                            Patch patch)
Method Detail

getPatch

public final Patch getPatch()

getWidth

public final double getWidth()

getHeight

public final double getHeight()

getVirtualMatches

public final java.util.Set<mpicbg.models.PointMatch> getVirtualMatches()

addVirtualMatch

public final boolean addVirtualMatch(mpicbg.models.PointMatch match)

removeVirtualMatch

public final boolean removeVirtualMatch(mpicbg.models.PointMatch match)

clearVirtualMatches

public final void clearVirtualMatches()
Remove all virtual matches. TODO Not yet tested---Do we need these virtual connections?


initModel

protected abstract void initModel()

createAffine

public final java.awt.geom.AffineTransform createAffine()

updatePatch

public final void updatePatch()

createMaskedByteImage

public final ij.process.ByteProcessor createMaskedByteImage()

intersects

public final boolean intersects(AbstractAffineTile2D<?> t)

makeVirtualConnection

public final void makeVirtualConnection(AbstractAffineTile2D<?> t)
Add a virtual connection between two Tiles. The connection is placed in the center of the intersection area of both tiles. TODO Not yet tested---Do we need these virtual connections?

Parameters:
t -

pairTiles

public static final void pairTiles(java.util.List<AbstractAffineTile2D<?>> tiles,
                                   java.util.List<AbstractAffineTile2D<?>[]> tilePairs)
Pair all Tiles from a List. Adds the pairs into tilePairs.

Parameters:
tiles -
tilePairs -

pairOverlappingTiles

public static final void pairOverlappingTiles(java.util.List<AbstractAffineTile2D<?>> tiles,
                                              java.util.List<AbstractAffineTile2D<?>[]> tilePairs)
Search a List of Tiles for overlapping pairs. Adds the pairs into tilePairs.

Parameters:
tiles -
tilePairs -

pairTiles

public static final void pairTiles(java.util.List<AbstractAffineTile2D<?>> tilesA,
                                   java.util.List<AbstractAffineTile2D<?>> tilesB,
                                   java.util.List<AbstractAffineTile2D<?>[]> tilePairs)
Pair all Tiles from two Lists. Adds the pairs into tilePairs.

Parameters:
tilesA -
tilesB -
tilePairs -

pairOverlappingTiles

public static final void pairOverlappingTiles(java.util.List<AbstractAffineTile2D<?>> tilesA,
                                              java.util.List<AbstractAffineTile2D<?>> tilesB,
                                              java.util.List<AbstractAffineTile2D<?>[]> tilePairs)
Search two Lists of Tiles for overlapping pairs. Adds the pairs into tilePairs.

Parameters:
tilesA -
tilesB -
tilePairs -

commonPointMatches

public final void commonPointMatches(mpicbg.models.Tile<?> other,
                                     java.util.Collection<mpicbg.models.PointMatch> commonMatches)
Extract the common PointMatches of two tiles.

Parameters:
other -
commonMatches -