mpicbg.models
Class TranslationModel3D

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

public class TranslationModel3D
extends AbstractAffineModel3D<TranslationModel3D>
implements InvertibleBoundable

Author:
Stephan Saalfeld
See Also:
Serialized Form

Field Summary
protected static int MIN_NUM_MATCHES
           
protected  double[] translation
           
 
Fields inherited from class mpicbg.models.AbstractModel
cost, rnd
 
Constructor Summary
TranslationModel3D()
           
 
Method Summary
 double[] apply(double[] point)
          Apply the CoordinateTransform to a location.
 void applyInPlace(double[] point)
          Apply the CoordinateTransform to a location.
 double[] applyInverse(double[] point)
          Apply the inverse of the model to a point location
 void applyInverseInPlace(double[] point)
          apply the inverse of the model to a point location
 void concatenate(TranslationModel3D model)
           
 TranslationModel3D copy()
          Clone the model.
 TranslationModel3D createInverse()
          TODO Not yet tested
 void estimateBounds(double[] min, double[] max)
          Estimate the bounds of an n-dimensional interval [min,max] with min and max being n-dimensional vectors.
 void estimateInverseBounds(double[] min, double[] max)
          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()
           
 double[] getTranslation()
           
 void preConcatenate(TranslationModel3D model)
           
 void set(double tx, double ty, double tz)
           
 void set(TranslationModel3D 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.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
 

Field Detail

MIN_NUM_MATCHES

protected static final int MIN_NUM_MATCHES
See Also:
Constant Field Values

translation

protected final double[] translation
Constructor Detail

TranslationModel3D

public TranslationModel3D()
Method Detail

getMinNumMatches

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

getTranslation

public final double[] getTranslation()

apply

public final double[] apply(double[] point)
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[] point)
Description copied from interface: CoordinateTransform
Apply the CoordinateTransform to a location.

Specified by:
applyInPlace in interface CoordinateTransform

applyInverse

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

Specified by:
applyInverse in interface InverseCoordinateTransform
Returns:
transformed point

applyInverseInPlace

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

Specified by:
applyInverseInPlace in interface InverseCoordinateTransform

toString

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

fit

public final <P extends PointMatch> void fit(Collection<P> matches)
               throws NotEnoughDataPointsException
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<TranslationModel3D>
Parameters:
matches - set of point correpondences
Throws:
NotEnoughDataPointsException

set

public final void set(double tx,
                      double ty,
                      double tz)

set

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

Specified by:
set in interface Model<TranslationModel3D>

copy

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

Specified by:
copy in interface Model<TranslationModel3D>

createInverse

public TranslationModel3D createInverse()
TODO Not yet tested

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

estimateBounds

public void estimateBounds(double[] min,
                           double[] max)
Description copied from interface: Boundable
Estimate the bounds of an n-dimensional interval [min,max] with min and max being n-dimensional vectors.

Specified by:
estimateBounds in interface Boundable
Overrides:
estimateBounds in class AbstractAffineModel3D<TranslationModel3D>

estimateInverseBounds

public void estimateInverseBounds(double[] min,
                                  double[] max)
                           throws NoninvertibleModelException
Description copied from class: AbstractAffineModel3D
TODO not yet tested!

Specified by:
estimateInverseBounds in interface InverseBoundable
Overrides:
estimateInverseBounds in class AbstractAffineModel3D<TranslationModel3D>
Throws:
NoninvertibleModelException

preConcatenate

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

concatenate

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

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<TranslationModel3D>

getMatrix

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

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<TranslationModel3D>


Copyright © 2007-2016 Fiji. All Rights Reserved.