T
- public class ClampingNLinearInterpolatorRealType<T extends RealType<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 |
accumulator, code, tmp, weights
discrete, position, target
n
Modifier | Constructor and Description |
---|---|
protected |
ClampingNLinearInterpolatorRealType(ClampingNLinearInterpolatorRealType<T> interpolator) |
protected |
ClampingNLinearInterpolatorRealType(RandomAccessible<T> randomAccessible) |
protected |
ClampingNLinearInterpolatorRealType(RandomAccessible<T> randomAccessible,
T type) |
Modifier and Type | Method and Description |
---|---|
ClampingNLinearInterpolatorRealType<T> |
copy() |
ClampingNLinearInterpolatorRealType<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 final double clampMin
protected final double clampMax
protected ClampingNLinearInterpolatorRealType(ClampingNLinearInterpolatorRealType<T> interpolator)
protected ClampingNLinearInterpolatorRealType(RandomAccessible<T> randomAccessible, T type)
protected ClampingNLinearInterpolatorRealType(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.
public ClampingNLinearInterpolatorRealType<T> copy()
copy
in interface Sampler<T extends RealType<T>>
copy
in class NLinearInterpolator<T extends RealType<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 ClampingNLinearInterpolatorRealType<T> copyRealRandomAccess()
copyRealRandomAccess
in interface RealRandomAccess<T extends RealType<T>>
copyRealRandomAccess
in class NLinearInterpolator<T extends RealType<T>>
Copyright © 2015–2022 ImgLib2. All rights reserved.