public class IterationCodeCursor extends AbstractLocalizable implements Cursor<Void>
Cursor<Void>
that visits all positions in the bitmask encoded by a
given IterationCode
.
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 |
---|---|
protected |
IterationCodeCursor(IterationCodeCursor c) |
|
IterationCodeCursor(IterationCode iterationCode,
long[] offset) |
|
IterationCodeCursor(gnu.trove.list.array.TIntArrayList itcode,
long[] offset) |
Modifier and Type | Method and Description |
---|---|
IterationCodeCursor |
copy() |
IterationCodeCursor |
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 IterationCodeCursor(IterationCode iterationCode, long[] offset)
public IterationCodeCursor(gnu.trove.list.array.TIntArrayList itcode, long[] offset)
protected IterationCodeCursor(IterationCodeCursor 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 IterationCodeCursor 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 IterationCodeCursor copyCursor()
copyCursor
in interface Cursor<Void>
copyCursor
in interface RealCursor<Void>
Copyright © 2015–2022 ImgLib2. All rights reserved.