public final class RandomAccessibleIntervalCursor<T> extends AbstractInterval implements Cursor<T>
Cursor that iterates any RandomAccessibleInterval by moving
a RandomAccess in flat iteration order. Localizable calls are
forwarded to the RandomAccess.max, minn| Modifier | Constructor and Description |
|---|---|
|
RandomAccessibleIntervalCursor(I interval) |
|
RandomAccessibleIntervalCursor(RandomAccessible<T> randomAccessible,
Interval interval) |
protected |
RandomAccessibleIntervalCursor(RandomAccessibleIntervalCursor<T> cursor) |
| Modifier and Type | Method and Description |
|---|---|
RandomAccessibleIntervalCursor<T> |
copy() |
void |
fwd()
Move forward.
|
T |
get()
Access the actual T instance providing access to a pixel,
sub-pixel or integral region value the
Sampler points at. |
double |
getDoublePosition(int d)
Return the current position in a given dimension.
|
float |
getFloatPosition(int d)
Return the current position in a given dimension.
|
int |
getIntPosition(int d)
Return the current position in a given dimension.
|
long |
getLongPosition(int d)
Return the current position in a given dimension.
|
T |
getType()
Get an instance of
T. |
boolean |
hasNext()
Returns true if another step forward is possible.
|
void |
jumpFwd(long steps)
Move steps × forward.
|
void |
localize(double[] position)
Write the current position into the passed array.
|
void |
localize(float[] position)
Write the current position into the passed array.
|
void |
localize(int[] position)
Write the current position into the passed array.
|
void |
localize(long[] position)
Write the current position into the passed array.
|
void |
reset()
Reset the
Iterator, that is put it to where it would be if newly
created. |
dimension, dimensions, max, max, max, min, min, min, realMax, realMax, realMax, realMin, realMin, realMin, toStringnumDimensionsclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcopyCursornextforEachRemaining, removelocalize, localize, positionAsLongArray, positionAsPointpositionAsDoubleArray, positionAsRealPointnumDimensionsmaxAsLongArray, maxAsPoint, minAsLongArray, minAsPointmaxAsDoubleArray, maxAsRealPoint, minAsDoubleArray, minAsRealPointallPositive, allPositive, dimensions, dimensionsAsLongArray, dimensionsAsPoint, verify, verify, verifyAllPositive, verifyAllPositivepublic RandomAccessibleIntervalCursor(I interval)
public RandomAccessibleIntervalCursor(RandomAccessible<T> randomAccessible, Interval interval)
protected RandomAccessibleIntervalCursor(RandomAccessibleIntervalCursor<T> cursor)
public T get()
SamplerSampler points at.public T getType()
TypedT.
It should not be assumed that the returned T instance is an
independent copy. In particular, repeated calls to getType() may
return the same instance.
public void jumpFwd(long steps)
IteratorHighly recommended to override this with a more efficient version.
steps - number of steps to move forwardpublic void fwd()
Iteratorpublic void reset()
IteratorIterator, that is put it to where it would be if newly
created.public boolean hasNext()
Iteratorpublic RandomAccessibleIntervalCursor<T> copy()
copy in interface Cursor<T>copy in interface RealCursor<T>copy in interface Sampler<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 void localize(float[] position)
RealLocalizablelocalize in interface RealLocalizableposition - receives current position, length must be ≥ EuclideanSpace.numDimensions()public void localize(double[] position)
RealLocalizablelocalize in interface RealLocalizableposition - receives current position, length must be ≥ EuclideanSpace.numDimensions()public float getFloatPosition(int d)
RealLocalizablegetFloatPosition in interface LocalizablegetFloatPosition in interface RealLocalizabled - dimensionpublic double getDoublePosition(int d)
RealLocalizablegetDoublePosition in interface LocalizablegetDoublePosition in interface RealLocalizabled - dimensionpublic void localize(int[] position)
Localizablelocalize in interface Localizableposition - receives current position, length must be ≥ EuclideanSpace.numDimensions()public void localize(long[] position)
Localizablelocalize in interface Localizableposition - receives current position, length must be ≥ EuclideanSpace.numDimensions()public int getIntPosition(int d)
LocalizablegetIntPosition in interface Localizabled - dimensionpublic long getLongPosition(int d)
LocalizablegetLongPosition in interface Localizabled - dimensionCopyright © 2009–2024 ImgLib2. All rights reserved.