Class PlanarPlaneSubsetCursor<T extends NativeType<T>>

    • Field Detail

      • type

        private final T extends NativeType<T> type
        Access to the type
      • typeIndex

        private final Index typeIndex
      • sliceIndex

        private final int sliceIndex
        Current slice index
      • planeSize

        private final int planeSize
        Size of one plane
      • lastPlaneIndex

        private final int lastPlaneIndex
        Last index on plane
    • Constructor Detail

      • PlanarPlaneSubsetCursor

        protected PlanarPlaneSubsetCursor​(PlanarPlaneSubsetCursor<T> cursor)
        Copy Constructor
        Parameters:
        cursor - - the cursor to copy from.
      • PlanarPlaneSubsetCursor

        public PlanarPlaneSubsetCursor​(PlanarImg<T,​?> container,
                                       Interval interval)
        Constructor
        Parameters:
        container - - the container this cursor shall work on.
        interval - - the interval to iterate over.
    • Method Detail

      • get

        public final T get()
        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>>
      • 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.

        Specified by:
        getType in interface Sampler<T extends NativeType<T>>
        Specified by:
        getType in interface Typed<T extends NativeType<T>>
        Returns:
        an instance of T
      • hasNext

        public final boolean hasNext()
        Returns true if another step forward is possible.
        Specified by:
        hasNext in interface java.util.Iterator<T extends NativeType<T>>
        Specified by:
        hasNext in interface Iterator
        Returns:
        true, if there is another step forward is possible, otherwise false
      • fwd

        public final void fwd()
        Move forward.
        Specified by:
        fwd in interface Iterator
      • jumpFwd

        public final void jumpFwd​(long steps)
        Move steps × forward.

        Highly recommended to override this with a more efficient version.

        Specified by:
        jumpFwd in interface Iterator
        Parameters:
        steps - number of steps to move forward
      • reset

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

        public final void localize​(int[] position)
        Write the current position into the passed array.
        Specified by:
        localize in interface Localizable
        Parameters:
        position - receives current position, length must be ≥ EuclideanSpace.numDimensions()
      • getIntPosition

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

        private long offset​(Interval interval)