Class AbstractArrayCursor<T extends NativeType<T>>

    • Field Detail

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

        private final Index typeIndex
      • lastIndex

        protected final int lastIndex
        Last index
    • Constructor Detail

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

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

        public T getType()
        Description copied from interface: Typed
        Get an instance of T.

        It should not be assumed that the returned T instance is an independent copy. In particular, repeated calls to getType() may return the same instance.

        Returns:
        an instance of T
      • 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 interface: Iterator
        Move steps × forward.

        Highly recommended to override this with a more efficient version.

        Parameters:
        steps - number of steps to move forward
      • 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.
      • 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, length must be ≥ EuclideanSpace.numDimensions()