mpicbg.models
Class RigidModel3D

java.lang.Object
  extended by mpicbg.models.AbstractModel<M>
      extended by mpicbg.models.AbstractAffineModel3D<RigidModel3D>
          extended by mpicbg.models.RigidModel3D
All Implemented Interfaces:
Serializable, Affine3D<RigidModel3D>, Boundable, CoordinateTransform, InverseBoundable, InverseCoordinateTransform, InvertibleBoundable, InvertibleCoordinateTransform, Model<RigidModel3D>

public class RigidModel3D
extends AbstractAffineModel3D<RigidModel3D>
implements InvertibleBoundable

Author:
Johannes Schindelin, Stephan Preibisch , Stephan Saalfeld
See Also:
Serialized Form

Field Summary
protected  double i00
           
protected  double i01
           
protected  double i02
           
protected  double i03
           
protected  double i10
           
protected  double i11
           
protected  double i12
           
protected  double i13
           
protected  double i20
           
protected  double i21
           
protected  double i22
           
protected  double i23
           
protected  boolean isInvertible
           
protected  double m00
           
protected  double m01
           
protected  double m02
           
protected  double m03
           
protected  double m10
           
protected  double m11
           
protected  double m12
           
protected  double m13
           
protected  double m20
           
protected  double m21
           
protected  double m22
           
protected  double m23
           
protected static int MIN_NUM_MATCHES
           
 
Fields inherited from class mpicbg.models.AbstractModel
cost, rnd
 
Constructor Summary
RigidModel3D()
           
 
Method Summary
 double[] apply(double[] l)
          Apply the CoordinateTransform to a location.
 void applyInPlace(double[] l)
          Apply the CoordinateTransform to a location.
 double[] applyInverse(double[] l)
          Apply the inverse of the model to a point location
 void applyInverseInPlace(double[] l)
          apply the inverse of the model to a point location
 void concatenate(RigidModel3D model)
           
 void concatenate(TranslationModel3D model)
           
 RigidModel3D copy()
          Clone the model.
 RigidModel3D createInverse()
          TODO Not yet tested
<P extends PointMatch>
void
fit(Collection<P> matches)
          Fit the Model to a set of data points minimizing the global transfer error.
 double[] getMatrix(double[] m)
           
 int getMinNumMatches()
           
protected  void invert()
           
 void preConcatenate(RigidModel3D model)
           
 void preConcatenate(TranslationModel3D model)
           
 void rotate(int axis, double d)
          Rotate
 void set(double m00, double m01, double m02, double m03, double m10, double m11, double m12, double m13, double m20, double m21, double m22, double m23)
          Initialize the model such that the respective affine transform is:
 void set(RigidModel3D m)
          Set the model to m
 void toArray(double[] data)
          Write the 12 parameters of the affine into a double array.
 void toMatrix(double[][] data)
          Write the 12 parameters of the affine into a 4x3 double array.
 String toString()
           
 
Methods inherited from class mpicbg.models.AbstractAffineModel3D
estimateBounds, estimateInverseBounds
 
Methods inherited from class mpicbg.models.AbstractModel
betterThan, filter, filter, filter, filterRansac, filterRansac, filterRansac, filterRansac, fit, fit, getCost, icp, localSmoothnessFilter, ransac, ransac, setCost, test, test
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface mpicbg.models.Boundable
estimateBounds
 
Methods inherited from interface mpicbg.models.InverseBoundable
estimateInverseBounds
 

Field Detail

MIN_NUM_MATCHES

protected static final int MIN_NUM_MATCHES
See Also:
Constant Field Values

m00

protected double m00

m01

protected double m01

m02

protected double m02

m03

protected double m03

m10

protected double m10

m11

protected double m11

m12

protected double m12

m13

protected double m13

m20

protected double m20

m21

protected double m21

m22

protected double m22

m23

protected double m23

i00

protected double i00

i01

protected double i01

i02

protected double i02

i03

protected double i03

i10

protected double i10

i11

protected double i11

i12

protected double i12

i13

protected double i13

i20

protected double i20

i21

protected double i21

i22

protected double i22

i23

protected double i23

isInvertible

protected boolean isInvertible
Constructor Detail

RigidModel3D

public RigidModel3D()
Method Detail

getMatrix

public double[] getMatrix(double[] m)
Specified by:
getMatrix in class AbstractAffineModel3D<RigidModel3D>

getMinNumMatches

