public class HomographyTransform2D extends Object implements InvertibleRealTransform
RealTransform
to be applied to points in 2D-space.
Copied from https://github.com/axtimwalde/mpicbg/blob/master/mpicbg/src/main/java/mpicbg/models/HomographyModel2D.javaModifier and Type | Field and Description |
---|---|
protected double |
i00 |
protected double |
i01 |
protected double |
i02 |
protected double |
i10 |
protected double |
i11 |
protected double |
i12 |
protected double |
i20 |
protected double |
i21 |
protected double |
i22 |
protected double |
m00 |
protected double |
m01 |
protected double |
m02 |
protected double |
m10 |
protected double |
m11 |
protected double |
m12 |
protected double |
m20 |
protected double |
m21 |
protected double |
m22 |
Constructor and Description |
---|
HomographyTransform2D() |
Modifier and Type | Method and Description |
---|---|
void |
apply(double[] source,
double[] target)
Apply the
RealTransform to a source vector to obtain a target
vector. |
void |
apply(float[] source,
float[] target)
Apply the
RealTransform to a source vector to obtain a target
vector. |
void |
apply(RealLocalizable source,
RealPositionable target)
|
void |
applyInverse(double[] source,
double[] target)
Apply the inverse transform to a target vector to obtain a source vector.
|
void |
applyInverse(float[] source,
float[] target)
Apply the inverse transform to a target vector to obtain a source vector.
|
void |
applyInverse(RealPositionable source,
RealLocalizable target)
Apply the inverse transform to a target
RealLocalizable to obtain
a source RealPositionable . |
HomographyTransform2D |
copy()
Create a deep copy of this
RealTransform . |
HomographyTransform2D |
inverse()
Get the inverse transform.
|
int |
numSourceDimensions()
Returns n, the minimal number of dimension of the source vector.
|
int |
numTargetDimensions()
Returns m, the minimal dimension of the target vector.
|
void |
set(double m00,
double m01,
double m02,
double m10,
double m11,
double m12,
double m20,
double m21,
double m22) |
void |
set(HomographyTransform2D m) |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
isIdentity
protected double m00
protected double m01
protected double m02
protected double m10
protected double m11
protected double m12
protected double m20
protected double m21
protected double m22
protected double i00
protected double i01
protected double i02
protected double i10
protected double i11
protected double i12
protected double i20
protected double i21
protected double i22
public void set(double m00, double m01, double m02, double m10, double m11, double m12, double m20, double m21, double m22)
public final void apply(double[] source, double[] target)
RealTransform
RealTransform
to a source vector to obtain a target
vector.apply
in interface RealTransform
source
- source coordinates, length must be >=
RealTransform.numSourceDimensions()
target
- set this to the target coordinates, length must be >=
RealTransform.numTargetDimensions()
public final void apply(float[] source, float[] target)
RealTransform
RealTransform
to a source vector to obtain a target
vector.apply
in interface RealTransform
source
- source coordinates, length must be >=
RealTransform.numSourceDimensions()
target
- set this to the target coordinates, length must be >=
RealTransform.numTargetDimensions()
public final void apply(RealLocalizable source, RealPositionable target)
RealTransform
apply
in interface RealTransform
source
- source coordinates, numDimensions()
must be >=
RealTransform.numSourceDimensions()
target
- set this to the target coordinates,
numDimensions()
must
be >=
RealTransform.numTargetDimensions()
public final void applyInverse(double[] source, double[] target)
InvertibleRealTransform
applyInverse
in interface InvertibleRealTransform
source
- set this to the source coordinates.target
- target coordinates.public final void applyInverse(float[] source, float[] target)
InvertibleRealTransform
applyInverse
in interface InvertibleRealTransform
source
- set this to the source coordinates.target
- target coordinates.public final void applyInverse(RealPositionable source, RealLocalizable target)
InvertibleRealTransform
RealLocalizable
to obtain
a source RealPositionable
.applyInverse
in interface InvertibleRealTransform
source
- set this to the source coordinates.target
- target coordinates.public final void set(HomographyTransform2D m)
public HomographyTransform2D copy()
RealTransform
RealTransform
.
Deep copying is required to make sure that stateful RealTransforms
can be duplicated for concurrent code.
copy
in interface InvertibleRealTransform
copy
in interface RealTransform
public final HomographyTransform2D inverse()
InvertibleRealTransform
inverse
in interface InvertibleRealTransform
public int numSourceDimensions()
RealTransform
numSourceDimensions
in interface RealTransform
public int numTargetDimensions()
RealTransform
numTargetDimensions
in interface RealTransform
Copyright © 2015–2022 ImgLib2. All rights reserved.