public interface RealLocalizable extends EuclideanSpace
RealLocalizable
interface can localize itself in an n-dimensional
real space.Modifier and Type | Method and Description |
---|---|
double |
getDoublePosition(int d)
Return the current position in a given dimension.
|
default float |
getFloatPosition(int d)
Return the current position in a given dimension.
|
default void |
localize(double[] position)
Write the current position into the passed array.
|
default void |
localize(float[] position)
Write the current position into the passed array.
|
default void |
localize(RealPositionable position)
Write the current position into the passed
RealPositionable . |
default double[] |
positionAsDoubleArray()
Allocate and return a double array with the position.
|
default RealPoint |
positionAsRealPoint()
Allocate and return a
RealPoint with the current position. |
numDimensions
default void localize(float[] position)
position
- receives current positiondefault void localize(double[] position)
position
- receives current positiondefault void localize(RealPositionable position)
RealPositionable
.
Note for developers: This default implementation forwards to
RealPositionable.setPosition(RealLocalizable)
, so don't do the
same there.position
- receives current positiondefault double[] positionAsDoubleArray()
localize(double[])
.default RealPoint positionAsRealPoint()
RealPoint
with the current position.
Please note that his method allocates a new RealPoint
each time
which introduces notable overhead in both compute and memory.
If you query it frequently, you should allocate a dedicated
RealPoint
first and reuse it with
localize(RealPositionable)
.default float getFloatPosition(int d)
d
- dimensiondouble getDoublePosition(int d)
d
- dimensionCopyright © 2015–2022 ImgLib2. All rights reserved.