public class CellCursor<T extends NativeType<T>,C extends Cell<?>> extends AbstractCursor<T> implements AbstractCellImg.CellImgSampler<C>
Cursor on a AbstractCellImg.| Modifier and Type | Field and Description |
|---|---|
protected Cursor<C> |
cursorOnCells |
protected Index |
i |
protected boolean |
isNotLastCell
Caches cursorOnCells.hasNext().
|
protected int |
lastIndexInCell |
protected T |
type |
protected int |
typeIndex
The current index of the type.
|
n| Modifier | Constructor and Description |
|---|---|
|
CellCursor(AbstractCellImg<T,?,C,?> img) |
protected |
CellCursor(CellCursor<T,C> cursor) |
| Modifier and Type | Method and Description |
|---|---|
CellCursor<T,C> |
copy() |
CellCursor<T,C> |
copyCursor() |
void |
fwd() |
T |
get()
Access the actual T instance providing access to a pixel,
sub-pixel or integral region value the
Sampler points at. |
C |
getCell() |
long |
getLongPosition(int dim)
Return the current position in a given dimension.
|
boolean |
hasNext() |
void |
jumpFwd(long steps)
Highly recommended to override this with a more efficient version.
|
void |
localize(long[] position)
Write the current position into the passed array.
|
void |
reset() |
String |
toString() |
getDoublePosition, getFloatPosition, getIntPosition, localize, localize, localize, next, removenumDimensionsclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforEachRemaininglocalize, positionAsLongArray, positionAsPointlocalize, positionAsDoubleArray, positionAsRealPointnumDimensionsprotected final T extends NativeType<T> type
protected final Index i
protected int lastIndexInCell
protected int typeIndex
protected boolean isNotLastCell
protected CellCursor(CellCursor<T,C> cursor)
public CellCursor(AbstractCellImg<T,?,C,?> img)
public C getCell()
getCell in interface AbstractCellImg.CellImgSampler<C extends Cell<?>>public T get()
SamplerSampler points at.get in interface Sampler<T extends NativeType<T>>public CellCursor<T,C> copy()
copy in interface Sampler<T extends NativeType<T>>copy in class AbstractCursor<T extends NativeType<T>>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 CellCursor<T,C> copyCursor()
copyCursor in interface Cursor<T extends NativeType<T>>copyCursor in interface RealCursor<T extends NativeType<T>>copyCursor in class AbstractCursor<T extends NativeType<T>>public boolean hasNext()
hasNext in interface Iterator<T extends NativeType<T>>public void jumpFwd(long steps)
AbstractCursorjumpFwd in class AbstractCursor<T extends NativeType<T>>steps - number of steps to move forwardpublic void fwd()
public void reset()
public String toString()
toString in class AbstractCursor<T extends NativeType<T>>public long getLongPosition(int dim)
LocalizablegetLongPosition in interface Localizabledim - dimensionpublic void localize(long[] position)
Localizablelocalize in interface Localizableposition - receives current positionCopyright © 2015–2022 ImgLib2. All rights reserved.