public final int getMinNumMatches()
Specified by:
getMinNumMatches in interface Model<RigidModel3D>

apply

public final double[] apply(double[] l)
Description copied from interface: CoordinateTransform
Apply the CoordinateTransform to a location.

Specified by:
apply in interface CoordinateTransform
Returns:
transformed location

applyInPlace

public final void applyInPlace(double[] l)
Description copied from interface: CoordinateTransform
Apply the CoordinateTransform to a location.

Specified by:
applyInPlace in interface CoordinateTransform

applyInverse

public final double[] applyInverse(double[] l)
                            throws NoninvertibleModelException
Description copied from interface: InverseCoordinateTransform
Apply the inverse of the model to a point location

Specified by:
applyInverse in interface InverseCoordinateTransform
Returns:
transformed point
Throws:
NoninvertibleModelException

applyInverseInPlace

public final void applyInverseInPlace(double[] l)
                               throws NoninvertibleModelException
Description copied from interface: InverseCoordinateTransform
apply the inverse of the model to a point location

Specified by:
applyInverseInPlace in interface InverseCoordinateTransform
Throws:
NoninvertibleModelException

toString

public final String toString()
Overrides:
toString in class Object

fit

public final <P extends PointMatch> void fit(Collection<P> matches)
               throws NotEnoughDataPointsException,
                      IllDefinedDataPointsException
Description copied from interface: Model
Fit the Model to a set of data points minimizing the global transfer error. This is assumed to be implemented as a weighted least squares minimization. Use ransac and/ or #filter(Class, Collection, Collection) to remove outliers from your data points The estimated model transfers match.p1.local to match.p2.world.

Specified by:
fit in interface Model<RigidModel3D>
Parameters:
matches - set of point correpondences
Throws:
NotEnoughDataPointsException
IllDefinedDataPointsException

set

public final void set(RigidModel3D m)
Description copied from interface: Model
Set the model to m

Specified by:
set in interface Model<RigidModel3D>

copy

public RigidModel3D copy()
Description copied from interface: Model
Clone the model.

Specified by:
copy in interface Model<RigidModel3D>

invert

protected void invert()

preConcatenate

public final void preConcatenate(RigidModel3D model)
Specified by:
preConcatenate in interface Affine3D<RigidModel3D>

concatenate

public final void concatenate(RigidModel3D model)
Specified by:
concatenate in interface Affine3D<RigidModel3D>

concatenate

public final void concatenate(TranslationModel3D model)

preConcatenate

public final void preConcatenate(TranslationModel3D model)

set

public final void set(double m00,
                      double m01,
                      double m02,
                      double m03,
                      double m10,
                      double m11,
                      double m12,
                      double m13,
                      double m20,
                      double m21,
                      double m22,
                      double m23)
Initialize the model such that the respective affine transform is:
 m00 m01 m02 m03
 m10 m11 m12 m13
 m20 m21 m22 m23
 0   0   0   1
 

Parameters:
m00 -
m01 -
m02 -
m03 -
m10 -
m11 -
m12 -
m13 -
m20 -
m21 -
m22 -
m23 -

createInverse

public RigidModel3D createInverse()
TODO Not yet tested

Specified by:
createInverse in interface Affine3D<RigidModel3D>
Specified by:
createInverse in interface InvertibleCoordinateTransform

rotate

public void rotate(int axis,
                   double d)
Rotate

Parameters:
axis - 0=x, 1=y, 2=z
d - angle in radians TODO Don't be lazy and do it directly on the values instead of creating another transform

toArray

public void toArray(double[] data)
Description copied from interface: Affine3D
Write the 12 parameters of the affine into a double array. The order is m00, m10, m20, m01, m11, m21, m02, m12, m22, m03, m13, m23

Specified by:
toArray in interface Affine3D<RigidModel3D>

toMatrix

public void toMatrix(double[][] data)
Description copied from interface: Affine3D
Write the 12 parameters of the affine into a 4x3 double array. The order is [0][0] -> m00; [0][1] -> m01; [0][2] -> m02; [0][3] -> m03 [1][0] -> m10; [1][1] -> m11; [1][2] -> m12; [1][3] -> m13 [2][0] -> m20; [2][1] -> m21; [2][2] -> m22; [2][3] -> m23

Specified by:
toMatrix in interface Affine3D<RigidModel3D>


Copyright © 2007-2016 Fiji. All Rights Reserved.