vib

## Class FastMatrix

• Direct Known Subclasses:
FastMatrixTransform

```public class FastMatrix
extends Object```
• ### Field Summary

Fields
Modifier and Type Field and Description
`protected double` `a00`
`protected double` `a01`
`protected double` `a02`
`protected double` `a03`
`protected double` `a10`
`protected double` `a11`
`protected double` `a12`
`protected double` `a13`
`protected double` `a20`
`protected double` `a21`
`protected double` `a22`
`protected double` `a23`
`double` `x`
`double` `y`
`double` `z`
• ### Constructor Summary

Constructors
Constructor and Description
`FastMatrix()`
`FastMatrix(double f)`
`FastMatrix(double[][] m)`
`FastMatrix(FastMatrix f)`
• ### Method Summary

All Methods
Modifier and Type Method and Description
`static double` ```angleBetween(double[] v1, double[] v2)```
`void` `apply(double[] p)`
`void` ```apply(double x, double y, double z)```
`void` `apply(Point3d p)`
`void` ```applyWithoutTranslation(double x, double y, double z)```
`void` `applyWithoutTranslation(Point3d p)`
`static FastMatrix` `average(FastMatrix[] array)`
`static FastMatrix` ```bestLinear(Point3d[] x, Point3d[] y)```
`static FastMatrix` ```bestRigid(Point3d[] set1, Point3d[] set2)```
Find the best rigid transformation from set1 to set2.
`static FastMatrix` ```bestRigid(Point3d[] set1, Point3d[] set2, boolean allowScaling)```
`FastMatrix` `composeWith(FastMatrix followedBy)`
`FastMatrix` `copyFrom(FloatMatrix f)`
`void` `copyToFlatDoubleArray(double[] result)`
`static double[]` ```crossProduct(double[] a, double[] b)```
`FastMatrix[]` `decompose()`
`double` `det()`
`static double` ```dotProduct(double[] a, double[] b)```
`boolean` `equals(FastMatrix other)`
`static FastMatrix` `fromCalibration(ImagePlus image)`
`Point3d` `getResult()`
`void` `guessEulerParameters(double[] parameters)`
`void` ```guessEulerParameters(double[] parameters, Point3d center)```
`FastMatrix` `inverse()`
`boolean` `isIdentity()`
`boolean` `isIdentity(double eps)`
`boolean` `isJustTranslation()`
`static void` `main(String[] args)`
`static double[]` `normalize(double[] a)`
`boolean` `noTranslation()`
`static FastMatrix[]` `parseMatrices(String m)`
`static FastMatrix` `parseMatrix(String m)`
`FastMatrix` `plus(FastMatrix other)`
`String` `resultToString()`
`static FastMatrix` ```rotate(double angle, int axis)```
`static FastMatrix` ```rotateAround(double nx, double ny, double nz, double angle)```
`static FastMatrix` ```rotateEuler(double a1, double a2, double a3)```
`static FastMatrix` ```rotateEulerAt(double a1, double a2, double a3, double cx, double cy, double cz)```
`static FastMatrix` ```rotateFromTo(double aX, double aY, double aZ, double bX, double bY, double bZ)```
`static FastMatrix` ```rotateToAlignVectors(double[] v2_template, double[] v1_template, double[] v2_domain, double[] v1_domain)```
`double[]` `rowwise16()`
`FastMatrix` ```scale(double x, double y, double z)```
`void` `setFromFlatDoubleArray(double[] result)`
`static double` `size(double[] a)`
`static double` `sizeSquared(double[] a)`
`FastMatrix` `times(FastMatrix o)`
`String` `toString()`
`String` `toStringForAmira()`
`String` `toStringIndented(String indent)`
`static FastMatrix` ```translate(double x, double y, double z)```
`static FastMatrix` `translateToCenter(ImagePlus image)`
• ### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`
• ### Field Detail

• #### x

`public double x`
• #### y

`public double y`
• #### z

`public double z`
• #### a00

`protected double a00`
• #### a01

`protected double a01`
• #### a02

`protected double a02`
• #### a03

`protected double a03`
• #### a10

`protected double a10`
• #### a11

`protected double a11`
• #### a12

`protected double a12`
• #### a13

`protected double a13`
• #### a20

`protected double a20`
• #### a21

`protected double a21`
• #### a22

`protected double a22`
• #### a23

`protected double a23`
• ### Constructor Detail

• #### FastMatrix

`public FastMatrix()`
• #### FastMatrix

