public class AffineTransform3D extends Object implements AffineGet, AffineSet, Concatenable<AffineGet>, PreConcatenable<AffineGet>
| Modifier and Type | Class and Description |
|---|---|
protected static class |
AffineTransform3D.AffineMatrix3D |
| Modifier and Type | Field and Description |
|---|---|
protected AffineTransform3D.AffineMatrix3D |
a |
protected RealPoint |
d0 |
protected RealPoint |
d1 |
protected RealPoint |
d2 |
protected RealPoint[] |
ds |
protected AffineTransform3D |
inverse |
| Modifier | Constructor and Description |
|---|---|
|
AffineTransform3D() |
protected |
AffineTransform3D(AffineTransform3D.AffineMatrix3D a) |
protected |
AffineTransform3D(AffineTransform3D 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. |
AffineTransform3D |
concatenate(AffineGet affine)
Concatenate this object with a.
|
AffineTransform3D |
concatenate(AffineTransform3D affine) |
AffineTransform3D |
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.
|
double[] |
getTranslation()
Initialize the translation with a given vector
|
void |
identity()
Set to identity transform
|
AffineTransform3D |
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.
|
AffineTransform3D |
preConcatenate(AffineGet affine)
Pre-concatenate this object with a.
|
AffineTransform3D |
preConcatenate(AffineTransform3D affine) |
void |
rotate(int axis,
double angle)
Rotate
|
void |
scale(double s)
Scale
|
void |
scale(double s0,
double s1,
double s2)
Scale
|
void |
set(AffineTransform3D 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 m00,
double m01,
double m02,
double m03,
double m10,
double m11,
double m12,
double m13,
double m20,
double m21,
double m22,
double m23)
Set the affine matrix to:
|
void |
set(double value,
int row,
int column)
Set a field of the n×(n+1) affine transformation
matrix.
|
void |
setTranslation(double... translationVector)
Initialize the translation with a given vector
|
void |
toArray(double[] data) |
void |
toMatrix(double[][] data) |
String |
toString() |
void |
translate(double... translationVector)
Translation
|
protected void |
updateDs() |
protected final AffineTransform3D.AffineMatrix3D a
protected final RealPoint d0
protected final RealPoint d1
protected final RealPoint d2
protected final RealPoint[] ds
protected final AffineTransform3D inverse
public AffineTransform3D()
protected AffineTransform3D(AffineTransform3D.AffineMatrix3D a)
protected AffineTransform3D(AffineTransform3D 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 AffineTransform3D concatenate(AffineTransform3D affine)
public final AffineTransform3D concatenate(AffineGet affine)
Concatenableconcatenate in interface Concatenable<AffineGet>public AffineTransform3D 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 AffineTransform3D 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 AffineTransform3D preConcatenate(AffineTransform3D affine)
public final AffineTransform3D preConcatenate(AffineGet affine)
PreConcatenablepreConcatenate in interface PreConcatenable<AffineGet>public void rotate(int axis,
double angle)
axis - 0=x, 1=y, 2=zangle - angle in radianspublic void scale(double s)
s - scale factorpublic void scale(double s0,
double s1,
double s2)
s0 - scale factor for dimension 0s1 - scale factor for dimension 1s2 - scale factor for dimension 2public void translate(double... translationVector)
translationVector - vector describing the translationpublic double[] getTranslation()
public void setTranslation(double... translationVector)
translationVector - the translationpublic void identity()
public final void set(AffineTransform3D m)
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)
m00 m01 m02 m03 m10 m11 m12 m13 m20 m21 m22 m23
m00 - element 0,0m01 - element 0,1m02 - element 0,2m03 - element 0,3m10 - element 1,0m11 - element 1,1m12 - element 1,2m13 - element 1,3m20 - element 2,0m21 - element 2,1m22 - element 2,2m23 - element 2,3public 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 FinalRealInterval estimateBounds(RealInterval interval)
interval - the original boundspublic boolean isIdentity()
RealTransformRealTransform is identity.isIdentity in interface RealTransformCopyright © 2015–2022 ImgLib2. All rights reserved.