public class AffineTransform2D extends Object implements AffineGet, AffineSet, Concatenable<AffineGet>, PreConcatenable<AffineGet>
| Modifier and Type | Class and Description |
|---|---|
protected static class |
AffineTransform2D.AffineMatrix2D |
| Modifier and Type | Field and Description |
|---|---|
protected AffineTransform2D.AffineMatrix2D |
a |
protected RealPoint |
d0 |
protected RealPoint |
d1 |
protected RealPoint[] |
ds |
protected AffineTransform2D |
inverse |
| Modifier | Constructor and Description |
|---|---|
|
AffineTransform2D() |
protected |
AffineTransform2D(AffineTransform2D.AffineMatrix2D a) |
protected |
AffineTransform2D(AffineTransform2D inverse) |
| 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. |
AffineTransform2D |
concatenate(AffineGet affine)
Concatenate this object with a.
|
AffineTransform2D |
concatenate(AffineTransform2D model) |
AffineTransform2D |
copy()
Create a deep copy of this
RealTransform. |
RealLocalizable |
d(int d)
Get the constant partial differential vector for dimension d.
|
FinalRealInterval |
estimateBounds(RealInterval interval)
Calculate the boundary interval of an interval after it has been
transformed.
|
double |
get(int row,
int column)
Get a field of the n×(n+1) affine transformation
matrix.
|
Class<AffineGet> |
getConcatenableClass() |
Class<AffineGet> |
getPreConcatenableClass() |
double[] |
getRowPackedCopy()
Get a copy of the n×(n+1) affine transformation
matrix as a row packed array similar to Jama.
|
AffineTransform2D |
inverse()
Get the inverse transform.
|
protected void |
invert() |
boolean |
isIdentity()
Check if the
RealTransform is identity. |
int |
numDimensions()
Gets the space's number of dimensions.
|
int |
numSourceDimensions()
Returns n, the minimal number of dimension of the source vector.
|
int |
numTargetDimensions()
Returns m, the minimal dimension of the target vector.
|
AffineTransform2D |
preConcatenate(AffineGet affine)
Pre-concatenate this object with a.
|
AffineTransform2D |
preConcatenate(AffineTransform2D affine) |
void |
rotate(double d)
Rotate
|
void |
scale(double d)
Scale
|
void |
scale(double s0,
double s1)
Scale
|
void |
set(AffineTransform2D m) |
void |
set(double... values)
Set the n×(n+1) affine transformation matrix with
row packed double values.
|
void |
set(double[][] values)
Set the n×(n+1) affine transformation matrix with
double values from a [row][column] addressed array.
|
void |
set(double value,
int row,
int column)
Set a field of the n×(n+1) affine transformation
matrix.
|
void |
toArray(double[] data) |
void |
toMatrix(double[][] data) |
String |
toString() |
void |
translate(double... t)
Translate
|
protected void |
updateDs() |
protected final AffineTransform2D.AffineMatrix2D a
protected final RealPoint d0
protected final RealPoint d1
protected final RealPoint[] ds
protected final AffineTransform2D inverse
public AffineTransform2D()
protected AffineTransform2D(AffineTransform2D.AffineMatrix2D a)
protected AffineTransform2D(AffineTransform2D inverse)
protected void invert()
protected void updateDs()
public final void apply(double[] source,
double[] target)
RealTransformRealTransform to a source vector to obtain a target
vector.apply in interface RealTransformsource - source coordinates, length must be >=
RealTransform.numSourceDimensions()target - set this to the target coordinates, length must be >=
RealTransform.numTargetDimensions()public void apply(float[] source,
float[] target)
RealTransformRealTransform to a source vector to obtain a target
vector.apply in interface RealTransformsource - source coordinates, length must be >=
RealTransform.numSourceDimensions()target - set this to the target coordinates, length must be >=
RealTransform.numTargetDimensions()public void apply(RealLocalizable source, RealPositionable target)
RealTransformapply in interface RealTransformsource - 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)
InvertibleRealTransformapplyInverse in interface InvertibleRealTransformsource - set this to the source coordinates.target - target coordinates.public void applyInverse(float[] source,
float[] target)
InvertibleRealTransformapplyInverse in interface InvertibleRealTransformsource - set this to the source coordinates.target - target coordinates.public void applyInverse(RealPositionable source, RealLocalizable target)
InvertibleRealTransformRealLocalizable to obtain
a source RealPositionable.applyInverse in interface InvertibleRealTransformsource - set this to the source coordinates.target - target coordinates.public final AffineTransform2D concatenate(AffineGet affine)
Concatenableconcatenate in interface Concatenable<AffineGet>public final AffineTransform2D concatenate(AffineTransform2D model)
public AffineTransform2D copy()
RealTransformRealTransform.
Deep copying is required to make sure that stateful RealTransforms can be duplicated for concurrent code.
copy in interface AffineGetcopy in interface InvertibleRealTransformcopy in interface RealTransformpublic RealLocalizable d(int d)
AffineGetpublic double get(int row,
int column)
AffineGetpublic double[] getRowPackedCopy()
AffineGetgetRowPackedCopy in interface AffineGetpublic Class<AffineGet> getConcatenableClass()
getConcatenableClass in interface Concatenable<AffineGet>public Class<AffineGet> getPreConcatenableClass()
getPreConcatenableClass in interface PreConcatenable<AffineGet>public AffineTransform2D inverse()
InvertibleRealTransforminverse in interface AffineGetinverse in interface InvertibleRealTransformpublic int numDimensions()
EuclideanSpacenumDimensions in interface EuclideanSpacepublic int numSourceDimensions()
RealTransformnumSourceDimensions in interface RealTransformpublic int numTargetDimensions()
RealTransformnumTargetDimensions in interface RealTransformpublic final AffineTransform2D preConcatenate(AffineGet affine)
PreConcatenablepreConcatenate in interface PreConcatenable<AffineGet>public final AffineTransform2D preConcatenate(AffineTransform2D affine)
public void rotate(double d)
d - angle in radianspublic void translate(double... t)
t - 2d translation vectorpublic void scale(double d)
d - scale factorpublic void scale(double s0,
double s1)
s0 - scale factor for dimension 0s1 - scale factor for dimension 1public final void set(AffineTransform2D m)
public void toArray(double[] data)
public void toMatrix(double[][] data)
public void set(double value,
int row,
int column)
AffineSetpublic void set(double... values)
AffineSetpublic void set(double[][] values)
AffineSetpublic boolean isIdentity()
RealTransformRealTransform is identity.isIdentity in interface RealTransformpublic FinalRealInterval estimateBounds(RealInterval interval)
interval - the original boundsCopyright © 2015–2022 ImgLib2. All rights reserved.