lenscorrection
Class NonLinearTransform

java.lang.Object
  extended by lenscorrection.NonLinearTransform
All Implemented Interfaces:
mpicbg.models.CoordinateTransform

public class NonLinearTransform
extends java.lang.Object
implements CoordinateTransform


Constructor Summary
NonLinearTransform()
           
NonLinearTransform(double[][] b, double[] nm, double[] nv, int d, int w, int h)
           
NonLinearTransform(double[][] coeffMatrix, int w, int h)
           
NonLinearTransform(int d, int w, int h)
           
NonLinearTransform(java.lang.String filename)
           
 
Method Summary
 float[] apply(float[] location)
           
 void applyInPlace(float[] location)
           
 NonLinearTransform copy()
           
static void drawGrid(java.awt.geom.GeneralPath g, double[][] points, int count, int s)
           
static void drawQuiverField(java.awt.geom.GeneralPath qf, double x1, double y1, double x2, double y2)
           
 void estimateDistortion(double[][] hack1, double[][] hack2, double[][] transformParams, double lambda, int w, int h)
           
 void fit(double[][] x, double[][] y, double lambda)
           
 double[][] getCoefficients()
           
 int getDimension()
           
 int getHeight()
           
 int getMinNumMatches()
           
 int getWidth()
           
 void init(java.lang.String data)
          Initialize the properties of the CoordinateTransform from a data string as generated by #toString().
 void inverseTransform(double[][] range)
           
 double[] kernelExpand(double[] position)
           
 double[][] kernelExpandMatrix(double[][] positions)
           
 double[][] kernelExpandMatrixNormalize(double[][] positions)
           
 void load(java.lang.String filename)
           
 void print()
           
 void save(java.lang.String filename)
           
 void set(NonLinearTransform nlt)
           
 void setBeta(double[][] b)
           
 void setDimension(int dimension)
          Deletes all dimension dependent properties
 java.lang.String toDataString()
          Create a String representation of the properties of the CoordinateTransform that can be used to re-create itself with CoordinateTransform.init(String).
 java.lang.String toString()
           
 java.lang.String toXML(java.lang.String indent)
          Create an XML-export of the CoordinateTransform for use in TrakEM2.
 ij.process.ImageProcessor[] transform(ij.process.ImageProcessor ip)
           
 void visualize()
           
 void visualizeSmall(double lambda)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NonLinearTransform

public NonLinearTransform(double[][] b,
                          double[] nm,
                          double[] nv,
                          int d,
                          int w,
                          int h)

NonLinearTransform

public NonLinearTransform(int d,
                          int w,
                          int h)

NonLinearTransform

public NonLinearTransform()

NonLinearTransform

public NonLinearTransform(java.lang.String filename)

NonLinearTransform

public NonLinearTransform(double[][] coeffMatrix,
                          int w,
                          int h)
Method Detail

getDimension

public int getDimension()

setDimension

public void setDimension(int dimension)
Deletes all dimension dependent properties


getMinNumMatches

public int getMinNumMatches()

fit

public void fit(double[][] x,
                double[][] y,
                double lambda)

estimateDistortion

public void estimateDistortion(double[][] hack1,
                               double[][] hack2,
                               double[][] transformParams,
                               double lambda,
                               int w,
                               int h)

init

public void init(java.lang.String data)
          throws java.lang.NumberFormatException
Description copied from interface: CoordinateTransform
Initialize the properties of the CoordinateTransform from a data string as generated by #toString().

Throws:
java.lang.NumberFormatException

toXML

public java.lang.String toXML(java.lang.String indent)
Description copied from interface: CoordinateTransform
Create an XML-export of the CoordinateTransform for use in TrakEM2.

Returns:
TrakEM2-readable XML

toDataString

public java.lang.String toDataString()
Description copied from interface: CoordinateTransform
Create a String representation of the properties of the CoordinateTransform that can be used to re-create itself with CoordinateTransform.init(String).

Returns:

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

apply

public float[] apply(float[] location)
Specified by:
apply in interface mpicbg.models.CoordinateTransform

applyInPlace

public void applyInPlace(float[] location)
Specified by:
applyInPlace in interface mpicbg.models.CoordinateTransform

getCoefficients

public double[][] getCoefficients()

setBeta

public void setBeta(double[][] b)

print

public void print()

save

public void save(java.lang.String filename)

load

public void load(java.lang.String filename)

transform

public ij.process.ImageProcessor[] transform(ij.process.ImageProcessor ip)

kernelExpand

public double[] kernelExpand(double[] position)

kernelExpandMatrixNormalize

public double[][] kernelExpandMatrixNormalize(double[][] positions)

kernelExpandMatrix

public double[][] kernelExpandMatrix(double[][] positions)

inverseTransform

public void inverseTransform(double[][] range)

visualize

public void visualize()

visualizeSmall

public void visualizeSmall(double lambda)

drawGrid

public static void drawGrid(java.awt.geom.GeneralPath g,
                            double[][] points,
                            int count,
                            int s)

drawQuiverField

public static void drawQuiverField(java.awt.geom.GeneralPath qf,
                                   double x1,
                                   double y1,
                                   double x2,
                                   double y2)

getWidth

public int getWidth()

getHeight

public int getHeight()

copy

public final NonLinearTransform copy()

set

public void set(NonLinearTransform nlt)