Class ClampingNLinearInterpolatorVolatileRealType<R extends RealType<R>,T extends AbstractVolatileRealType<R,T>>
- java.lang.Object
-
- net.imglib2.AbstractEuclideanSpace
-
- net.imglib2.position.transform.AbstractPositionableTransform<LocalizablePositionable>
-
- net.imglib2.position.transform.Floor<RandomAccess<T>>
-
- net.imglib2.interpolation.randomaccess.NLinearInterpolator<T>
-
- net.imglib2.interpolation.randomaccess.ClampingNLinearInterpolatorVolatileRealType<R,T>
-
- Type Parameters:
T-
- All Implemented Interfaces:
EuclideanSpace,Positionable,RealLocalizable,RealPositionable,RealRandomAccess<T>,Sampler<T>,Typed<T>
public class ClampingNLinearInterpolatorVolatileRealType<R extends RealType<R>,T extends AbstractVolatileRealType<R,T>> extends NLinearInterpolator<T>
N-linear interpolator forRealTypevalues with overflow check. Interpoalted values are clamped to the rangeRealType.getMinValue(),RealType.getMaxValue().
-
-
Field Summary
Fields Modifier and Type Field Description protected doubleaccprotected doubleclampMaxprotected doubleclampMinprotected booleanvalid-
Fields inherited from class net.imglib2.interpolation.randomaccess.NLinearInterpolator
accumulator, code, tmp, weights
-
Fields inherited from class net.imglib2.position.transform.AbstractPositionableTransform
discrete, position, target
-
Fields inherited from class net.imglib2.AbstractEuclideanSpace
n
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedClampingNLinearInterpolatorVolatileRealType(ClampingNLinearInterpolatorVolatileRealType<R,T> interpolator)protectedClampingNLinearInterpolatorVolatileRealType(RandomAccessible<T> randomAccessible)protectedClampingNLinearInterpolatorVolatileRealType(RandomAccessible<T> randomAccessible, T type)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidaccumulate()multiply current target value with current weight and add to accumulator.ClampingNLinearInterpolatorVolatileRealType<R,T>copy()Tget()Get the interpolated value at the current position.private voidgraycodeBckRecursive(int dimension)private voidgraycodeFwdRecursive(int dimension)-
Methods inherited from class net.imglib2.interpolation.randomaccess.NLinearInterpolator
fillWeights, getType
-
Methods inherited from class net.imglib2.position.transform.Floor
floor, floor, floor, floor, floor, move, move, move, move, move, setPosition, setPosition, setPosition, setPosition, setPosition
-
Methods inherited from class net.imglib2.position.transform.AbstractPositionableTransform
bck, fwd, getDoublePosition, getFloatPosition, localize, localize, move, move, move, move, move, setPosition, setPosition, setPosition, setPosition, setPosition, toString
-
Methods inherited from class net.imglib2.AbstractEuclideanSpace
numDimensions
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.imglib2.EuclideanSpace
numDimensions
-
Methods inherited from interface net.imglib2.Positionable
bck, fwd, move, move, move, move, move, setPosition, setPosition, setPosition, setPosition, setPosition
-
Methods inherited from interface net.imglib2.RealLocalizable
getDoublePosition, getFloatPosition, localize, localize, localize, positionAsDoubleArray, positionAsRealPoint
-
Methods inherited from interface net.imglib2.RealPositionable
move, move, move, move, move, setPosition, setPosition, setPosition, setPosition, setPosition
-
Methods inherited from interface net.imglib2.RealRandomAccess
copyRealRandomAccess, setPositionAndGet, setPositionAndGet, setPositionAndGet
-
-
-
-
Constructor Detail
-
ClampingNLinearInterpolatorVolatileRealType
protected ClampingNLinearInterpolatorVolatileRealType(ClampingNLinearInterpolatorVolatileRealType<R,T> interpolator)
-
ClampingNLinearInterpolatorVolatileRealType
protected ClampingNLinearInterpolatorVolatileRealType(RandomAccessible<T> randomAccessible, T type)
-
ClampingNLinearInterpolatorVolatileRealType
protected ClampingNLinearInterpolatorVolatileRealType(RandomAccessible<T> randomAccessible)
-
-
Method Detail
-
get
public T get()
Get the interpolated value at the current position.To visit the pixels that contribute to an interpolated value, we move in a (binary-reflected) Gray code pattern, such that only one dimension of the target position is modified per move.
-
copy
public ClampingNLinearInterpolatorVolatileRealType<R,T> copy()
- Specified by:
copyin interfaceRealRandomAccess<R extends RealType<R>>- Specified by:
copyin interfaceSampler<R extends RealType<R>>- Overrides:
copyin classNLinearInterpolator<T extends AbstractVolatileRealType<R,T>>- Returns:
- - A new
Samplerin the same state accessing the same values. It does NOT copy T, just the state of theSampler. Otherwise use T.copy() if available. Sampler.copy().get() == Sampler.get(), i.e. both hold the same value, not necessarily the same instance (this is the case for anArrayCursorfor example)
-
graycodeFwdRecursive
private final void graycodeFwdRecursive(int dimension)
-
graycodeBckRecursive
private final void graycodeBckRecursive(int dimension)
-
accumulate
private final void accumulate()
multiply current target value with current weight and add to accumulator.
-
-