Package net.imglib2

Interface RealCursor<T>

All Superinterfaces:
EuclideanSpace, Iterator<T>, Iterator, RealLocalizable, Sampler<T>
All Known Subinterfaces:
Cursor<T>
All Known Implementing Classes:
AbstractArrayCursor, AbstractArrayLocalizingCursor, AbstractConvertedCursor, AbstractCursor, AbstractCursorInt, AbstractLocalizingCursor, AbstractLocalizingCursorInt, AbstractLongListImg.LongListCursor, AbstractLongListImg.LongListLocalizingCursor, ArrayCursor, ArrayLocalizingCursor, ArrayLocalizingSubIntervalCursor, ArraySubIntervalCursor, CellCursor, CellLocalizingCursor, ConvertedCursor, KDTree.KDTreeCursor, ListCursor, ListLocalizingCursor, NtreeCursor, PlanarCursor, PlanarCursor1D, PlanarCursor2D, PlanarLocalizingCursor, PlanarLocalizingCursor1D, PlanarLocalizingCursor2D, PlanarPlaneSubsetCursor, PlanarPlaneSubsetLocalizingCursor, PointSampleList.PointSampleListCursor, RandomAccessibleIntervalCursor, RealPointSampleList.RealPointSampleListCursor, SlicingCursor, WriteConvertedCursor

public interface RealCursor<T> extends RealLocalizable, Sampler<T>, Iterator, Iterator<T>
A RealCursor iterates over a set of RealLocalizable elements, for example intensity values sampled at a finite set of arbitrary real positions.

RealCursor is a combination of several interfaces to achieve this. The Iterator interface is used to iterate the set. Use Iterator.fwd() to advance the cursor and Iterator.hasNext() to check whether there are more elements. Note, that the Cursor starts before the first element, i.e., you have to call fwd() once to move to the first element.

The RealLocalizable interface provides access to the position of the current element. The Sampler.get() method of the Sampler interface provides access to the value of the current element.

For convenience, Cursor also extends the Iterator interface so that you are able to use Cursors in for-each loops. Calling the Iterator.next() method is equivalent to calling fwd() and get(). That is, after next() the Cursor is on the element returned by next(). get() can be used to obtain that element (again), and getPosition() to obtain its position. The Iterator.remove() method is not supported by imglib Cursors, in general.

Author:
Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld
  • Method Details