public final class DisplacementFields extends Object
RealTransform.| Modifier and Type | Class and Description |
|---|---|
static class |
DisplacementFields.TransformedDisplacementField<D extends net.imglib2.type.NativeType<D> & net.imglib2.type.numeric.RealType<D>>
A (zero-min)
DisplacementField and the affine transform that
turns displacement field coordinates into target coordinates. |
| Modifier and Type | Method and Description |
|---|---|
static <D extends net.imglib2.type.NativeType<D> & net.imglib2.type.numeric.RealType<D>> |
createNormalized(net.imglib2.realtransform.RealTransform transform,
net.imglib2.Dimensions dimensions,
double[] spacing,
double[] offset,
D type)
Sample the given
RealTransform to create a normalized
displacement field. |
static DisplacementFields.TransformedDisplacementField<net.imglib2.type.numeric.real.DoubleType> |
sample(net.imglib2.realtransform.RealTransform transform,
net.imglib2.Interval interval,
double[] spacing)
Sample the given transform into a
DisplacementField that can be
used for interpolated lookup into a source image BlockSupplier
with the displacementFieldAffine block operator. |
static <D extends net.imglib2.type.NativeType<D> & net.imglib2.type.numeric.RealType<D>> |
sample(net.imglib2.realtransform.RealTransform transform,
net.imglib2.Interval interval,
double[] spacing,
D type)
Sample the given transform into a
DisplacementField that can be
used for interpolated lookup into a source image BlockSupplier
with the displacementFieldAffine block operator. |
public static DisplacementFields.TransformedDisplacementField<net.imglib2.type.numeric.real.DoubleType> sample(net.imglib2.realtransform.RealTransform transform, net.imglib2.Interval interval, double[] spacing)
DisplacementField that can be
used for interpolated lookup into a source image BlockSupplier
with the displacementFieldAffine block operator.
The transform is from target to source image coordinates.
The transform is sampled in the given interval with the
given spacing between sample points.
transform - the transform to sampleinterval - the interval in which to sample coordinatesspacing - the spacing between samplesDisplacementField and the transformFromField that turns displacement field coordinates into target
coordinates (scaling by spacing and shifting to the min of interval).public static <D extends net.imglib2.type.NativeType<D> & net.imglib2.type.numeric.RealType<D>> DisplacementFields.TransformedDisplacementField<D> sample(net.imglib2.realtransform.RealTransform transform, net.imglib2.Interval interval, double[] spacing, D type)
DisplacementField that can be
used for interpolated lookup into a source image BlockSupplier
with the displacementFieldAffine block operator.
The transform is from target to source image coordinates.
The transform is sampled in the given interval with the
given spacing between sample points.
D - displacement component type. should be DoubleType or FloatType.transform - the transform to sampleinterval - the interval in which to sample coordinatesspacing - the spacing between samplestype - displacement component type. should be DoubleType or FloatType.DisplacementField and the transformFromField that turns displacement field coordinates into target
coordinates (scaling by spacing and shifting to the min of interval).public static <D extends net.imglib2.type.NativeType<D> & net.imglib2.type.numeric.RealType<D>> net.imglib2.RandomAccessibleInterval<D> createNormalized(net.imglib2.realtransform.RealTransform transform, net.imglib2.Dimensions dimensions, double[] spacing, double[] offset, D type)
RealTransform to create a normalized
displacement field.
A "normalized" field expresses displacements in units relative to the displacement grid's own pixel spacing. Consequently, downsampling the grid by a factor of N requires scaling the displacement vectors by 1/N to maintain normalization.
Components of the displacements are in the 0th dimension, the extents of
the field are given by dimensions. The output interval will
therefore be of size:
[ transform.numTargetDimensions(),
interval.dimension(0), ..., interval.dimension( N-1 )]
D - displacement component type. should be DoubleType or FloatType.transform - the transform to sampledimensions - dimensions of the displacement field to create (dimension 0 for the vector components will be prepended)spacing - spacing of the samplesoffset - offset of the samplestype - displacement component type. should be DoubleType or FloatType.Copyright © 2009–2026 ImgLib2. All rights reserved.