public class AffineTransform3D extends Object implements AffineGet, AffineSet, net.imglib2.concatenate.Concatenable<AffineGet>, net.imglib2.concatenate.PreConcatenable<AffineGet>
| Modifier and Type | Class and Description |
|---|---|
protected static class |
AffineTransform3D.AffineMatrix3D |
| Modifier and Type | Field and Description |
|---|---|
protected AffineTransform3D.AffineMatrix3D |
a |
protected net.imglib2.RealPoint |
d0 |
protected net.imglib2.RealPoint |
d1 |
protected net.imglib2.RealPoint |
d2 |
protected net.imglib2.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(net.imglib2.RealLocalizable source,
net.imglib2.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(net.imglib2.RealPositionable source,
net.imglib2.RealLocalizable target)
Apply the inverse transform to a target
RealLocalizable to obtain
a source RealPositionable. |
net.imglib2.RealInterval |
boundingInterval(net.imglib2.RealInterval interval,
IntervalSamplingMethod samplingMethod)
Estimate the
RealInterval that bounds the given RealInterval
after being transformed by a RealTransform. |
AffineTransform3D |
concatenate(AffineGet affine) |
AffineTransform3D |
concatenate(AffineTransform3D affine) |
AffineTransform3D |
copy()
Create a deep copy of this
RealTransform. |
net.imglib2.RealLocalizable |
d(int d)
Get the constant partial differential vector for dimension d.
|
net.imglib2.FinalRealInterval |
estimateBounds(net.imglib2.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() |
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) |
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:
m00 m01 m02 m03
m10 m11 m12 m13
m20 m21 m22 m23
|
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() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitapply, applyDimension, applyDimension, applyDimensionprotected final AffineTransform3D.AffineMatrix3D a
protected final net.imglib2.RealPoint d0
protected final net.imglib2.RealPoint d1
protected final net.imglib2.RealPoint d2
protected final net.imglib2.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(net.imglib2.RealLocalizable source, net.imglib2.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(net.imglib2.RealPositionable source, net.imglib2.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)
concatenate in interface net.imglib2.concatenate.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 net.imglib2.RealLocalizable d(int d)
AffineGetpublic double get(int row,
int column)
AffineGetpublic double[] getRowPackedCopy()
AffineGetgetRowPackedCopy in interface AffineGetpublic Class<AffineGet> getConcatenableClass()
getConcatenableClass in interface net.imglib2.concatenate.Concatenable<AffineGet>public Class<AffineGet> getPreConcatenableClass()
getPreConcatenableClass in interface net.imglib2.concatenate.PreConcatenable<AffineGet>public AffineTransform3D inverse()
InvertibleRealTransforminverse in interface AffineGetinverse in interface InvertibleRealTransformpublic int numDimensions()
numDimensions in interface net.imglib2.EuclideanSpacepublic int numSourceDimensions()
RealTransformnumSourceDimensions in interface RealTransformpublic int numTargetDimensions()
RealTransformnumTargetDimensions in interface RealTransformpublic final AffineTransform3D preConcatenate(AffineTransform3D affine)
public final AffineTransform3D preConcatenate(AffineGet affine)
preConcatenate in interface net.imglib2.concatenate.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 net.imglib2.FinalRealInterval estimateBounds(net.imglib2.RealInterval interval)
interval - the original boundspublic boolean isIdentity()
RealTransformRealTransform is identity.isIdentity in interface RealTransformpublic net.imglib2.RealInterval boundingInterval(net.imglib2.RealInterval interval, IntervalSamplingMethod samplingMethod)
RealTransformRealInterval that bounds the given RealInterval
after being transformed by a RealTransform.
For arbitrary transformations, it is not necessarily possible to
directly calculate the resulting bounding box trivially, therefore,
a sampling methods for coordinates in the source interval must be
provided. RealTransforms that can calculate the bounding
interval more efficiently than by sampling coordinates are encouraged
to override this method and to ignore the provided sampling method.
boundingInterval in interface RealTransforminterval - the real intervalsamplingMethod - the method used to sample coordinates of the source intervalCopyright © 2009–2026 ImgLib2. All rights reserved.