mpicbg.models
Class InterpolatedAffineModel3D<A extends Model<A> & Affine3D<A>,B extends Model<B> & Affine3D<B>>

java.lang.Object
  extended by mpicbg.models.AbstractModel<M>
      extended by mpicbg.models.InterpolatedModel<A,B,M>
          extended by mpicbg.models.InvertibleInterpolatedModel<A,B,InterpolatedAffineModel3D<A,B>>
              extended by mpicbg.models.InterpolatedAffineModel3D<A,B>
All Implemented Interfaces:
Serializable, Affine3D<InterpolatedAffineModel3D<A,B>>, Boundable, CoordinateTransform, InverseBoundable, InverseCoordinateTransform, InvertibleBoundable, InvertibleCoordinateTransform, Model<InterpolatedAffineModel3D<A,B>>

public final class InterpolatedAffineModel3D<A extends Model<A> & Affine3D<A>,B extends Model<B> & Affine3D<B>>
extends InvertibleInterpolatedModel<A,B,InterpolatedAffineModel3D<A,B>>
implements Affine3D<InterpolatedAffineModel3D<A,B>>, InvertibleBoundable

3D affine specialization of InterpolatedModel. Implements interpolation directly by linear matrix interpolation.

Author:
Stephan Saalfeld
See Also:
Serialized Form

Field Summary
protected  AffineModel3D affine
           
protected  double[] afs
           
protected  double[] bfs
           
 
Fields inherited from class mpicbg.models.InterpolatedModel
a, b, l1, lambda
 
Fields inherited from class mpicbg.models.AbstractModel
cost, rnd
 
Constructor Summary
InterpolatedAffineModel3D(A model, B regularizer, double lambda)
           
 
Method Summary
 double[] apply(double[] location)
          Apply the CoordinateTransform to a location.
 void applyInPlace(double[] location)
          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(InterpolatedAffineModel3D<A,B> affine3d)
           
 InterpolatedAffineModel3D<A,B> copy()
          Clone the model.
 AffineModel3D createAffineModel3D()
           
 InterpolatedAffineModel3D<A,B> createInverse()
           
 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)
          Estimate the bounds of an n-dimensional interval [min,max] with min and max being n-dimensional vectors.
<P extends PointMatch>
void
fit(Collection<P> matches)
          Fit the Model to a set of data points minimizing the global transfer error.
