Class OutOfBoundsMirrorDoubleBoundary<T>

java.lang.Object
net.imglib2.outofbounds.AbstractOutOfBoundsMirror<T>
net.imglib2.outofbounds.OutOfBoundsMirrorDoubleBoundary<T>
Type Parameters:
T -
All Implemented Interfaces:
EuclideanSpace, Localizable, Bounded, OutOfBounds<T>, Positionable, RandomAccess<T>, RealLocalizable, Sampler<T>

public final class OutOfBoundsMirrorDoubleBoundary<T> extends AbstractOutOfBoundsMirror<T>
Coordinates out of image bounds are mirrored between boundary coordinates. So boundary pixels are repeated.
 
 Example:

 width=4

                                  |<-inside->|
 x:    -9 -8 -7 -6 -5 -4 -3 -2 -1  0  1  2  3  4  5  6  7  8  9
 f(x):  0  0  1  2  3  3  2  1  0  0  1  2  3  3  2  1  0  0  1
 
 
Author:
Stephan Saalfeld
  • Constructor Details

    • OutOfBoundsMirrorDoubleBoundary

      protected OutOfBoundsMirrorDoubleBoundary(OutOfBoundsMirrorDoubleBoundary<T> outOfBounds)
    • OutOfBoundsMirrorDoubleBoundary

      public OutOfBoundsMirrorDoubleBoundary(F f)
  • Method Details

    • copy

      public final OutOfBoundsMirrorDoubleBoundary<T> copy()
      Specified by:
      copy in interface OutOfBounds<T>
      Specified by:
      copy in interface Sampler<T>
      Specified by:
      copy in class AbstractOutOfBoundsMirror<T>
      Returns:
      - A new 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)
    • copyRandomAccess

      public final OutOfBoundsMirrorDoubleBoundary<T> copyRandomAccess()
    • fwd

      public final void fwd(int d)
      Description copied from interface: Positionable
      Move by 1 in one dimension.
      Parameters:
      d - dimension
    • bck

      public final void bck(int d)
      Description copied from interface: Positionable
      Move by -1 in one dimension.
      Parameters:
      d - dimension
    • setPosition

      public final void setPosition(long position, int d)
      Description copied from interface: Positionable
      Set the position of the element for one dimension.
      Parameters:
      position - absolute position in dimension d
      d - dimension