public class RealPoint extends AbstractRealLocalizable implements RealPositionable
position
n
Modifier | Constructor and Description |
---|---|
|
RealPoint(double... position)
Create a point at a definite location in a space of the dimensionality of
the position.
|
protected |
RealPoint(double[] position,
boolean copy)
Protected constructor that can re-use the passed position array.
|
|
RealPoint(float... position)
Create a point at a definite location in a space of the dimensionality of
the position.
|
|
RealPoint(int n)
Create a point in nDimensional space initialized to 0,0,...
|
|
RealPoint(RealLocalizable localizable)
Create a point using the position and dimensionality of a
RealLocalizable |
Modifier and Type | Method and Description |
---|---|
void |
bck(int d)
Move by -1 in one dimension.
|
boolean |
equals(Object obj) |
void |
fwd(int d)
Move by 1 in one dimension.
|
int |
hashCode() |
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. |
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 |
String |
toString() |
static RealPoint |
wrap(double[] position)
Create a point that stores its coordinates in the provided position
array.
|
getDoublePosition, getFloatPosition, localize, localize
numDimensions
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
numDimensions
localize, positionAsDoubleArray, positionAsRealPoint
protected RealPoint(double[] position, boolean copy)
position
- array used to store the position.copy
- flag indicating whether position array should be duplicated.public RealPoint(int n)
n
- number of dimensions of the spacepublic RealPoint(double... position)
position
- the initial position. The length of the array determines the
dimensionality of the space.public RealPoint(float... position)
position
- the initial position. The length of the array determines the
dimensionality of the space.public RealPoint(RealLocalizable localizable)
RealLocalizable
localizable
- the initial position. Its dimensionality determines the
dimensionality of the space.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 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
public static RealPoint wrap(double[] position)
position
- array to use for storing the position.Copyright © 2015–2022 ImgLib2. All rights reserved.