Package net.imglib2

Class AbstractLocalizingCursor<T>

Type Parameters:
T -
All Implemented Interfaces:
Iterator<T>, Cursor<T>, EuclideanSpace, Iterator, Localizable, RealCursor<T>, RealLocalizable, Sampler<T>
Direct Known Subclasses:
AbstractLongListImg.LongListLocalizingCursor, CellLocalizingCursor

public abstract class AbstractLocalizingCursor<T> extends AbstractLocalizable implements Cursor<T>
Abstract base class for localizing Cursors. The current position is maintained in the inherited long[] position field.
Author:
Stephan Preibisch, Stephan Saalfeld, Tobias Pietzsch
  • Constructor Details

    • AbstractLocalizingCursor

      public AbstractLocalizingCursor(int n)
      Parameters:
      n - number of dimensions in the Img.
  • Method Details

    • remove

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

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

      public void jumpFwd(long steps)
      Description copied from interface: Iterator
      Move steps × forward.
      Specified by:
      jumpFwd in interface Iterator
      Parameters:
      steps - number of steps to move forward
    • copy

      public abstract AbstractLocalizingCursor<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)
    • copyCursor

      public abstract AbstractLocalizingCursor<T> copyCursor()
      Specified by:
      copyCursor in interface Cursor<T>
      Specified by:
      copyCursor in interface RealCursor<T>