public class FloorOffset<LocalizablePositionable extends Localizable & Positionable> extends AbstractPositionableTransform<LocalizablePositionable>
RealPositionable
that drives a Positionable
to its floor
discrete coordinates plus a discrete offset vector. For practical useage, the
floor operation is defined as the integer smaller than the real value:
f = r < 0 ? (long)r - 1 : (long)r
Modifier and Type | Field and Description |
---|---|
protected long[] |
offset |
discrete, position, target
n
Constructor and Description |
---|
FloorOffset(LocalizablePositionable target,
Localizable offset) |
FloorOffset(LocalizablePositionable target,
long[] offset) |
FloorOffset(RealLocalizable origin,
LocalizablePositionable target,
Localizable offset) |
FloorOffset(RealLocalizable origin,
LocalizablePositionable target,
long[] offset) |
Modifier and Type | Method and Description |
---|---|
protected void |
f(double[] r,
long[] f) |
protected static long |
f(double r,
long off) |
protected void |
f(float[] r,
long[] f) |
protected static long |
f(float r,
long off) |
protected void |
f(RealLocalizable r,
long[] f) |
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(RealLocalizable localizable)
Move the element relative to its current location using a
RealLocalizable as distance vector. |
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[] pos)
Set the position of the element.
|
void |
setPosition(float 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 |
bck, fwd, getDoublePosition, getFloatPosition, localize, localize, move, move, move, move, move, setPosition, setPosition, setPosition, setPosition, setPosition, toString
numDimensions
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
numDimensions
localize, positionAsDoubleArray, positionAsRealPoint
public FloorOffset(LocalizablePositionable target, long[] offset)
public FloorOffset(LocalizablePositionable target, Localizable offset)
public FloorOffset(RealLocalizable origin, LocalizablePositionable target, long[] offset)
public FloorOffset(RealLocalizable origin, LocalizablePositionable target, Localizable offset)
protected static final long f(double r, long off)
protected static final long f(float r, long off)
protected void f(double[] r, long[] f)
protected void f(float[] r, long[] f)
protected void f(RealLocalizable r, long[] f)
public void move(float distance, int d)
RealPositionable
public void move(double distance, int d)
RealPositionable
public void move(RealLocalizable localizable)
RealPositionable
RealLocalizable
as distance vector.localizable
- relative offset, EuclideanSpace.numDimensions()
must
be ≥ EuclideanSpace.numDimensions()
public void move(float[] distance)
RealPositionable
public void move(double[] distance)
RealPositionable
public void setPosition(RealLocalizable localizable)
RealPositionable
RealLocalizable
localizable
- absolute position, EuclideanSpace.numDimensions()
must be ≥ EuclideanSpace.numDimensions()
public void setPosition(float[] pos)
RealPositionable
pos
- absolute position, length must be ≥
EuclideanSpace.numDimensions()
public void setPosition(double[] position)
RealPositionable
position
- absolute position, length must be ≥
EuclideanSpace.numDimensions()
public void setPosition(float position, int d)
RealPositionable
public void setPosition(double position, int d)
RealPositionable
Copyright © 2015–2022 ImgLib2. All rights reserved.