protected  void interpolate()
           
 void preConcatenate(InterpolatedAffineModel3D<A,B> affine3d)
           
 void set(InterpolatedAffineModel3D<A,B> 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.
 
Methods inherited from class mpicbg.models.InterpolatedModel
getA, getB, getLambda, getMinNumMatches, setLambda
 
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, toString, wait, wait, wait
 

Field Detail

affine

protected final AffineModel3D affine

afs

protected final double[] afs

bfs

protected final double[] bfs
Constructor Detail

InterpolatedAffineModel3D

public InterpolatedAffineModel3D(A model,
                                 B regularizer,
                                 double lambda)
Method Detail

interpolate

protected void interpolate()

fit

public <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<InterpolatedAffineModel3D<A extends Model<A> & Affine3D<A>,B extends Model<B> & Affine3D<B>>>
Overrides:
fit in class InterpolatedModel<A extends Model<A> & Affine3D<A>,B extends Model<B> & Affine3D<B>,InterpolatedAffineModel3D<A extends Model<A> & Affine3D<A>,B extends Model<B> & Affine3D<B>>>
Parameters:
matches - set of point correpondences
Throws:
NotEnoughDataPointsException
IllDefinedDataPointsException

set

public void set(InterpolatedAffineModel3D<A,B> m)
Description copied from interface: Model
Set the model to m

Specified by:
set in interface Model<InterpolatedAffineModel3D<A extends Model<A> & Affine3D<A>,B extends Model<B> & Affine3D<B>>>
Overrides:
set in class InterpolatedModel<A extends Model<A> & Affine3D<A>,B extends Model<B> & Affine3D<B>,InterpolatedAffineModel3D<A extends Model<A> & Affine3D<A>,B extends Model<B> & Affine3D<B>>>

copy

public InterpolatedAffineModel3D<A,B> copy()
Description copied from interface: Model
Clone the model.

Specified by:
copy in interface Model<InterpolatedAffineModel3D<A extends Model<A> & Affine3D<A>,B extends Model<B> & Affine3D<B>>>
Overrides:
copy in class InvertibleInterpolatedModel<A extends Model<A> & Affine3D<A>,B extends Model<B> & Affine3D<B>,InterpolatedAffineModel3D<A extends Model<A> & Affine3D<A>,B extends Model<B> & Affine3D<B>>>

apply

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

Specified by:
apply in interface CoordinateTransform
Overrides:
apply in class InterpolatedModel<A extends Model<A> & Affine3D<A>,B extends Model<B> & Affine3D<B>,InterpolatedAffineModel3D<A extends Model<A> & Affine3D<A>,B extends Model<B> & Affine3D<B>>>
Returns:
transformed location

applyInPlace

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

Specified by:
applyInPlace in interface CoordinateTransform
Overrides:
applyInPlace in class InterpolatedModel<A extends Model<A> & Affine3D<A>,B extends Model<B> & Affine3D<B>,InterpolatedAffineModel3D<A extends Model<A> & Affine3D<A>,B extends Model<B> & Affine3D<B>>>

applyInverse

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

Specified by:
applyInverse in interface InverseCoordinateTransform
Overrides:
applyInverse in class InvertibleInterpolatedModel<A extends Model<A> & Affine3D<A>,B extends Model<B> & Affine3D<B>,InterpolatedAffineModel3D<A extends Model<A> & Affine3D<A>,B extends Model<B> & Affine3D<B>>>
Returns:
transformed point
Throws:
NoninvertibleModelException

applyInverseInPlace

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

Specified by:
applyInverseInPlace in interface InverseCoordinateTransform
Overrides:
applyInverseInPlace in class InvertibleInterpolatedModel<A extends Model<A> & Affine3D<A>,B extends Model<B> & Affine3D<B>,InterpolatedAffineModel3D<A extends Model<A> & Affine3D<A>,B extends Model<B> & Affine3D<B>>>
Throws:
NoninvertibleModelException

createInverse

public InterpolatedAffineModel3D<A,B> createInverse()
Specified by:
createInverse in interface Affine3D<InterpolatedAffineModel3D<A extends Model<A> & Affine3D<A>,B extends Model<B> & Affine3D<B>>>
Specified by:
createInverse in interface InvertibleCoordinateTransform
Overrides:
createInverse in class InvertibleInterpolatedModel<A extends Model<A> & Affine3D<A>,B extends Model<B> & Affine3D<B>,InterpolatedAffineModel3D<A extends Model<A> & Affine3D<A>,B extends Model<B> & Affine3D<B>>>

createAffineModel3D

public AffineModel3D createAffineModel3D()

preConcatenate

public void preConcatenate(InterpolatedAffineModel3D<A,B> affine3d)
Specified by:
preConcatenate in interface Affine3D<InterpolatedAffineModel3D<A extends Model<A> & Affine3D<A>,B extends Model<B> & Affine3D<B>>>

concatenate

public void concatenate(InterpolatedAffineModel3D<A,B> affine3d)
Specified by:
concatenate in interface Affine3D<InterpolatedAffineModel3D<A extends Model<A> & Affine3D<A>,B extends Model<B> & Affine3D<B>>>

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<InterpolatedAffineModel3D<A extends Model<A> & Affine3D<A>,B extends Model<B> & Affine3D<B>>>

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<InterpolatedAffineModel3D<A extends Model<A> & Affine3D<A>,B extends Model<B> & Affine3D<B>>>

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

estimateInverseBounds

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

Specified by:
estimateInverseBounds in interface InverseBoundable
Throws:
NoninvertibleModelException


Copyright © 2007-2016 Fiji. All Rights Reserved.