public class TwinCursor<T extends Type<T>> extends Object implements Cursor<T>, PairIterator<T>
Modifier and Type | Field and Description |
---|---|
protected RandomAccess<T> |
channel1 |
protected RandomAccess<T> |
channel2 |
protected boolean |
gotNext |
protected PredicateCursor<BitType> |
mask |
protected long[] |
position |
Constructor and Description |
---|
TwinCursor(RandomAccess<T> channel1,
RandomAccess<T> channel2,
Cursor<BitType> mask) |
Modifier and Type | Method and Description |
---|---|
Sampler<T> |
copy() |
Cursor<T> |
copyCursor() |
void |
fwd()
Go to the next pair.
|
T |
get() |
double |
getDoublePosition(int arg0) |
T |
getFirst()
Return the first value of the pair.
|
float |
getFloatPosition(int arg0) |
int |
getIntPosition(int arg0) |
long |
getLongPosition(int arg0) |
void |
getNext() |
T |
getSecond()
Return the second value of the pair.
|
boolean |
hasNext()
Returns whether there are pairs left.
|
void |
jumpFwd(long arg0) |
void |
localize(double[] arg0) |
void |
localize(float[] arg0) |
void |
localize(int[] arg0) |
void |
localize(long[] arg0) |
T |
next() |
int |
numDimensions() |
void |
remove() |
void |
reset()
Resets the iterator to just before the first element.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEachRemaining
localize, positionAsLongArray, positionAsPoint
localize, positionAsDoubleArray, positionAsRealPoint
protected final PredicateCursor<BitType> mask
protected final RandomAccess<T extends Type<T>> channel1
protected final RandomAccess<T extends Type<T>> channel2
protected final long[] position
protected boolean gotNext
public TwinCursor(RandomAccess<T> channel1, RandomAccess<T> channel2, Cursor<BitType> mask)
public final boolean hasNext()
PairIterator
public final void getNext()
public final T getFirst()
PairIterator
getFirst
in interface PairIterator<T extends Type<T>>
public final T getSecond()
PairIterator
getSecond
in interface PairIterator<T extends Type<T>>
public void reset()
PairIterator
reset
in interface PairIterator<T extends Type<T>>
public void fwd()
PairIterator
fwd
in interface PairIterator<T extends Type<T>>
public void jumpFwd(long arg0)
public double getDoublePosition(int arg0)
getDoublePosition
in interface Localizable
getDoublePosition
in interface RealLocalizable
public float getFloatPosition(int arg0)
getFloatPosition
in interface Localizable
getFloatPosition
in interface RealLocalizable
public void localize(float[] arg0)
localize
in interface RealLocalizable
public void localize(double[] arg0)
localize
in interface RealLocalizable
public int numDimensions()
numDimensions
in interface EuclideanSpace
public int getIntPosition(int arg0)
getIntPosition
in interface Localizable
public long getLongPosition(int arg0)
getLongPosition
in interface Localizable
public void localize(int[] arg0)
localize
in interface Localizable
public void localize(long[] arg0)
localize
in interface Localizable
public Cursor<T> copyCursor()
copyCursor
in interface Cursor<T extends Type<T>>
copyCursor
in interface RealCursor<T extends Type<T>>
Copyright © 2015–2021 Fiji. All rights reserved.