Package net.imglib2.position.transform
Class AbstractPositionableTransform<LocalizablePositionable extends Localizable & Positionable>
java.lang.Object
net.imglib2.AbstractEuclideanSpace
net.imglib2.position.transform.AbstractPositionableTransform<LocalizablePositionable>
- All Implemented Interfaces:
EuclideanSpace,Positionable,RealLocalizable,RealPositionable
- Direct Known Subclasses:
Floor,FloorOffset,Round
public abstract class AbstractPositionableTransform<LocalizablePositionable extends Localizable & Positionable>
extends AbstractEuclideanSpace
implements RealPositionable, RealLocalizable
A
RealPositionable that drives a Positionable to somehow
derived discrete coordinates.- Author:
- Stephan Saalfeld
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final long[]protected final double[]protected final LocalizablePositionableFields inherited from class net.imglib2.AbstractEuclideanSpace
n -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbck(int dim) Move by -1 in one dimension.voidfwd(int dim) Move by 1 in one dimension.doublegetDoublePosition(int dim) Return the current position in a given dimension.floatgetFloatPosition(int dim) 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.voidmove(int[] distance) Move the element relative to its current location using an int[] as distance vector.voidmove(int distance, int dim) Move the element in one dimension for some distance.voidmove(long[] distance) Move the element relative to its current location using a long[] as distance vector.voidmove(long distance, int dim) Move the element in one dimension for some distance.voidmove(Localizable localizable) Move the element relative to its current location using anLocalizableas distance vector.voidsetPosition(int[] position) Set the position of the element.voidsetPosition(int position, int d) Set the position of the element for one dimension.voidsetPosition(long[] position) Set the position of the element.voidsetPosition(long position, int d) Set the position of the element for one dimension.voidsetPosition(Localizable localizable) Place the element at the same location as a givenLocalizabletoString()Methods inherited from class net.imglib2.AbstractEuclideanSpace
numDimensionsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.imglib2.EuclideanSpace
numDimensionsMethods inherited from interface net.imglib2.RealPositionable
move, move, move, move, move, setPosition, setPosition, setPosition, setPosition, setPosition
-
Field Details
-
target
-
position
protected final double[] position -
discrete
protected final long[] discrete
-
-
Constructor Details
-
AbstractPositionableTransform
-
-
Method Details
-
getDoublePosition
public double getDoublePosition(int dim) Description copied from interface:RealLocalizableReturn the current position in a given dimension.- Specified by:
getDoublePositionin interfaceRealLocalizable- Parameters:
dim- dimension- Returns:
- dimension of current position
-
getFloatPosition
public float getFloatPosition(int dim) Description copied from interface:RealLocalizableReturn the current position in a given dimension.- Specified by:
getFloatPositionin interfaceRealLocalizable- Parameters:
dim- dimension- Returns:
- dimension of current position
-
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
-
bck
public void bck(int dim) Description copied from interface:PositionableMove by -1 in one dimension.- Specified by:
bckin interfacePositionable- Parameters:
dim- dimension
-
fwd
public void fwd(int dim) Description copied from interface:PositionableMove by 1 in one dimension.- Specified by:
fwdin interfacePositionable- Parameters:
dim- dimension
-
move
public void move(int distance, int dim) Description copied from interface:PositionableMove the element in one dimension for some distance.- Specified by:
movein interfacePositionable- Parameters:
distance- relative offset in dimension ddim- dimension
-
move
public void move(long distance, int dim) Description copied from interface:PositionableMove the element in one dimension for some distance.- Specified by:
movein interfacePositionable- Parameters:
distance- relative offset in dimension ddim- dimension
-
move
Description copied from interface:PositionableMove the element relative to its current location using anLocalizableas distance vector.- Specified by:
movein interfacePositionable- Parameters:
localizable- relative offset,EuclideanSpace.numDimensions()must be ≥EuclideanSpace.numDimensions()
-
move
public void move(int[] distance) Description copied from interface:PositionableMove the element relative to its current location using an int[] as distance vector.- Specified by:
movein interfacePositionable- Parameters:
distance- relative offset, length must be ≥EuclideanSpace.numDimensions()
-
move
public void move(long[] distance) Description copied from interface:PositionableMove the element relative to its current location using a long[] as distance vector.- Specified by:
movein interfacePositionable- Parameters:
distance- relative offset, length must be ≥EuclideanSpace.numDimensions()
-
setPosition
Description copied from interface:PositionablePlace the element at the same location as a givenLocalizable- Specified by:
setPositionin interfacePositionable- Parameters:
localizable- absolute position,EuclideanSpace.numDimensions()must be ≥EuclideanSpace.numDimensions()
-
setPosition
public void setPosition(int[] position) Description copied from interface:PositionableSet the position of the element.- Specified by:
setPositionin interfacePositionable- Parameters:
position- absolute position, length must be ≥EuclideanSpace.numDimensions()
-
setPosition
public void setPosition(long[] position) Description copied from interface:PositionableSet the position of the element.- Specified by:
setPositionin interfacePositionable- Parameters:
position- absolute position, length must be ≥EuclideanSpace.numDimensions()
-
setPosition
public void setPosition(int position, int d) Description copied from interface:PositionableSet the position of the element for one dimension.- Specified by:
setPositionin interfacePositionable- Parameters:
position- absolute position in dimension dd- dimension
-
setPosition
public void setPosition(long position, int d) Description copied from interface:PositionableSet the position of the element for one dimension.- Specified by:
setPositionin interfacePositionable- Parameters:
position- absolute position in dimension dd- dimension
-
toString
-