public class RealPointSampleList.RealPointSampleListCursor extends Object implements RealCursor<T>
Modifier and Type | Field and Description |
---|---|
protected int |
index |
protected RealPoint |
position |
protected T |
sample |
Constructor and Description |
---|
RealPointSampleListCursor() |
Modifier and Type | Method and Description |
---|---|
RealCursor<T> |
copy() |
RealCursor<T> |
copyCursor() |
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.
|
boolean |
hasNext()
Returns true if another step forward is possible.
|
void |
jumpFwd(long steps)
Move steps × forward.
|
void |
localize(double[] pos)
Write the current position into the passed array.
|
void |
localize(float[] pos)
Write the current position into the passed array.
|
T |
next() |
int |
numDimensions()
Gets the space's number of dimensions.
|
void |
remove() |
void |
reset()
Reset the
Iterator , that is put it to where it would be if newly
created. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
localize, positionAsDoubleArray, positionAsRealPoint
forEachRemaining
protected int index
protected RealPoint position
protected T sample
public RealCursor<T> copy()
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 final RealCursor<T> copyCursor()
copyCursor
in interface RealCursor<T>
public double getDoublePosition(int d)
RealLocalizable
getDoublePosition
in interface RealLocalizable
d
- dimensionpublic float getFloatPosition(int d)
RealLocalizable
getFloatPosition
in interface RealLocalizable
d
- dimensionpublic void localize(float[] pos)
RealLocalizable
localize
in interface RealLocalizable
pos
- receives current positionpublic void localize(double[] pos)
RealLocalizable
localize
in interface RealLocalizable
pos
- receives current positionpublic int numDimensions()
EuclideanSpace
numDimensions
in interface EuclideanSpace
public T get()
Sampler
Sampler
points at.public void fwd()
Iterator
public boolean hasNext()
Iterator
public void jumpFwd(long steps)
Iterator
steps
- number of steps to move forwardpublic void reset()
Iterator
Iterator
, that is put it to where it would be if newly
created.Copyright © 2015–2022 ImgLib2. All rights reserved.