Package net.imglib2
Class AbstractLocalizableInt
- java.lang.Object
-
- net.imglib2.AbstractEuclideanSpace
-
- net.imglib2.AbstractLocalizableInt
-
- All Implemented Interfaces:
EuclideanSpace,Localizable,RealLocalizable
- Direct Known Subclasses:
AbstractLocalizingCursorInt,ArrayLocalizingSpliterator,ArrayRandomAccess,ListRandomAccess,PlanarRandomAccess
public abstract class AbstractLocalizableInt extends AbstractEuclideanSpace implements Localizable
An abstract class that implements theLocalizableinterface using an int[] array to maintain position.This is identical to
AbstractLocalizable, except that the position is limited toInteger.MAX_VALUEin every dimension.
-
-
Field Summary
Fields Modifier and Type Field Description protected int[]positionTheLocalizableinterface is implemented using the position stored here.-
Fields inherited from class net.imglib2.AbstractEuclideanSpace
n
-
-
Constructor Summary
Constructors Modifier Constructor Description AbstractLocalizableInt(int n)protectedAbstractLocalizableInt(int[] position)Protected constructor that re-uses the passed position array.
-
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.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
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.Localizable
localize, localize, positionAsLongArray, positionAsPoint
-
Methods inherited from interface net.imglib2.RealLocalizable
positionAsDoubleArray, positionAsRealPoint
-
-
-
-
Field Detail
-
position
protected final int[] position
TheLocalizableinterface is implemented using the position stored here.Positionablesubclasses, 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: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()
-
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, length must be ≥EuclideanSpace.numDimensions()
-
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, 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 interfaceLocalizable- 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 interfaceLocalizable- 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
-
-