public class DeformationFieldTransform<T extends RealType<T>> extends Object implements RealTransform
Wraps a RandomAccessibleInterval of dimensionality D+1 ("def")
and interprets it as a D-dimensional RealTransform. The last
dimension of of the RandomAccessibleInterval must have at
least D components.
The deformation field should be interpreted as a d-dimensional vector field. A source point is displaced by adding the vector at that point the the source point's position.
| Constructor and Description |
|---|
DeformationFieldTransform(RandomAccessibleInterval<T> def) |
DeformationFieldTransform(RealRandomAccessible<T> defFieldReal) |
| 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(RealLocalizable source,
RealPositionable target)
|
RealTransform |
copy()
Create a deep copy of this
RealTransform. |
int |
numSourceDimensions()
Returns n, the minimal number of dimension of the source vector.
|
int |
numTargetDimensions()
Returns m, the minimal dimension of the target vector.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitapply, isIdentitypublic DeformationFieldTransform(RandomAccessibleInterval<T> def)
public DeformationFieldTransform(RealRandomAccessible<T> defFieldReal)
public int numSourceDimensions()
RealTransformnumSourceDimensions in interface RealTransformpublic int numTargetDimensions()
RealTransformnumTargetDimensions 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(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 RealTransform copy()
RealTransformRealTransform.
Deep copying is required to make sure that stateful RealTransforms can be duplicated for concurrent code.
copy in interface RealTransformCopyright © 2009–2018 ImgLib2. All rights reserved.