mpicbg.ij
Class TransformMeshMapping<T extends TransformMesh>

java.lang.Object
  extended by mpicbg.ij.InvertibleTransformMapping<T>
      extended by mpicbg.ij.TransformMeshMapping<T>
All Implemented Interfaces:
InverseMapping<T>, InvertibleMapping<T>, Mapping<T>

public class TransformMeshMapping<T extends TransformMesh>
extends InvertibleTransformMapping<T>

Use a TransformMesh to map and map inversely source into target which is an InvertibleMapping.

Version:
0.1b
Author:
Stephan Saalfeld

Field Summary
 
Fields inherited from class mpicbg.ij.InvertibleTransformMapping
transform
 
Constructor Summary
TransformMeshMapping(T t)
           
 
Method Summary
protected static void calculateBoundingBox(ArrayList<PointMatch> pm, double[] min, double[] max)
           
protected static void calculateBoundingBoxInverse(ArrayList<PointMatch> pm, double[] min, double[] max)
           
protected static boolean isInTriangle(double ax, double ay, double bx, double by, double cx, double cy, double tx, double ty)
          Checks if a location is inside a given triangle.
 void map(ImageProcessor source, ImageProcessor target)
          Map source into target
 void map(ImageProcessor source, ImageProcessor target, int numThreads)
           
 void mapInterpolated(ImageProcessor source, ImageProcessor target)
          Map source into target using bilinear interpolation.
 void mapInterpolated(ImageProcessor source, ImageProcessor target, int numThreads)
           
 void mapInverse(ImageProcessor source, ImageProcessor target)
          Map inversely source into target
 void mapInverse(ImageProcessor source, ImageProcessor target, int numThreads)
           
 void mapInverseInterpolated(ImageProcessor source, ImageProcessor target)
          Map inversely source into target using bilinear interpolation.
 void mapInverseInterpolated(ImageProcessor source, ImageProcessor target, int numThreads)
           
protected static void mapTriangle(TransformMesh m, AffineModel2D ai, ImageProcessor source, ImageProcessor target)
           
protected static void mapTriangleInterpolated(TransformMesh m, AffineModel2D ai, ImageProcessor source, ImageProcessor target)
           
protected static void mapTriangleInverse(TransformMesh m, AffineModel2D ai, ImageProcessor source, ImageProcessor target)
           
protected static void mapTriangleInverseInterpolated(TransformMesh m, AffineModel2D ai, ImageProcessor source, ImageProcessor target)
           
 
Methods inherited from class mpicbg.ij.InvertibleTransformMapping
getTransform
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransformMeshMapping

public TransformMeshMapping(T t)
Method Detail

calculateBoundingBox

protected static final void calculateBoundingBox(ArrayList<PointMatch> pm,
                                                 double[] min,
                                                 double[] max)
Parameters:
pm - PointMatches
min - x = min[0], y = min[1]
max - x = max[0], y = max[1]

isInTriangle

protected static final boolean isInTriangle(double ax,
                                            double ay,
                                            double bx,
                                            double by,
                                            double cx,
                                            double cy,
                                            double tx,
                                            double ty)
Checks if a location is inside a given triangle.

Parameters:
pm -
t -
Returns:

mapTriangle

protected static final void mapTriangle(TransformMesh m,
                                        AffineModel2D ai,
                                        ImageProcessor source,
                                        ImageProcessor target)

mapTriangleInterpolated

protected static final void mapTriangleInterpolated(TransformMesh m,
                                                    AffineModel2D ai,
                                                    ImageProcessor source,
                                                    ImageProcessor target)

map

public final void map(ImageProcessor source,
                      ImageProcessor target,
                      int numThreads)

map

public final void map(ImageProcessor source,
                      ImageProcessor target)
Description copied from interface: Mapping
Map source into target

Specified by:
map in interface Mapping<T extends TransformMesh>
Overrides:
map in class InvertibleTransformMapping<T extends TransformMesh>

mapInterpolated

public final void mapInterpolated(ImageProcessor source,
                                  ImageProcessor target,
                                  int numThreads)

mapInterpolated

public final void mapInterpolated(ImageProcessor source,
                                  ImageProcessor target)
Description copied from interface: Mapping
Map source into target using bilinear interpolation.

Specified by:
mapInterpolated in interface Mapping<T extends TransformMesh>
Overrides:
mapInterpolated in class InvertibleTransformMapping<T extends TransformMesh>

calculateBoundingBoxInverse

protected static final void calculateBoundingBoxInverse(ArrayList<PointMatch> pm,
                                                        double[] min,
                                                        double[] max)
Parameters:
pm - PointMatches
min - x = min[0], y = min[1]
max - x = max[0], y = max[1]

mapTriangleInverse

protected static final void mapTriangleInverse(TransformMesh m,
                                               AffineModel2D ai,
                                               ImageProcessor source,
                                               ImageProcessor target)

mapTriangleInverseInterpolated

protected static final void mapTriangleInverseInterpolated(TransformMesh m,
                                                           AffineModel2D ai,
                                                           ImageProcessor source,
                                                           ImageProcessor target)

mapInverse

public final void mapInverse(ImageProcessor source,
                             ImageProcessor target,
                             int numThreads)

mapInverse

public final void mapInverse(ImageProcessor source,
                             ImageProcessor target)
Description copied from interface: InverseMapping
Map inversely source into target

Specified by:
mapInverse in interface InverseMapping<T extends TransformMesh>
Overrides:
mapInverse in class InvertibleTransformMapping<T extends TransformMesh>

mapInverseInterpolated

public final void mapInverseInterpolated(ImageProcessor source,
                                         ImageProcessor target,
                                         int numThreads)

mapInverseInterpolated

public final void mapInverseInterpolated(ImageProcessor source,
                                         ImageProcessor target)
Description copied from interface: InverseMapping
Map inversely source into target using bilinear interpolation.

Specified by:
mapInverseInterpolated in interface InverseMapping<T extends TransformMesh>
Overrides:
mapInverseInterpolated in class InvertibleTransformMapping<T extends TransformMesh>


Copyright © 2007-2016 Fiji. All Rights Reserved.