Class ClampingNLinearInterpolatorVolatileRealType<R extends RealType<R>,​T extends AbstractVolatileRealType<R,​T>>

    • Field Detail

      • acc

        protected double acc
      • valid

        protected boolean valid
      • clampMin

        protected final double clampMin
      • clampMax

        protected final double clampMax
    • Constructor Detail

      • 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.

        Specified by:
        get in interface Sampler<R extends RealType<R>>
        Overrides:
        get in class NLinearInterpolator<T extends AbstractVolatileRealType<R,​T>>
        See Also:
        Gray code.
      • 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.