Package net.imglib2.position.transform
Class Round<LocalizablePositionable extends Localizable & Positionable>
- java.lang.Object
-
- net.imglib2.AbstractEuclideanSpace
-
- net.imglib2.position.transform.AbstractPositionableTransform<LocalizablePositionable>
-
- net.imglib2.position.transform.Round<LocalizablePositionable>
-
- All Implemented Interfaces:
EuclideanSpace,Positionable,RealLocalizable,RealPositionable
- Direct Known Subclasses:
NearestNeighborInterpolator
public class Round<LocalizablePositionable extends Localizable & Positionable> extends AbstractPositionableTransform<LocalizablePositionable>
ARealPositionablethat drives aPositionableto its round discrete coordinates:f = r < 0 ? (long)( r - 0.5 ) : (long)( r + 0.5 )
-
-
Field Summary
-
Fields inherited from class net.imglib2.position.transform.AbstractPositionableTransform
discrete, position, target
-
Fields inherited from class net.imglib2.AbstractEuclideanSpace
n
-
-
Constructor Summary
Constructors Constructor Description Round(LocalizablePositionable target)Round(RealLocalizable origin, LocalizablePositionable target)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidmove(double[] distance)Move the element relative to its current location using a float[] as distance vector.voidmove(double distance, int d)Move the element in one dimension for some distance.voidmove(float[] distance)Move the element relative to its current location using a float[] as distance vector.voidmove(float distance, int d)Move the element in one dimension for some distance.voidmove(RealLocalizable localizable)Move the element relative to its current location using aRealLocalizableas distance vector.static longround(double r)static voidround(double[] r, long[] f)static longround(float r)static voidround(float[] r, long[] f)static voidround(RealLocalizable r, long[] f)voidsetPosition(double[] pos)Set the position of the element.voidsetPosition(double position, int d)Set the position of the element for one dimension.voidsetPosition(float[] pos)Set the position of the element.voidsetPosition(float position, int d)Set the position of the element for one dimension.voidsetPosition(RealLocalizable localizable)Place the element at the same location as a givenRealLocalizable-
Methods inherited from class net.imglib2.position.transform.AbstractPositionableTransform
bck, fwd, getDoublePosition, getFloatPosition, localize, localize, move, move, move, move, move, setPosition, setPosition, setPosition, setPosition, setPosition, toString
-
Methods inherited from class net.imglib2.AbstractEuclideanSpace
numDimensions
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.imglib2.EuclideanSpace
numDimensions
-
Methods inherited from interface net.imglib2.RealLocalizable
localize, positionAsDoubleArray, positionAsRealPoint
-
-
-
-
Constructor Detail
-
Round
public Round(LocalizablePositionable target)
-
Round
public Round(RealLocalizable origin, LocalizablePositionable target)
-
-
Method Detail
-
round
public static final long round(double r)
-
round
public static final long round(float r)
-
round
public static final void round(double[] r, long[] f)
-
round
public static final void round(float[] r, long[] f)
-
round
public static final void round(RealLocalizable r, long[] f)
-
move
public void move(float distance, int d)Description copied from interface:RealPositionableMove the element in one dimension for some distance.
-
move
public void move(double distance, int d)Description copied from interface:RealPositionableMove the element in one dimension for some distance.
-
move
public void move(RealLocalizable localizable)
Description copied from interface:RealPositionableMove the element relative to its current location using aRealLocalizableas distance vector.- Parameters:
localizable- relative offset,EuclideanSpace.numDimensions()must be ≥EuclideanSpace.numDimensions()
-
move
public void move(float[] distance)
Description copied from interface:RealPositionableMove the element relative to its current location using a float[] as distance vector.- Parameters:
distance- , length must be ≥EuclideanSpace.numDimensions()
-
move
public void move(double[] distance)
Description copied from interface:RealPositionableMove the element relative to its current location using a float[] as distance vector.- Parameters:
distance- , length must be ≥EuclideanSpace.numDimensions()
-
setPosition
public void setPosition(RealLocalizable localizable)
Description copied from interface:RealPositionablePlace the element at the same location as a givenRealLocalizable- Parameters:
localizable- absolute position,EuclideanSpace.numDimensions()must be ≥EuclideanSpace.numDimensions()
-
setPosition
public void setPosition(float[] pos)
Description copied from interface:RealPositionableSet the position of the element.- Parameters:
pos- absolute position, length must be ≥EuclideanSpace.numDimensions()
-
setPosition
public void setPosition(double[] pos)
Description copied from interface:RealPositionableSet the position of the element.- Parameters:
pos- absolute position, length must be ≥EuclideanSpace.numDimensions()
-
setPosition
public void setPosition(float position, int d)Description copied from interface:RealPositionableSet the position of the element for one dimension.
-
setPosition
public void setPosition(double position, int d)Description copied from interface:RealPositionableSet the position of the element for one dimension.
-
-