public class IterationCodeListCursor extends AbstractLocalizable implements Cursor<Void>
Cursor<Void>
that visits all positions in the bitmask encoded by a
given list of IterationCode
s. (This is used to iterate a
LabelRegion
which is the union of fragments which are encoded by
IterationCode
s.)
It is constructed with a long[]
offset which is not copied, so it can
be used to shift the bitmask and reuse this cursor.
position
n
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, localize
numDimensions
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEachRemaining, remove
getDoublePosition, getFloatPosition, getIntPosition, getLongPosition, localize, localize, localize, positionAsLongArray, positionAsPoint
localize, localize, localize, positionAsDoubleArray, positionAsRealPoint
numDimensions
public IterationCodeListCursor(ArrayList<gnu.trove.list.array.TIntArrayList> itcodesList, long[] offset)
protected IterationCodeListCursor(IterationCodeListCursor c)
public Void get()
Sampler
Sampler
points at.public void jumpFwd(long steps)
Iterator
steps
- number of steps to move forwardpublic void fwd()
Iterator
public void reset()
Iterator
Iterator
, that is put it to where it would be if newly
created.public boolean hasNext()
Iterator
public 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.