Package net.imglib2
Class AbstractLocalizable
java.lang.Object
net.imglib2.AbstractEuclideanSpace
net.imglib2.AbstractLocalizable
- All Implemented Interfaces:
EuclideanSpace,Localizable,RealLocalizable
- Direct Known Subclasses:
AbstractLocalizingCursor,AbstractLongListImg.LongListRandomAccess,AbstractOutOfBoundsValue,CellRandomAccess,MixedRandomAccess,OutOfBoundsBorder,OutOfBoundsPeriodic,Point,SlicingRandomAccess,TransformRandomAccess
An abstract class that implements the
Localizable interface using a
long[] array to maintain position.- Author:
- Stephan Preibisch, Stephan Saalfeld, Tobias Pietzsch
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final long[]TheLocalizableinterface is implemented using the position stored here.Fields inherited from class net.imglib2.AbstractEuclideanSpace
n -
Constructor Summary
ConstructorsModifierConstructorDescriptionAbstractLocalizable(int n) protectedAbstractLocalizable(long[] position) Protected constructor that re-uses the passed position array. -
Method Summary
Modifier and TypeMethodDescriptiondoublegetDoublePosition(int d) Return the current position in a given dimension.floatgetFloatPosition(int d) Return the current position in a given dimension.intgetIntPosition(int d) Return the current position in a given dimension.longgetLongPosition(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.voidlocalize(int[] pos) Write the current position into the passed array.voidlocalize(long[] pos) Write the current position into the passed array.Methods inherited from class net.imglib2.AbstractEuclideanSpace
numDimensionsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.imglib2.EuclideanSpace
numDimensions
-
Field Details
-
position
protected final long[] positionTheLocalizableinterface is implemented using the position stored here.Positionablesubclasses, such asPoint, modify this array.
-
-
Constructor Details
-
AbstractLocalizable
public AbstractLocalizable(int n) - Parameters:
n- number of dimensions.
-
AbstractLocalizable
protected AbstractLocalizable(long[] position) Protected constructor that re-uses the passed position array. This is intended to allow subclasses to provide a way to wrap a long[] array.- Parameters:
position- position array to use.
-
-
Method Details
-
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
-
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
-
localize
public void localize(int[] pos) Description copied from interface:LocalizableWrite the current position into the passed array.- Specified by:
localizein interfaceLocalizable- Parameters:
pos- receives current position
-
localize
public void localize(long[] pos) Description copied from interface:LocalizableWrite the current position into the passed array.- Specified by:
localizein interfaceLocalizable- Parameters:
pos- receives current position
-
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
-
getIntPosition
public int getIntPosition(int d) Description copied from interface:LocalizableReturn the current position in a given dimension.- Specified by:
getIntPositionin interfaceLocalizable- Parameters:
d- dimension- Returns:
- dimension of current position
-
getLongPosition
public long getLongPosition(int d) Description copied from interface:LocalizableReturn the current position in a given dimension.- Specified by:
getLongPositionin interfaceLocalizable- Parameters:
d- dimension- Returns:
- dimension of current position
-