Use this class to iterate a virtual {@link Interval} in flat order, that is:row by row, plane by plane, cube by cube, ... This is useful for iterating an arbitrary interval in a defined order. For that, connect an {@link IntervalIterator} to a {@link Positionable}.
... IntervalIterator i = new IntervalIterator(image); RandomAccess s = image.randomAccess(); while (i.hasNext()) { i.fwd(); s.setPosition(i); s.get().performOperation(...); ... } ...
Note that {@link IntervalIterator} is the right choice in situations where
not for each pixel you want to localize and/or set the {@link Positionable} [{@link Sampler}], that is in a sparse sampling situation. For localizing at each iteration step (as in the simplified example above), use {@link LocalizingIntervalIterator} instead.
@author Stephan Preibisch
@author Stephan Saalfeld
@author Stephan Saalfeld