public abstract class AbstractConvertedRealRandomAccess<A,B> extends Object implements RealRandomAccess<B>
Modifier and Type | Field and Description |
---|---|
protected RealRandomAccess<A> |
source |
Constructor and Description |
---|
AbstractConvertedRealRandomAccess(RealRandomAccess<A> source) |
Modifier and Type | Method and Description |
---|---|
void |
bck(int d)
Move by -1 in one dimension.
|
abstract AbstractConvertedRealRandomAccess<A,B> |
copy() |
AbstractConvertedRealRandomAccess<A,B> |
copyRealRandomAccess() |
void |
fwd(int d)
Move by 1 in one dimension.
|
double |
getDoublePosition(int d)
Return the current position in a given dimension.
|
float |
getFloatPosition(int d)
Return the current position in a given dimension.
|
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 |
move(double[] distance)
Move the element relative to its current location using a float[] as
distance vector.
|
void |
move(double distance,
int d)
Move the element in one dimension for some distance.
|
void |
move(float[] distance)
Move the element relative to its current location using a float[] as
distance vector.
|
void |
move(float distance,
int d)
Move the element in one dimension for some distance.
|
void |
move(int[] distance)
Move the element relative to its current location using an int[] as
distance vector.
|
void |
move(int distance,
int d)
Move the element in one dimension for some distance.
|
void |
move(Localizable localizable)
Move the element relative to its current location using an
Localizable as distance vector. |
void |
move(long[] distance)
Move the element relative to its current location using a long[] as
distance vector.
|
void |
move(long distance,
int d)
Move the element in one dimension for some distance.
|
void |
move(RealLocalizable localizable)
Move the element relative to its current location using a
RealLocalizable as distance vector. |
int |
numDimensions()
Gets the space's number of dimensions.
|
void |
setPosition(double[] position)
Set the position of the element.
|
void |
setPosition(double position,
int d)
Set the position of the element for one dimension.
|
void |
setPosition(float[] position)
Set the position of the element.
|
void |
setPosition(float position,
int d)
Set the position of the element for one dimension.
|
void |
setPosition(int[] position)
Set the position of the element.
|
void |
setPosition(int position,
int d)
Set the position of the element for one dimension.
|
void |
setPosition(Localizable localizable)
Place the element at the same location as a given
Localizable |
void |
setPosition(long[] position)
Set the position of the element.
|
void |
setPosition(long position,
int d)
Set the position of the element for one dimension.
|
void |
setPosition(RealLocalizable localizable)
Place the element at the same location as a given
RealLocalizable |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setPositionAndGet, setPositionAndGet, setPositionAndGet
localize, positionAsDoubleArray, positionAsRealPoint
protected final RealRandomAccess<A> source
public AbstractConvertedRealRandomAccess(RealRandomAccess<A> source)
public void localize(float[] position)
RealLocalizable
localize
in interface RealLocalizable
position
- receives current positionpublic void localize(double[] position)
RealLocalizable
localize
in interface RealLocalizable
position
- receives current positionpublic float getFloatPosition(int d)
RealLocalizable
getFloatPosition
in interface RealLocalizable
d
- dimensionpublic double getDoublePosition(int d)
RealLocalizable
getDoublePosition
in interface RealLocalizable
d
- dimensionpublic int numDimensions()
EuclideanSpace
numDimensions
in interface EuclideanSpace
public void fwd(int d)
Positionable
fwd
in interface Positionable
d
- dimensionpublic void bck(int d)
Positionable
bck
in interface Positionable
d
- dimensionpublic void move(int distance, int d)
Positionable
move
in interface Positionable
distance
- relative offset in dimension dd
- dimensionpublic void move(long distance, int d)
Positionable
move
in interface Positionable
distance
- relative offset in dimension dd
- dimensionpublic void move(Localizable localizable)
Positionable
Localizable
as distance vector.move
in interface Positionable
localizable
- relative offset, EuclideanSpace.numDimensions()
must be
≥ EuclideanSpace.numDimensions()
public void move(int[] distance)
Positionable
move
in interface Positionable
distance
- relative offset, length must be ≥ EuclideanSpace.numDimensions()
public void move(long[] distance)
Positionable
move
in interface Positionable
distance
- relative offset, length must be ≥ EuclideanSpace.numDimensions()
public void setPosition(Localizable localizable)
Positionable
Localizable
setPosition
in interface Positionable
localizable
- absolute position, EuclideanSpace.numDimensions()
must be
≥ EuclideanSpace.numDimensions()
public void setPosition(int[] position)
Positionable
setPosition
in interface Positionable
position
- absolute position, length must be ≥
EuclideanSpace.numDimensions()
public void setPosition(long[] position)
Positionable
setPosition
in interface Positionable
position
- absolute position, length must be ≥
EuclideanSpace.numDimensions()
public void setPosition(int position, int d)
Positionable
setPosition
in interface Positionable
position
- absolute position in dimension dd
- dimensionpublic void setPosition(long position, int d)
Positionable
setPosition
in interface Positionable
position
- absolute position in dimension dd
- dimensionpublic abstract AbstractConvertedRealRandomAccess<A,B> copy()
copy
in interface Sampler<B>
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 AbstractConvertedRealRandomAccess<A,B> copyRealRandomAccess()
copyRealRandomAccess
in interface RealRandomAccess<B>
public void move(float distance, int d)
RealPositionable
move
in interface RealPositionable
public void move(double distance, int d)
RealPositionable
move
in interface RealPositionable
public void move(RealLocalizable localizable)
RealPositionable
RealLocalizable
as distance vector.move
in interface RealPositionable
localizable
- relative offset, EuclideanSpace.numDimensions()
must
be ≥ EuclideanSpace.numDimensions()
public void move(float[] distance)
RealPositionable
move
in interface RealPositionable
public void move(double[] distance)
RealPositionable
move
in interface RealPositionable
public void setPosition(RealLocalizable localizable)
RealPositionable
RealLocalizable
setPosition
in interface RealPositionable
localizable
- absolute position, EuclideanSpace.numDimensions()
must be ≥ EuclideanSpace.numDimensions()
public void setPosition(float[] position)
RealPositionable
setPosition
in interface RealPositionable
position
- absolute position, length must be ≥
EuclideanSpace.numDimensions()
public void setPosition(double[] position)
RealPositionable
setPosition
in interface RealPositionable
position
- absolute position, length must be ≥
EuclideanSpace.numDimensions()
public void setPosition(float position, int d)
RealPositionable
setPosition
in interface RealPositionable
public void setPosition(double position, int d)
RealPositionable
setPosition
in interface RealPositionable
Copyright © 2015–2022 ImgLib2. All rights reserved.