public class IterationCodeListCursor extends AbstractLocalizable implements Cursor<Void>
Cursor<Void> that visits all positions in the bitmask encoded by a
given list of IterationCodes. (This is used to iterate a
LabelRegion which is the union of fragments which are encoded by
IterationCodes.)
It is constructed with a long[] offset which is not copied, so it can
be used to shift the bitmask and reuse this cursor.
positionn| Modifier | Constructor and Description |
|---|---|
|
IterationCodeListCursor(ArrayList<gnu.trove.list.array.TIntArrayList> itcodesList,
long[] offset) |
protected |
IterationCodeListCursor(IterationCodeListCursor c) |
| Modifier and Type | Method and Description |
|---|---|
IterationCodeListCursor |
copy() |
IterationCodeListCursor |
copyCursor() |
void |
fwd()
Move forward.
|
Void |
get()
Access the actual T instance providing access to a pixel,
sub-pixel or integral region value the
Sampler points at. |
boolean |
hasNext()
Returns true if another step forward is possible.
|
void |
jumpFwd(long steps)
Move steps × forward.
|
Void |
next() |
void |
reset()
Reset the
Iterator, that is put it to where it would be if newly
created. |
getDoublePosition, getFloatPosition, getIntPosition, getLongPosition, localize, localize, localize, localizenumDimensionsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemaining, removegetDoublePosition, getFloatPosition, getIntPosition, getLongPosition, localize, localize, localize, positionAsLongArray, positionAsPointlocalize, localize, localize, positionAsDoubleArray, positionAsRealPointnumDimensionspublic IterationCodeListCursor(ArrayList<gnu.trove.list.array.TIntArrayList> itcodesList, long[] offset)
protected IterationCodeListCursor(IterationCodeListCursor c)
public Void get()
SamplerSampler points at.public void jumpFwd(long steps)
Iteratorsteps - number of steps to move forwardpublic void fwd()
Iteratorpublic void reset()
IteratorIterator, that is put it to where it would be if newly
created.public boolean hasNext()
Iteratorpublic IterationCodeListCursor copy()
copy in interface Sampler<Void>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)public IterationCodeListCursor copyCursor()
copyCursor in interface Cursor<Void>copyCursor in interface RealCursor<Void>Copyright © 2015–2022 ImgLib2. All rights reserved.