Interface Cursor<T>
-
- All Superinterfaces:
EuclideanSpace
,java.util.Iterator<T>
,Iterator
,Localizable
,RealCursor<T>
,RealLocalizable
,Sampler<T>
- All Known Implementing Classes:
AbstractArrayCursor
,AbstractArrayLocalizingCursor
,AbstractConvertedCursor
,AbstractCursor
,AbstractCursorInt
,AbstractLocalizingCursor
,AbstractLocalizingCursorInt
,AbstractLongListImg.LongListCursor
,AbstractLongListImg.LongListLocalizingCursor
,ArrayCursor
,ArrayLocalizingCursor
,ArrayLocalizingSubIntervalCursor
,ArraySubIntervalCursor
,CellCursor
,CellLocalizingCursor
,ConvertedCursor
,ListCursor
,ListLocalizingCursor
,NtreeCursor
,PlanarCursor
,PlanarCursor1D
,PlanarCursor2D
,PlanarLocalizingCursor
,PlanarLocalizingCursor1D
,PlanarLocalizingCursor2D
,PlanarPlaneSubsetCursor
,PlanarPlaneSubsetLocalizingCursor
,PointSampleList.PointSampleListCursor
,RandomAccessibleIntervalCursor
,SlicingCursor
,WriteConvertedCursor
public interface Cursor<T> extends RealCursor<T>, Localizable
A Cursor iterates over a set of Localizable elements, for example the image values at the (integer) pixel positions of an image.Cursor is a combination of several interfaces to achieve this. The
Iterator
interface is used to iterate the set. UseIterator.fwd()
to advance the cursor andIterator.hasNext()
to check whether there are more elements. Note, that the Cursor starts before the first element, i.e., you have to callfwd()
once to move to the first element.The
Localizable
interface provides access to the position of the current element. TheSampler.get()
method of theSampler
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 theIterator.next()
method is equivalent to callingfwd()
andget()
. That is, afternext()
the Cursor is on the element returned bynext()
.get()
can be used to obtain that element (again), andgetPosition()
to obtain its position. TheIterator.remove()
method is not supported by imglib Cursors, in general.- Author:
- Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Cursor<T>
copyCursor()
-
Methods inherited from interface net.imglib2.EuclideanSpace
numDimensions
-
Methods inherited from interface net.imglib2.Localizable
getIntPosition, getLongPosition, localize, localize
-
Methods inherited from interface net.imglib2.RealLocalizable
getDoublePosition, getFloatPosition, localize, localize
-
-
-
-
Method Detail
-
copyCursor
Cursor<T> copyCursor()
- Specified by:
copyCursor
in interfaceRealCursor<T>
-
-