`public FastMatrix(double f)`
• #### FastMatrix

`public FastMatrix(double[][] m)`
• #### FastMatrix

`public FastMatrix(FastMatrix f)`
• ### Method Detail

• #### copyFrom

`public FastMatrix copyFrom(FloatMatrix f)`
• #### isJustTranslation

`public boolean isJustTranslation()`
• #### noTranslation

`public boolean noTranslation()`
• #### composeWith

`public FastMatrix composeWith(FastMatrix followedBy)`
• #### decompose

`public FastMatrix[] decompose()`
• #### plus

`public FastMatrix plus(FastMatrix other)`
• #### apply

```public void apply(double x,
double y,
double z)```
• #### apply

`public void apply(Point3d p)`
• #### apply

`public void apply(double[] p)`
• #### applyWithoutTranslation

```public void applyWithoutTranslation(double x,
double y,
double z)```
• #### applyWithoutTranslation

`public void applyWithoutTranslation(Point3d p)`
• #### getResult

`public Point3d getResult()`
• #### scale

```public FastMatrix scale(double x,
double y,
double z)```
• #### times

`public FastMatrix times(FastMatrix o)`
• #### det

`public double det()`
• #### inverse

`public FastMatrix inverse()`
• #### rotate

```public static FastMatrix rotate(double angle,
int axis)```
• #### rotateFromTo

```public static FastMatrix rotateFromTo(double aX,
double aY,
double aZ,
double bX,
double bY,
double bZ)```
• #### dotProduct

```public static double dotProduct(double[] a,
double[] b)```
• #### sizeSquared

`public static double sizeSquared(double[] a)`
• #### size

`public static double size(double[] a)`
• #### angleBetween

```public static double angleBetween(double[] v1,
double[] v2)```
• #### crossProduct

```public static double[] crossProduct(double[] a,
double[] b)```
• #### normalize

`public static double[] normalize(double[] a)`
• #### rotateToAlignVectors

```public static FastMatrix rotateToAlignVectors(double[] v2_template,
double[] v1_template,
double[] v2_domain,
double[] v1_domain)```
• #### rotateAround

```public static FastMatrix rotateAround(double nx,
double ny,
double nz,
double angle)```
• #### rotateEuler

```public static FastMatrix rotateEuler(double a1,
double a2,
double a3)```
• #### rotateEulerAt

```public static FastMatrix rotateEulerAt(double a1,
double a2,
double a3,
double cx,
double cy,
double cz)```
• #### guessEulerParameters

`public void guessEulerParameters(double[] parameters)`
• #### guessEulerParameters

```public void guessEulerParameters(double[] parameters,
Point3d center)```
• #### translate

```public static FastMatrix translate(double x,
double y,
double z)```
• #### bestLinear

```public static FastMatrix bestLinear(Point3d[] x,
Point3d[] y)```
• #### bestRigid

```public static FastMatrix bestRigid(Point3d[] set1,
Point3d[] set2)```
Find the best rigid transformation from set1 to set2. This function uses the method by Horn, using quaternions: Closed-form solution of absolute orientation using unit quaternions, Horn, B. K. P., Journal of the Optical Society of America A, Vol. 4, page 629, April 1987
• #### bestRigid

```public static FastMatrix bestRigid(Point3d[] set1,
Point3d[] set2,
boolean allowScaling)```
• #### average

`public static FastMatrix average(FastMatrix[] array)`
• #### rowwise16

`public double[] rowwise16()`
• #### parseMatrix

`public static FastMatrix parseMatrix(String m)`
• #### parseMatrices

`public static FastMatrix[] parseMatrices(String m)`
• #### fromCalibration

`public static FastMatrix fromCalibration(ImagePlus image)`
• #### translateToCenter

`public static FastMatrix translateToCenter(ImagePlus image)`
• #### isIdentity

`public final boolean isIdentity()`
• #### equals

`public final boolean equals(FastMatrix other)`
• #### isIdentity

`public final boolean isIdentity(double eps)`
• #### copyToFlatDoubleArray

`public void copyToFlatDoubleArray(double[] result)`
• #### setFromFlatDoubleArray

`public void setFromFlatDoubleArray(double[] result)`
• #### resultToString

`public String resultToString()`
• #### toStringIndented

`public String toStringIndented(String indent)`
• #### toString

`public String toString()`
Overrides:
`toString` in class `Object`
• #### toStringForAmira

`public String toStringForAmira()`
• #### main

`public static void main(String[] args)`