mpicbg.trakem2.align
Class AlignTask

java.lang.Object
  extended by mpicbg.trakem2.align.AlignTask

public final class AlignTask
extends java.lang.Object

Methods collection to be called from the GUI for alignment tasks.


Nested Class Summary
static class AlignTask.ReferenceData
           
 
Field Summary
protected static boolean deform
           
protected static boolean deleteDisconnectedTiles
           
protected static boolean hideDisconnectedTiles
           
protected static boolean largestGraphOnly
           
static Align.ParamOptimize p_snap
          The ParamOptimize object containg all feature extraction and registration model parameters for the "snap" function.
protected static boolean tilesAreInPlace
           
 
Constructor Summary
AlignTask()
           
 
Method Summary
static void alignMultiLayerMosaic(Layer l, Patch nail)
          Align a multi-layer mosaic.
static Bureaucrat alignMultiLayerMosaicTask(Layer l)
           
static Bureaucrat alignMultiLayerMosaicTask(Layer l, Patch nail)
           
static void alignMultiLayerMosaicTask(java.util.List<Layer> layerRange, Patch nail, Align.Param cp, Align.ParamOptimize p, Align.ParamOptimize pcp, boolean tilesAreInPlace, boolean largestGraphOnly, boolean hideDisconnectedTiles, boolean deleteDisconnectedTiles, boolean deform)
           
static void alignPatches(Align.ParamOptimize p, java.util.List<Patch> patches, java.util.List<Patch> fixedPatches, boolean tilesAreInPlace, boolean largestGraphOnly, boolean hideDisconnectedTiles, boolean deleteDisconnectedTiles)
           
static void alignPatches(java.util.List<Patch> patches, java.util.List<Patch> fixedPatches)
           
static Bureaucrat alignPatchesTask(java.util.List<Patch> patches, java.util.List<Patch> fixedPatches)
           
static void alignSelection(Selection selection)
           
static Bureaucrat alignSelectionTask(Selection selection)
           
static void alignTiles(Align.ParamOptimize p, java.util.List<AbstractAffineTile2D<?>> tiles, java.util.List<AbstractAffineTile2D<?>> fixedTiles, boolean tilesAreInPlace, boolean largestGraphOnly, boolean hideDisconnectedTiles, boolean deleteDisconnectedTiles)
           
static AlignTask.ReferenceData createTransformPropertiesTable(java.util.List<Displayable> src_vdata, java.util.List<Displayable> tgt_vdata, java.util.Set<java.lang.Long> lids_to_operate)
          Creates a map only for visible patches that intersect vdata.
static void montageLayers(Align.ParamOptimize p, java.util.List<Layer> layers, boolean tilesAreInPlace, boolean largestGraphOnly, boolean hideDisconnectedTiles, boolean deleteDisconnectedTiles)
           
static Bureaucrat montageLayersTask(java.util.List<Layer> layers)
          Montage each layer independently, with SIFT.
static Bureaucrat registerStackSlices(Patch slice)
           
static Bureaucrat snap(Patch patch, Align.ParamOptimize p_snap, boolean setup)
          Find the most overlapping image to @param patch in the same layer where @param patch sits, and snap @param patch and all its linked Displayable objects.
static void transformPatchesAndVectorData(java.util.Collection<Patch> patches, java.lang.Runnable alignment)
          For registering within the same project instance.
static void transformPatchesAndVectorData(Layer layer, java.awt.geom.AffineTransform a)
           
static void transformVectorData(AlignTask.ReferenceData rd, java.util.Collection<Displayable> vdata, LayerSet target_layerset)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tilesAreInPlace

protected static boolean tilesAreInPlace

largestGraphOnly

protected static boolean largestGraphOnly

hideDisconnectedTiles

protected static boolean hideDisconnectedTiles

deleteDisconnectedTiles

protected static boolean deleteDisconnectedTiles

deform

protected static boolean deform

p_snap

public static final Align.ParamOptimize p_snap
The ParamOptimize object containg all feature extraction and registration model parameters for the "snap" function.

Constructor Detail

AlignTask

public AlignTask()
Method Detail

alignSelectionTask

public static final Bureaucrat alignSelectionTask(Selection selection)

alignSelection

public static final void alignSelection(Selection selection)

alignPatchesTask

