Class PlanarCursor<T extends NativeType<T>>

    • Field Detail

      • lastIndex

        protected final int lastIndex
      • lastSliceIndex

        protected final int lastSliceIndex
      • sliceIndex

        protected int sliceIndex
      • index

        protected int index
        The current index of the type. It is faster to duplicate this here than to access it through type.getIndex().
    • Constructor Detail

      • PlanarCursor

        protected PlanarCursor​(PlanarCursor<T> cursor)
      • PlanarCursor

        public PlanarCursor​(PlanarImg<T,​?> container)
    • 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.
        Specified by:
        get in interface Sampler<T extends NativeType<T>>
      • copy

        public PlanarCursor<T> copy()
        Specified by:
        copy in interface Sampler<T extends NativeType<T>>
        Specified by:
        copy in class AbstractCursorInt<T extends NativeType<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)
      • hasNext

        public boolean hasNext()
        Note: This test is fragile in a sense that it returns true for elements after the last element as well.
        Specified by:
        hasNext in interface java.util.Iterator<T extends NativeType<T>>
        Specified by:
        hasNext in interface Iterator
        Returns:
        false for the last element
      • fwd

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

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

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

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