Package net.imglib2
Class AbstractLocalizableInt
- java.lang.Object
-
- net.imglib2.AbstractEuclideanSpace
-
- net.imglib2.AbstractLocalizableInt
-
- All Implemented Interfaces:
EuclideanSpace
,Localizable
,RealLocalizable
- Direct Known Subclasses:
AbstractLocalizingCursorInt
,ArrayRandomAccess
,ListRandomAccess
,PlanarRandomAccess
public abstract class AbstractLocalizableInt extends AbstractEuclideanSpace implements Localizable
An abstract class that implements theLocalizable
interface using an int[] array to maintain position.This is identical to
AbstractLocalizable
, except that the position is limited toInteger.MAX_VALUE
in every dimension.- Author:
- Stephan Preibisch, Stephan Saalfeld, Tobias Pietzsch
-
-
Field Summary
Fields Modifier and Type Field Description protected int[]
position
TheLocalizable
interface is implemented using the position stored here.-
Fields inherited from class net.imglib2.AbstractEuclideanSpace
n
-
-
Constructor Summary
Constructors Modifier Constructor Description AbstractLocalizableInt(int n)
protected
AbstractLocalizableInt(int[] position)
Protected constructor that re-uses the passed position array.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.-
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
-
-
-
-
Field Detail
-
position
protected final int[] position
TheLocalizable
interface is implemented using the position stored here.Positionable
subclasses, such asPoint
, modify this array.
-
-
Constructor Detail
-
AbstractLocalizableInt
public AbstractLocalizableInt(int n)
- Parameters:
n
- number of dimensions.
-
AbstractLocalizableInt
protected AbstractLocalizableInt(int[] position)
Protected constructor that re-uses the passed position array. This is intended to allow subclasses to provide a way to wrap a int[] array.- Parameters:
position
- position array to use.
-
-
Method Detail
-
localize
public void localize(float[] pos)
Description copied from interface:RealLocalizable
Write the current position into the passed array.- Specified by:
localize
in interfaceRealLocalizable
- Parameters:
pos
- receives current position
-
localize
public void localize(double[] pos)
Description copied from interface:RealLocalizable
Write the current position into the passed array.- Specified by:
localize
in interfaceRealLocalizable
- Parameters:
pos
- receives current position
-
localize
public void localize(int[] pos)
Description copied from interface:Localizable
Write the current position into the passed array.- Specified by:
localize
in interfaceLocalizable
- Parameters:
pos
- receives current position
-
localize
public void localize(long[] pos)
Description copied from interface:Localizable
Write the current position into the passed array.- Specified by:
localize
in interfaceLocalizable
- Parameters:
pos
- receives current position
-
getFloatPosition
public float getFloatPosition(int d)
Description copied from interface:RealLocalizable
Return the current position in a given dimension.- Specified by:
getFloatPosition
in interfaceRealLocalizable
- Parameters:
d
- dimension- Returns:
- dimension of current position
-
getDoublePosition
public double getDoublePosition(int d)
Description copied from interface:RealLocalizable
Return the current position in a given dimension.- Specified by:
getDoublePosition
in interfaceRealLocalizable
- Parameters:
d
- dimension- Returns:
- dimension of current position
-
getIntPosition
public int getIntPosition(int d)
Description copied from interface:Localizable
Return the current position in a given dimension.- Specified by:
getIntPosition
in interfaceLocalizable
- Parameters:
d
- dimension- Returns:
- dimension of current position
-
getLongPosition
public long getLongPosition(int d)
Description copied from interface:Localizable
Return the current position in a given dimension.- Specified by:
getLongPosition
in interfaceLocalizable
- Parameters:
d
- dimension- Returns:
- dimension of current position
-
-