T
- public class PlanarCursor<T extends NativeType<T>> extends AbstractCursorInt<T> implements PlanarImg.PlanarContainerSampler
PlanarContainers
Modifier and Type | Field and Description |
---|---|
protected PlanarImg<T,?> |
container |
protected int |
index
The current index of the type.
|
protected int |
lastIndex |
protected int |
lastSliceIndex |
protected int |
sliceIndex |
protected T |
type |
protected Index |
typeIndex |
n
Modifier | Constructor and Description |
---|---|
protected |
PlanarCursor(PlanarCursor<T> cursor) |
|
PlanarCursor(PlanarImg<T,?> container) |
Modifier and Type | Method and Description |
---|---|
PlanarCursor<T> |
copy() |
PlanarCursor<T> |
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. |
int |
getCurrentSliceIndex() |
int |
getIntPosition(int dim)
Return the current position in a given dimension.
|
boolean |
hasNext()
Note: This test is fragile in a sense that it returns true for elements
after the last element as well.
|
void |
jumpFwd(long steps)
Highly recommended to override this with a more efficient version.
|
void |
localize(int[] position)
Write the current position into the passed array.
|
void |
reset() |
String |
toString() |
getDoublePosition, getFloatPosition, getLongPosition, localize, localize, localize, next, remove
numDimensions
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEachRemaining
localize, positionAsLongArray, positionAsPoint
localize, positionAsDoubleArray, positionAsRealPoint
numDimensions
protected final T extends NativeType<T> type
protected final Index typeIndex
protected final PlanarImg<T extends NativeType<T>,?> container
protected final int lastIndex
protected final int lastSliceIndex
protected int sliceIndex
protected int index
protected PlanarCursor(PlanarCursor<T> cursor)
public int getCurrentSliceIndex()
getCurrentSliceIndex
in interface PlanarImg.PlanarContainerSampler
public T get()
Sampler
Sampler
points at.get
in interface Sampler<T extends NativeType<T>>
public PlanarCursor<T> copy()
copy
in interface Sampler<T extends NativeType<T>>
copy
in class AbstractCursorInt<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 PlanarCursor<T> copyCursor()
copyCursor
in interface Cursor<T extends NativeType<T>>
copyCursor
in interface RealCursor<T extends NativeType<T>>
copyCursor
in class AbstractCursorInt<T extends NativeType<T>>
public boolean hasNext()
hasNext
in interface Iterator<T extends NativeType<T>>
public void fwd()
public void jumpFwd(long steps)
AbstractCursorInt
jumpFwd
in class AbstractCursorInt<T extends NativeType<T>>
steps
- number of steps to move forwardpublic void reset()
public String toString()
toString
in class AbstractCursorInt<T extends NativeType<T>>
public void localize(int[] position)
Localizable
localize
in interface Localizable
position
- receives current positionpublic int getIntPosition(int dim)
Localizable
getIntPosition
in interface Localizable
dim
- dimensionCopyright © 2015–2022 ImgLib2. All rights reserved.