T
- public abstract class AbstractOutOfBoundsMirror<T> extends Object implements OutOfBounds<T>
Modifier and Type | Field and Description |
---|---|
protected long[] |
dimension
Dimensions of the wrapped
RandomAccessible . |
protected boolean[] |
dimIsOutOfBounds |
protected boolean[] |
inc |
protected boolean |
isOutOfBounds |
protected long[] |
min
Minimum of the wrapped
RandomAccessible . |
protected int |
n |
protected RandomAccess<T> |
outOfBoundsRandomAccess |
protected long[] |
p
Period of the extended interval.
|
protected long[] |
zeroMinPos
Position relative to min, for internal calculations.
|
Modifier | Constructor and Description |
---|---|
protected |
AbstractOutOfBoundsMirror(AbstractOutOfBoundsMirror<T> outOfBounds) |
|
AbstractOutOfBoundsMirror(F f) |
Modifier and Type | Method and Description |
---|---|
protected void |
checkOutOfBounds() |
abstract AbstractOutOfBoundsMirror<T> |
copy() |
T |
get()
Access the actual T instance providing access to a pixel,
sub-pixel or integral region value the
Sampler points at. |
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.
|
boolean |
isOutOfBounds()
True if located out of image bounds.
|
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.
|
void |
move(int[] distance)
Move the element relative to its current location using an int[] as
distance vector.
|
void |
move(int distance,
int d)
Move the element in one dimension for some distance.
|
void |
move(Localizable localizable)
Move the element relative to its current location using an
Localizable as distance vector. |
void |
move(long[] distance)
Move the element relative to its current location using a long[] as
distance vector.
|
void |
move(long distance,
int d)
Override with a more efficient version.
|
int |
numDimensions()
Gets the space's number of dimensions.
|
void |
setPosition(int[] position)
Set the position of the element.
|
void |
setPosition(int position,
int d)
Set the position of the element for one dimension.
|
void |
setPosition(Localizable localizable)
Place the element at the same location as a given
Localizable |
void |
setPosition(long[] position)
Set the position of the element.
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
copyRandomAccess, setPositionAndGet, setPositionAndGet, setPositionAndGet
localize, positionAsLongArray, positionAsPoint
localize, positionAsDoubleArray, positionAsRealPoint
bck, fwd, setPosition
protected final RandomAccess<T> outOfBoundsRandomAccess
protected final int n
protected final long[] dimension
RandomAccessible
.protected final long[] zeroMinPos
protected final long[] min
RandomAccessible
.protected final long[] p
OutOfBoundsMirrorDoubleBoundary
, see
OutOfBoundsMirrorSingleBoundary
.protected final boolean[] inc
protected final boolean[] dimIsOutOfBounds
protected boolean isOutOfBounds
protected AbstractOutOfBoundsMirror(AbstractOutOfBoundsMirror<T> outOfBounds)
public AbstractOutOfBoundsMirror(F f)
protected final void checkOutOfBounds()
public int numDimensions()
EuclideanSpace
numDimensions
in interface EuclideanSpace
public boolean isOutOfBounds()
Bounded
isOutOfBounds
in interface Bounded
public T get()
Sampler
Sampler
points at.public abstract AbstractOutOfBoundsMirror<T> copy()
copy
in interface OutOfBounds<T>
copy
in interface Sampler<T>
Sampler
in the same state accessing the same
values.
It does NOT copy T, just the state of the Sampler
.
Otherwise use T.copy() if available.
Sampler.copy().get() == Sampler.get(), i.e. both hold the same
value, not necessarily the same instance (this is the case for an
ArrayCursor
for example)public void localize(float[] pos)
RealLocalizable
localize
in interface RealLocalizable
pos
- receives current positionpublic void localize(double[] pos)
RealLocalizable
localize
in interface RealLocalizable
pos
- receives current positionpublic void localize(int[] pos)
Localizable
localize
in interface Localizable
pos
- receives current positionpublic void localize(long[] pos)
Localizable
localize
in interface Localizable
pos
- receives current positionpublic float getFloatPosition(int d)
RealLocalizable
getFloatPosition
in interface Localizable
getFloatPosition
in interface RealLocalizable
d
- dimensionpublic double getDoublePosition(int d)
RealLocalizable
getDoublePosition
in interface Localizable
getDoublePosition
in interface RealLocalizable
d
- dimensionpublic int getIntPosition(int d)
Localizable
getIntPosition
in interface Localizable
d
- dimensionpublic long getLongPosition(int d)
Localizable
getLongPosition
in interface Localizable
d
- dimensionpublic void move(long distance, int d)
move
in interface Positionable
distance
- relative offset in dimension dd
- dimensionpublic void move(int distance, int d)
Positionable
move
in interface Positionable
distance
- relative offset in dimension dd
- dimensionpublic void move(Localizable localizable)
Positionable
Localizable
as distance vector.move
in interface Positionable
localizable
- relative offset, EuclideanSpace.numDimensions()
must be
≥ EuclideanSpace.numDimensions()
public void move(int[] distance)
Positionable
move
in interface Positionable
distance
- relative offset, length must be ≥ EuclideanSpace.numDimensions()
public void move(long[] distance)
Positionable
move
in interface Positionable
distance
- relative offset, length must be ≥ EuclideanSpace.numDimensions()
public void setPosition(int position, int d)
Positionable
setPosition
in interface Positionable
position
- absolute position in dimension dd
- dimensionpublic void setPosition(Localizable localizable)
Positionable
Localizable
setPosition
in interface Positionable
localizable
- absolute position, EuclideanSpace.numDimensions()
must be
≥ EuclideanSpace.numDimensions()
public void setPosition(int[] position)
Positionable
setPosition
in interface Positionable
position
- absolute position, length must be ≥
EuclideanSpace.numDimensions()
public void setPosition(long[] position)
Positionable
setPosition
in interface Positionable
position
- absolute position, length must be ≥
EuclideanSpace.numDimensions()
Copyright © 2015–2022 ImgLib2. All rights reserved.