Class ClampingNLinearInterpolatorVolatileARGB<T extends AbstractVolatileNumericType<ARGBType,T>>
java.lang.Object
net.imglib2.AbstractEuclideanSpace
net.imglib2.position.transform.AbstractPositionableTransform<RandomAccess<T>>
net.imglib2.position.transform.Floor<RandomAccess<T>>
net.imglib2.interpolation.randomaccess.NLinearInterpolator<T>
net.imglib2.interpolation.randomaccess.ClampingNLinearInterpolatorVolatileARGB<T>
- Type Parameters:
T-
- All Implemented Interfaces:
EuclideanSpace, Positionable, RealLocalizable, RealPositionable, RealRandomAccess<T>, Sampler<T>, Typed<T>
public class ClampingNLinearInterpolatorVolatileARGB<T extends AbstractVolatileNumericType<ARGBType,T>>
extends NLinearInterpolator<T>
N-linear interpolator for volatile ARGB values with overflow check.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected doubleprotected doubleprotected doubleprotected doubleprotected booleanFields inherited from class NLinearInterpolator
accumulator, code, tmp, weightsFields inherited from class AbstractPositionableTransform
discrete, position, targetFields inherited from class AbstractEuclideanSpace
n -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotectedClampingNLinearInterpolatorVolatileARGB(RandomAccessible<T> randomAccessible) protectedClampingNLinearInterpolatorVolatileARGB(RandomAccessible<T> randomAccessible, T type) -
Method Summary
Modifier and TypeMethodDescriptionprivate final voidmultiply current target value with current weight and add to accumulator.copy()get()Get the interpolated value at the current position.private final voidgraycodeBckRecursive(int dimension) private final voidgraycodeFwdRecursive(int dimension) Methods inherited from class NLinearInterpolator
fillWeights, getTypeMethods inherited from class Floor
floor, floor, floor, floor, floor, move, move, move, move, move, setPosition, setPosition, setPosition, setPosition, setPositionMethods inherited from class AbstractPositionableTransform
bck, fwd, getDoublePosition, getFloatPosition, localize, localize, move, move, move, move, move, setPosition, setPosition, setPosition, setPosition, setPosition, toStringMethods inherited from class AbstractEuclideanSpace
numDimensionsMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface EuclideanSpace
numDimensionsMethods inherited from interface Positionable
bck, fwd, move, move, move, move, move, setPosition, setPosition, setPosition, setPosition, setPositionMethods inherited from interface RealLocalizable
getDoublePosition, getFloatPosition, localize, localize, localize, positionAsDoubleArray, positionAsRealPointMethods inherited from interface RealPositionable
move, move, move, move, move, setPosition, setPosition, setPosition, setPosition, setPositionMethods inherited from interface RealRandomAccess
copyRealRandomAccess, setPositionAndGet, setPositionAndGet, setPositionAndGet
-
Field Details
-
accA
protected double accA -
accR
protected double accR -
accG
protected double accG -
accB
protected double accB -
valid
protected boolean valid
-
-
Constructor Details
-
ClampingNLinearInterpolatorVolatileARGB
protected ClampingNLinearInterpolatorVolatileARGB(ClampingNLinearInterpolatorVolatileARGB<T> interpolator) -
ClampingNLinearInterpolatorVolatileARGB
-
ClampingNLinearInterpolatorVolatileARGB
-
-
Method Details
-
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.
- Specified by:
getin interfaceSampler<T extends AbstractVolatileNumericType<ARGBType,T>> - Overrides:
getin classNLinearInterpolator<T extends AbstractVolatileNumericType<ARGBType,T>> - See Also:
-
copy
- Specified by:
copyin interfaceRealRandomAccess<T extends AbstractVolatileNumericType<ARGBType,T>> - Specified by:
copyin interfaceSampler<T extends AbstractVolatileNumericType<ARGBType,T>> - Overrides:
copyin classNLinearInterpolator<T extends AbstractVolatileNumericType<ARGBType,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.
-