Class ClampingNLinearInterpolatorRealType<T extends RealType<T>>

    • Field Detail

      • acc

        protected double acc
      • clampMin

        protected final double clampMin
      • clampMax

        protected final double clampMax
    • Constructor Detail

      • ClampingNLinearInterpolatorRealType

        protected ClampingNLinearInterpolatorRealType​(RandomAccessible<T> randomAccessible,
                                                      T type)
      • ClampingNLinearInterpolatorRealType

        protected ClampingNLinearInterpolatorRealType​(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<T extends RealType<T>>
        Overrides:
        get in class NLinearInterpolator<T extends RealType<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.