ini.trakem2.vector
Class SkinMaker

java.lang.Object
  extended by ini.trakem2.vector.SkinMaker

public class SkinMaker
extends java.lang.Object


Nested Class Summary
static class SkinMaker.Match
          Tuple to avoid ugly castings.
 
Method Summary
static java.util.List<javax.vecmath.Point3f> generateTriangles(VectorString2D[] vs, int n_morphed_perimeters, double delta_, boolean closed)
          From an array of VectorString2D, obtain a list of Point3f which define, every three, a triangle of a skin.
static double[][] getMorphedPerimeter(VectorString2D vs1, VectorString2D vs2, double alpha, Editions ed)
          Returns a weighted VectorString2D.
static java.util.ArrayList<SkinMaker.Match> getMorphedPerimeters(VectorString2D[] vs, int n_morphed_perimeters, double delta_, boolean closed)
          From an array of VectorString2D, return a new array of VectorString2D defining all necessary intermediate, morphed perimeters that describe a skin between each consecutive pair; includes the originals inserted at the proper locations.
static double[][][] getMorphedPerimeters(VectorString2D vs1, VectorString2D vs2, int n_morphed_perimeters, Editions ed)
          From two VectorString2D, return an array of x,y points ( in the form [2][n] ) defining all necessary intermediate, morphed perimeters that describe a skin between them (not including the two VectorString2D)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getMorphedPerimeter

public static double[][] getMorphedPerimeter(VectorString2D vs1,
                                             VectorString2D vs2,
                                             double alpha,
                                             Editions ed)
Returns a weighted VectorString2D. @param alpha is the weight, between 0 and 1.


getMorphedPerimeters

public static double[][][] getMorphedPerimeters(VectorString2D vs1,
                                                VectorString2D vs2,
                                                int n_morphed_perimeters,
                                                Editions ed)
From two VectorString2D, return an array of x,y points ( in the form [2][n] ) defining all necessary intermediate, morphed perimeters that describe a skin between them (not including the two VectorString2D)


getMorphedPerimeters

public static java.util.ArrayList<SkinMaker.Match> getMorphedPerimeters(VectorString2D[] vs,
                                                                        int n_morphed_perimeters,
                                                                        double delta_,
                                                                        boolean closed)
From an array of VectorString2D, return a new array of VectorString2D defining all necessary intermediate, morphed perimeters that describe a skin between each consecutive pair; includes the originals inserted at the proper locations. The 'z' is interpolated. Returns the array of VectorString2D and the array of Editions (which is one item smaller, since it represents matches).


generateTriangles

public static java.util.List<javax.vecmath.Point3f> generateTriangles(VectorString2D[] vs,
                                                                      int n_morphed_perimeters,
                                                                      double delta_,
                                                                      boolean closed)
From an array of VectorString2D, obtain a list of Point3f which define, every three, a triangle of a skin.