public class AbstractRealTransformSequence<R extends RealTransform> extends Object implements RealTransform
RealTransformSequence and
InvertibleRealTransformSequence, sequences of something that extends
RealTransforms. If empty, will behave as the identity transformation.| Modifier and Type | Field and Description |
|---|---|
protected int |
nSource |
protected int |
nTarget |
protected RealPoint |
ptmp |
protected double[] |
tmp |
protected ArrayList<R> |
transforms |
| Constructor and Description |
|---|
AbstractRealTransformSequence() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(R transform)
Append a
RealTransform to the sequence. |
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)
|
AbstractRealTransformSequence<R> |
copy()
Create a deep copy of this
RealTransform. |
boolean |
isIdentity()
Returns true if either the sequence is empty, or if
every transform in the sequence returns true for
isIdentity. |
int |
numSourceDimensions()
Returns n, the minimal number of dimension of the source vector.
|
int |
numTargetDimensions()
Returns m, the minimal dimension of the target vector.
|
protected final ArrayList<R extends RealTransform> transforms
protected double[] tmp
protected RealPoint ptmp
protected int nSource
protected int nTarget
public void add(R transform)
RealTransform to the sequence.transform - the RealTransformpublic int numSourceDimensions()
RealTransformnumSourceDimensions in interface RealTransformpublic int numTargetDimensions()
RealTransformnumTargetDimensions in interface RealTransformpublic boolean isIdentity()
isIdentity. This
sequence could behave as the identity even if this method returns false,
for example, if it contains only a transform and its inverse.isIdentity in interface RealTransformpublic 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 AbstractRealTransformSequence<R> copy()
RealTransformRealTransform.
Deep copying is required to make sure that stateful RealTransforms can be duplicated for concurrent code.
copy in interface RealTransformCopyright © 2015–2022 ImgLib2. All rights reserved.