public class PositionableInterval extends AbstractLocalizable implements Positionable, Interval
It is constructed with an initial source interval. After construction it has position 0, and interval bounds that are identical to the initial source interval.
If after that it is moved, both the position and interval bounds move.
Additionally, it is possible to move the origin(), which is useful
for example to make the min corner or the center of the interval coincide
with the position.
| Modifier and Type | Field and Description |
|---|---|
protected long[] |
currentOffset |
protected long[] |
initialMax |
protected long[] |
initialMin |
positionn| Modifier | Constructor and Description |
|---|---|
|
PositionableInterval(Interval initial) |
protected |
PositionableInterval(PositionableInterval other)
Copy constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
bck(int d) |
long |
dimension(int d) |
void |
dimensions(long[] dimensions) |
void |
fwd(int d) |
long |
max(int d) |
void |
max(long[] max) |
void |
max(Positionable max) |
long |
min(int d) |
void |
min(long[] min) |
void |
min(Positionable min) |
void |
move(int[] distance) |
void |
move(int distance,
int d) |
void |
move(Localizable localizable) |
void |
move(long[] distance) |
void |
move(long distance,
int d) |
PositionableLocalizable |
origin()
Get the
Positionable, Localizable origin of this
interval. |
void |
realMax(double[] max) |
double |
realMax(int d) |
void |
realMax(RealPositionable max) |
void |
realMin(double[] min) |
double |
realMin(int d) |
void |
realMin(RealPositionable min) |
void |
setPosition(int[] pos) |
void |
setPosition(int pos,
int d) |
void |
setPosition(Localizable localizable) |
void |
setPosition(long[] pos) |
void |
setPosition(long pos,
int d) |
String |
toString() |
getDoublePosition, getFloatPosition, getIntPosition, getLongPosition, localize, localize, localize, localizenumDimensionsclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitmaxAsLongArray, maxAsPoint, minAsLongArray, minAsPointmaxAsDoubleArray, maxAsRealPoint, minAsDoubleArray, minAsRealPointallPositive, allPositive, dimensions, dimensionsAsLongArray, dimensionsAsPoint, verify, verify, verifyAllPositive, verifyAllPositivenumDimensionslocalize, positionAsLongArray, positionAsPointlocalize, positionAsDoubleArray, positionAsRealPointprotected final long[] currentOffset
protected final long[] initialMin
protected final long[] initialMax
public PositionableInterval(Interval initial)
protected PositionableInterval(PositionableInterval other)
public PositionableLocalizable origin()
Positionable, Localizable origin of this
interval.
The origin is the relative offset of the position to the minimum. For
example if a positionable (bitmask) region is made from a BitType
image with a circular pattern, then it is more natural if the region
position refers to the center of the pattern instead of the upper left
corner of the BitType image. This can be achieved by positioning
the origin.
Assume a region is created from a 9x9 bitmask. The region initially has
min=(0,0), max=(8,8), position=(0,0). Because both position and min are
(0,0), initially origin=(0,0). Now assume the origin is moved to the
center of the bitmask using
origin().setPosition(new int[]{4,4}). After this,
min=(-4,-4), max=(4,4), position=(0,0), and origin=(4,4).
public void fwd(int d)
fwd in interface Positionablepublic void bck(int d)
bck in interface Positionablepublic void move(int distance,
int d)
move in interface Positionablepublic void move(long distance,
int d)
move in interface Positionablepublic void move(Localizable localizable)
move in interface Positionablepublic void move(int[] distance)
move in interface Positionablepublic void move(long[] distance)
move in interface Positionablepublic void setPosition(Localizable localizable)
setPosition in interface Positionablepublic void setPosition(int[] pos)
setPosition in interface Positionablepublic void setPosition(long[] pos)
setPosition in interface Positionablepublic void setPosition(int pos,
int d)
setPosition in interface Positionablepublic void setPosition(long pos,
int d)
setPosition in interface Positionablepublic double realMin(int d)
realMin in interface IntervalrealMin in interface RealIntervalpublic void realMin(double[] min)
realMin in interface RealIntervalpublic void realMin(RealPositionable min)
realMin in interface RealIntervalpublic double realMax(int d)
realMax in interface IntervalrealMax in interface RealIntervalpublic void realMax(double[] max)
realMax in interface RealIntervalpublic void realMax(RealPositionable max)
realMax in interface RealIntervalpublic void min(Positionable min)
public void max(Positionable max)
public void dimensions(long[] dimensions)
dimensions in interface Dimensionspublic long dimension(int d)
dimension in interface Dimensionsdimension in interface IntervalCopyright © 2009–2023 ImgLib2. All rights reserved.