public abstract class AbstractLocalizable extends AbstractEuclideanSpace implements Localizable
Localizable
interface using a
long[] array to maintain position.Modifier and Type | Field and Description |
---|---|
protected long[] |
position
The
Localizable interface is implemented using the position
stored here. |
n
Modifier | Constructor and Description |
---|---|
|
AbstractLocalizable(int n) |
protected |
AbstractLocalizable(long[] position)
Protected constructor that re-uses the passed position array.
|
Modifier and Type | Method and Description |
---|---|
double |
getDoublePosition(int d)
Return the current position in a given dimension.
|
float |
getFloatPosition(int d)
Return the current position in a given dimension.
|
int |
getIntPosition(int d)
Return the current position in a given dimension.
|
long |
getLongPosition(int d)
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 |
localize(int[] pos)
Write the current position into the passed array.
|
void |
localize(long[] pos)
Write the current position into the passed array.
|
numDimensions
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
localize, positionAsLongArray, positionAsPoint
localize, positionAsDoubleArray, positionAsRealPoint
numDimensions
protected final long[] position
Localizable
interface is implemented using the position
stored here. Positionable
subclasses, such as Point
,
modify this array.public AbstractLocalizable(int n)
n
- number of dimensions.protected AbstractLocalizable(long[] position)
position
- position array to use.public 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 localize(int[] pos)
Localizable
localize
in interface Localizable
pos
- receives current positionpublic void localize(long[] pos)
Localizable
localize
in interface Localizable
pos
- receives current positionpublic float getFloatPosition(int d)
RealLocalizable
getFloatPosition
in interface Localizable
getFloatPosition
in interface RealLocalizable
d
- dimensionpublic double getDoublePosition(int d)
RealLocalizable
getDoublePosition
in interface Localizable
getDoublePosition
in interface RealLocalizable
d
- dimensionpublic int getIntPosition(int d)
Localizable
getIntPosition
in interface Localizable
d
- dimensionpublic long getLongPosition(int d)
Localizable
getLongPosition
in interface Localizable
d
- dimensionCopyright © 2015–2022 ImgLib2. All rights reserved.