Class AbstractArrayCursor<T extends NativeType<T>>

Type Parameters:
T -
All Implemented Interfaces:
Iterator<T>, Cursor<T>, EuclideanSpace, Iterator, Localizable, RealCursor<T>, RealLocalizable, Sampler<T>
Direct Known Subclasses:
ArrayCursor, ArraySubIntervalCursor

public abstract class AbstractArrayCursor<T extends NativeType<T>> extends AbstractCursorInt<T>
Author:
Stephan Preibisch, Stephan Saalfeld, Christian Dietz, Tobias Pietzsch
  • Field Details

    • offset

      protected final int offset
      Offset of this cursor
    • size

      protected final int size
      Size of this cursor
    • type

      protected final T extends NativeType<T> type
      An instance of T
    • img

      protected final ArrayImg<T extends NativeType<T>,?> img
      Source image
    • lastIndex

      protected final int lastIndex
      Last index
  • Constructor Details

    • AbstractArrayCursor

      protected AbstractArrayCursor(AbstractArrayCursor<T> cursor)
      TODO Javadoc
      Parameters:
      cursor -
    • AbstractArrayCursor

      public AbstractArrayCursor(ArrayImg<T,?> img, int offset, int size)
      TODO Javadoc
      Parameters:
      img -
      offset -
      size -
  • Method Details

    • get

      public T get()
      Description copied from interface: Sampler
      Access the actual T instance providing access to a pixel, sub-pixel or integral region value the Sampler points at.
    • hasNext

      public boolean hasNext()
      Description copied from interface: Iterator
      Returns true if another step forward is possible.
      Returns:
      true, if there is another step forward is possible, otherwise false
    • jumpFwd

      public void jumpFwd(long steps)
      Description copied from class: AbstractCursorInt
      Highly recommended to override this with a more efficient version.
      Specified by:
      jumpFwd in interface Iterator
      Overrides:
      jumpFwd in class AbstractCursorInt<T extends NativeType<T>>
      Parameters:
      steps -
    • fwd

      public void fwd()
      Description copied from interface: Iterator
      Move forward.
    • reset

      public void reset()
      Description copied from interface: Iterator
      Reset the Iterator, that is put it to where it would be if newly created.
    • toString

      public String toString()
      Overrides:
      toString in class AbstractCursorInt<T extends NativeType<T>>
    • getIntPosition

      public int getIntPosition(int dim)
      Description copied from interface: Localizable
      Return the current position in a given dimension.
      Parameters:
      dim - dimension
      Returns:
      dimension of current position
    • localize

      public void localize(int[] position)
      Description copied from interface: Localizable
      Write the current position into the passed array.
      Parameters:
      position - receives current position