Package net.imglib2

Class AbstractCursorInt<T>

    • Constructor Detail

      • AbstractCursorInt

        public AbstractCursorInt​(int n)
        Parameters:
        n - number of dimensions in the Img.
    • Method Detail

      • remove

        public void remove()
        Specified by:
        remove in interface java.util.Iterator<T>
      • next

        public T next()
        Specified by:
        next in interface java.util.Iterator<T>
      • jumpFwd

        public void jumpFwd​(long steps)
        Highly recommended to override this with a more efficient version.
        Specified by:
        jumpFwd in interface Iterator
        Parameters:
        steps -
      • localize

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

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

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

        public float getFloatPosition​(int d)
        Description copied from interface: RealLocalizable
        Return the current position in a given dimension.
        Specified by:
        getFloatPosition in interface RealLocalizable
        Parameters:
        d - dimension
        Returns:
        dimension of current position
      • getDoublePosition

        public double getDoublePosition​(int d)
        Description copied from interface: RealLocalizable
        Return the current position in a given dimension.
        Specified by:
        getDoublePosition in interface RealLocalizable
        Parameters:
        d - dimension
        Returns:
        dimension of current position
      • getLongPosition

        public long getLongPosition​(int d)
        Description copied from interface: Localizable
        Return the current position in a given dimension.
        Specified by:
        getLongPosition in interface Localizable
        Parameters:
        d - dimension
        Returns:
        dimension of current position
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • copy

        public abstract AbstractCursorInt<T> copy()
        Specified by:
        copy in interface Sampler<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)