public abstract class AbstractPositionableTransform<LocalizablePositionable extends Localizable & Positionable> extends AbstractEuclideanSpace implements RealPositionable, RealLocalizable
RealPositionable
that drives a Positionable
to somehow
derived discrete coordinates.Modifier and Type | Field and Description |
---|---|
protected long[] |
discrete |
protected double[] |
position |
protected LocalizablePositionable |
target |
n
Constructor and Description |
---|
AbstractPositionableTransform(LocalizablePositionable target) |
Modifier and Type | Method and Description |
---|---|
void |
bck(int dim)
Move by -1 in one dimension.
|
void |
fwd(int dim)
Move by 1 in one dimension.
|
double |
getDoublePosition(int dim)
Return the current position in a given dimension.
|
float |
getFloatPosition(int dim)
Return the current position in a given dimension.
|
void |
localize(double[] pos)
Write the current position into the passed array.
|
void |
localize(float[] pos)
Write the current position into the passed array.
|
void |
move(int[] distance)
Move the element relative to its current location using an int[] as
distance vector.
|
void |
move(int distance,
int dim)
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 dim)
Move the element in one dimension for some distance.
|
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.
|
String |
toString() |
numDimensions
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
move, move, move, move, move, setPosition, setPosition, setPosition, setPosition, setPosition
numDimensions
localize, positionAsDoubleArray, positionAsRealPoint
protected final LocalizablePositionable extends Localizable & Positionable target
protected final double[] position
protected final long[] discrete
public AbstractPositionableTransform(LocalizablePositionable target)
public double getDoublePosition(int dim)
RealLocalizable
getDoublePosition
in interface RealLocalizable
dim
- dimensionpublic float getFloatPosition(int dim)
RealLocalizable
getFloatPosition
in interface RealLocalizable
dim
- 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 void bck(int dim)
Positionable
bck
in interface Positionable
dim
- dimensionpublic void fwd(int dim)
Positionable
fwd
in interface Positionable
dim
- dimensionpublic void move(int distance, int dim)
Positionable
move
in interface Positionable
distance
- relative offset in dimension ddim
- dimensionpublic void move(long distance, int dim)
Positionable
move
in interface Positionable
distance
- relative offset in dimension ddim
- 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
- dimensionCopyright © 2015–2022 ImgLib2. All rights reserved.