public interface RealTransform
Applying the transformation to an n-dimensional source vector yields an m-dimensional target vector.
Source and target vectors are required to be at least n- or
m-dimensional respectively. The RealTransform is expected to
leave all dimensions beyond n-1 in the source vector and m
-1 in the target vector unchanged.
Implementations must support an in-place apply (i.e., passing the same object as both source and target).
| Modifier and Type | Method and Description |
|---|---|
void |
apply(double[] source,
double[] target)
Apply the
RealTransform to a source vector to obtain a target
vector. |
default void |
apply(float[] source,
float[] target)
Deprecated.
use double precision instead
|
default void |
apply(long[] source,
double[] target)
Apply the
RealTransform to a source vector to obtain a target
vector. |
void |
apply(net.imglib2.RealLocalizable source,
net.imglib2.RealPositionable target)
|
default double |
applyDimension(double[] source,
int d)
Apply the
RealTransform to a source vector to obtain one
dimension of the resulting target vector. |
default double |
applyDimension(long[] source,
int d)
Apply the
RealTransform to a source vector to obtain one
dimension of the resulting target vector. |
default double |
applyDimension(net.imglib2.RealLocalizable source,
int d)
Apply the
RealTransform to a source vector to obtain one
dimension of the resulting target vector. |
default net.imglib2.RealInterval |
boundingInterval(net.imglib2.RealInterval interval,
IntervalSamplingMethod samplingMethod)
Estimate the
RealInterval that bounds the given RealInterval
after being transformed by a RealTransform. |
RealTransform |
copy()
Create a deep copy of this
RealTransform. |
default boolean |
isIdentity()
Check if the
RealTransform is identity. |
int |
numSourceDimensions()
Returns n, the minimal number of dimension of the source vector.
|
int |
numTargetDimensions()
Returns m, the minimal dimension of the target vector.
|
int numSourceDimensions()
int numTargetDimensions()
void apply(double[] source,
double[] target)
RealTransform to a source vector to obtain a target
vector.source - source coordinates, length must be >=
numSourceDimensions()target - set this to the target coordinates, length must be >=
numTargetDimensions()default void apply(long[] source,
double[] target)
RealTransform to a source vector to obtain a target
vector.source - source coordinates, length must be >=
numSourceDimensions()target - set this to the target coordinates, length must be >=
numTargetDimensions()
TODO override for this to be more efficient@Deprecated default void apply(float[] source, float[] target)
RealTransform to a source vector to obtain a target
vector.source - source coordinates, length must be >=
numSourceDimensions()target - set this to the target coordinates, length must be >=
numTargetDimensions()void apply(net.imglib2.RealLocalizable source, net.imglib2.RealPositionable target)
source - source coordinates, numDimensions() must be >=
numSourceDimensions()target - set this to the target coordinates,
numDimensions() must
be >= numTargetDimensions()default double applyDimension(double[] source,
int d)
RealTransform to a source vector to obtain one
dimension of the resulting target vector.source - source coordinates, length must be >=
numSourceDimensions()d - target dimension, must be >=
numTargetDimensions()default double applyDimension(long[] source,
int d)
RealTransform to a source vector to obtain one
dimension of the resulting target vector.source - source coordinates, length must be >=
numSourceDimensions()d - target dimension, must be >=
numTargetDimensions()default double applyDimension(net.imglib2.RealLocalizable source, int d)
RealTransform to a source vector to obtain one
dimension of the resulting target vector.source - source coordinates, EuclideanSpace.numDimensions()
must be >= numSourceDimensions()d - target dimension, must be >=
numTargetDimensions()RealTransform copy()
RealTransform.
Deep copying is required to make sure that stateful RealTransforms can be duplicated for concurrent code.
default boolean isIdentity()
RealTransform is identity.default net.imglib2.RealInterval boundingInterval(net.imglib2.RealInterval interval, IntervalSamplingMethod samplingMethod)
RealInterval 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.
interval - the real intervalsamplingMethod - the method used to sample coordinates of the source intervalCopyright © 2009–2026 ImgLib2. All rights reserved.