Package net.imglib2
Class AbstractRealLocalizable
- java.lang.Object
-
- net.imglib2.AbstractEuclideanSpace
-
- net.imglib2.AbstractRealLocalizable
-
- All Implemented Interfaces:
EuclideanSpace,RealLocalizable
- Direct Known Subclasses:
RealPoint,RealPointSample
public abstract class AbstractRealLocalizable extends AbstractEuclideanSpace implements RealLocalizable
An abstract class that implements theRealLocalizableinterface using an array of doubles to maintain position
-
-
Field Summary
Fields Modifier and Type Field Description protected double[]positionTheRealLocalizableinterface is implemented using the position stored here.-
Fields inherited from class net.imglib2.AbstractEuclideanSpace
n
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractRealLocalizable(double[] position)Protected constructor that re-uses the passed position array.protectedAbstractRealLocalizable(int n)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doublegetDoublePosition(int d)Return the current position in a given dimension.floatgetFloatPosition(int d)Return the current position in a given dimension.voidlocalize(double[] pos)Write the current position into the passed array.voidlocalize(float[] pos)Write the current position into the passed array.-
Methods inherited from class net.imglib2.AbstractEuclideanSpace
numDimensions
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.imglib2.EuclideanSpace
numDimensions
-
Methods inherited from interface net.imglib2.RealLocalizable
localize, positionAsDoubleArray, positionAsRealPoint
-
-
-
-
Field Detail
-
position
protected final double[] position
TheRealLocalizableinterface is implemented using the position stored here.RealPositionablesubclasses, such asRealPoint, modify this array.
-
-
Constructor Detail
-
AbstractRealLocalizable
protected AbstractRealLocalizable(int n)
- Parameters:
n- number of dimensions.
-
AbstractRealLocalizable
protected AbstractRealLocalizable(double[] position)
Protected constructor that re-uses the passed position array. This is intended to allow subclasses to provide a way to wrap a double[] array.- Parameters:
position- position array to use.
-
-
Method Detail
-
localize
public void localize(float[] pos)
Description copied from interface:RealLocalizableWrite the current position into the passed array.- Specified by:
localizein interfaceRealLocalizable- Parameters:
pos- receives current position, length must be ≥EuclideanSpace.numDimensions()
-
localize
public void localize(double[] pos)
Description copied from interface:RealLocalizableWrite the current position into the passed array.- Specified by:
localizein interfaceRealLocalizable- Parameters:
pos- receives current position, length must be ≥EuclideanSpace.numDimensions()
-
getFloatPosition
public float getFloatPosition(int d)
Description copied from interface:RealLocalizableReturn the current position in a given dimension.- Specified by:
getFloatPositionin interfaceRealLocalizable- Parameters:
d- dimension- Returns:
- dimension of current position
-
getDoublePosition
public double getDoublePosition(int d)
Description copied from interface:RealLocalizableReturn the current position in a given dimension.- Specified by:
getDoublePositionin interfaceRealLocalizable- Parameters:
d- dimension- Returns:
- dimension of current position
-
-