T
- public class ClampingNLinearInterpolatorVolatileRealType<R extends RealType<R>,T extends AbstractVolatileRealType<R,T>> extends NLinearInterpolator<T>
RealType
values with overflow check.
Interpoalted values are clamped to the range RealType.getMinValue()
,RealType.getMaxValue()
.Modifier and Type | Field and Description |
---|---|
protected double |
acc |
protected double |
clampMax |
protected double |
clampMin |
protected boolean |
valid |
accumulator, code, tmp, weights
discrete, position, target
n
Modifier | Constructor and Description |
---|---|
protected |
ClampingNLinearInterpolatorVolatileRealType(ClampingNLinearInterpolatorVolatileRealType<R,T> interpolator) |
protected |
ClampingNLinearInterpolatorVolatileRealType(RandomAccessible<T> randomAccessible) |
protected |
ClampingNLinearInterpolatorVolatileRealType(RandomAccessible<T> randomAccessible,
T type) |
Modifier and Type | Method and Description |
---|---|
ClampingNLinearInterpolatorVolatileRealType<R,T> |
copy() |
ClampingNLinearInterpolatorVolatileRealType<R,T> |
copyRealRandomAccess() |
T |
get()
Get the interpolated value at the current position.
|
fillWeights
floor, floor, floor, floor, floor, move, move, move, move, move, setPosition, setPosition, setPosition, setPosition, setPosition
bck, fwd, getDoublePosition, getFloatPosition, localize, localize, move, move, move, move, move, setPosition, setPosition, setPosition, setPosition, setPosition, toString
numDimensions
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
setPositionAndGet, setPositionAndGet, setPositionAndGet
getDoublePosition, getFloatPosition, localize, localize, localize, positionAsDoubleArray, positionAsRealPoint
move, move, move, move, move, setPosition, setPosition, setPosition, setPosition, setPosition
bck, fwd, move, move, move, move, move, setPosition, setPosition, setPosition, setPosition, setPosition
numDimensions
protected double acc
protected boolean valid
protected final double clampMin
protected final double clampMax
protected ClampingNLinearInterpolatorVolatileRealType(ClampingNLinearInterpolatorVolatileRealType<R,T> interpolator)
protected ClampingNLinearInterpolatorVolatileRealType(RandomAccessible<T> randomAccessible, T type)
protected ClampingNLinearInterpolatorVolatileRealType(RandomAccessible<T> randomAccessible)
public T get()
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.
get
in interface Sampler<T extends AbstractVolatileRealType<R,T>>
get
in class NLinearInterpolator<T extends AbstractVolatileRealType<R,T>>
public ClampingNLinearInterpolatorVolatileRealType<R,T> copy()
copy
in interface Sampler<T extends AbstractVolatileRealType<R,T>>
copy
in class NLinearInterpolator<T extends AbstractVolatileRealType<R,T>>
Sampler
in the same state accessing the same
values.
It does NOT copy T, just the state of the Sampler
.
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 an
ArrayCursor
for example)public ClampingNLinearInterpolatorVolatileRealType<R,T> copyRealRandomAccess()
copyRealRandomAccess
in interface RealRandomAccess<T extends AbstractVolatileRealType<R,T>>
copyRealRandomAccess
in class NLinearInterpolator<T extends AbstractVolatileRealType<R,T>>
Copyright © 2015–2022 ImgLib2. All rights reserved.