public static final Bureaucrat alignPatchesTask(java.util.List<Patch> patches,
                                                java.util.List<Patch> fixedPatches)

alignPatches

public static final void alignPatches(java.util.List<Patch> patches,
                                      java.util.List<Patch> fixedPatches)
Parameters:
patches: - the list of Patch instances to align, all belonging to the same Layer.
fixed: - the list of Patch instances to keep locked in place, if any.

montageLayersTask

public static final Bureaucrat montageLayersTask(java.util.List<Layer> layers)
Montage each layer independently, with SIFT. Does NOT register layers to each other. Considers visible Patches only.


montageLayers

public static final void montageLayers(Align.ParamOptimize p,
                                       java.util.List<Layer> layers,
                                       boolean tilesAreInPlace,
                                       boolean largestGraphOnly,
                                       boolean hideDisconnectedTiles,
                                       boolean deleteDisconnectedTiles)

transformPatchesAndVectorData

public static final void transformPatchesAndVectorData(Layer layer,
                                                       java.awt.geom.AffineTransform a)

createTransformPropertiesTable

public static final AlignTask.ReferenceData createTransformPropertiesTable(java.util.List<Displayable> src_vdata,
                                                                           java.util.List<Displayable> tgt_vdata,
                                                                           java.util.Set<java.lang.Long> lids_to_operate)
Creates a map only for visible patches that intersect vdata.

Parameters:
src_vdata - represents the VectorData instances in original form, of the original project and layer set.
tgt_data - if not null, it must have the same size as src_data and their elements correspond one-to-one (as in, tgt element a clone of src element at the same index).
lids_to_operate - The id of the layers on which any operation will be done tgt_data enables transformVectorData to apply the transforms to copies of the src_vdata in another project.

transformPatchesAndVectorData

public static final void transformPatchesAndVectorData(java.util.Collection<Patch> patches,
                                                       java.lang.Runnable alignment)
For registering within the same project instance.


transformVectorData

public static final void transformVectorData(AlignTask.ReferenceData rd,
                                             java.util.Collection<Displayable> vdata,
                                             LayerSet target_layerset)

alignPatches

public static final void alignPatches(Align.ParamOptimize p,
                                      java.util.List<Patch> patches,
                                      java.util.List<Patch> fixedPatches,
                                      boolean tilesAreInPlace,
                                      boolean largestGraphOnly,
                                      boolean hideDisconnectedTiles,
                                      boolean deleteDisconnectedTiles)

alignTiles

public static final void alignTiles(Align.ParamOptimize p,
                                    java.util.List<AbstractAffineTile2D<?>> tiles,
                                    java.util.List<AbstractAffineTile2D<?>> fixedTiles,
                                    boolean tilesAreInPlace,
                                    boolean largestGraphOnly,
                                    boolean hideDisconnectedTiles,
                                    boolean deleteDisconnectedTiles)

alignMultiLayerMosaicTask

public static final Bureaucrat alignMultiLayerMosaicTask(Layer l)

alignMultiLayerMosaicTask

public static final Bureaucrat alignMultiLayerMosaicTask(Layer l,
                                                         Patch nail)

alignMultiLayerMosaic

public static final void alignMultiLayerMosaic(Layer l,
                                               Patch nail)
Align a multi-layer mosaic.

Parameters:
l - the current layer

alignMultiLayerMosaicTask

public static final void alignMultiLayerMosaicTask(java.util.List<Layer> layerRange,
                                                   Patch nail,
                                                   Align.Param cp,
                                                   Align.ParamOptimize p,
                                                   Align.ParamOptimize pcp,
                                                   boolean tilesAreInPlace,
                                                   boolean largestGraphOnly,
                                                   boolean hideDisconnectedTiles,
                                                   boolean deleteDisconnectedTiles,
                                                   boolean deform)

snap

public static final Bureaucrat snap(Patch patch,
                                    Align.ParamOptimize p_snap,
                                    boolean setup)
Find the most overlapping image to @param patch in the same layer where @param patch sits, and snap @param patch and all its linked Displayable objects. If a null @param p_snap is given, it will use the AlignTask.p_snap. If @param setup is true, it will show a dialog to adjust parameters.


registerStackSlices

public static final Bureaucrat registerStackSlices(Patch slice)