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, waitcopyRandomAccess, setPositionAndGet, setPositionAndGet, setPositionAndGetlocalize, positionAsLongArray, positionAsPointlocalize, positionAsDoubleArray, positionAsRealPointbck, fwd, setPositionprotected 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()
EuclideanSpacenumDimensions in interface EuclideanSpacepublic boolean isOutOfBounds()
BoundedisOutOfBounds in interface Boundedpublic T get()
SamplerSampler 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)
RealLocalizablelocalize in interface RealLocalizablepos - receives current positionpublic void localize(double[] pos)
RealLocalizablelocalize in interface RealLocalizablepos - receives current positionpublic void localize(int[] pos)
Localizablelocalize in interface Localizablepos - receives current positionpublic void localize(long[] pos)
Localizablelocalize in interface Localizablepos - receives current positionpublic float getFloatPosition(int d)
RealLocalizablegetFloatPosition in interface LocalizablegetFloatPosition in interface RealLocalizabled - dimensionpublic double getDoublePosition(int d)
RealLocalizablegetDoublePosition in interface LocalizablegetDoublePosition in interface RealLocalizabled - dimensionpublic int getIntPosition(int d)
LocalizablegetIntPosition in interface Localizabled - dimensionpublic long getLongPosition(int d)
LocalizablegetLongPosition in interface Localizabled - dimensionpublic void move(long distance,
int d)
move in interface Positionabledistance - relative offset in dimension dd - dimensionpublic void move(int distance,
int d)
Positionablemove in interface Positionabledistance - relative offset in dimension dd - dimensionpublic void move(Localizable localizable)
PositionableLocalizable as distance vector.move in interface Positionablelocalizable - relative offset, EuclideanSpace.numDimensions() must be
≥ EuclideanSpace.numDimensions()public void move(int[] distance)
Positionablemove in interface Positionabledistance - relative offset, length must be ≥ EuclideanSpace.numDimensions()public void move(long[] distance)
Positionablemove in interface Positionabledistance - relative offset, length must be ≥ EuclideanSpace.numDimensions()public void setPosition(int position,
int d)
PositionablesetPosition in interface Positionableposition - absolute position in dimension dd - dimensionpublic void setPosition(Localizable localizable)
PositionableLocalizablesetPosition in interface Positionablelocalizable - absolute position, EuclideanSpace.numDimensions() must be
≥ EuclideanSpace.numDimensions()public void setPosition(int[] position)
PositionablesetPosition in interface Positionableposition - absolute position, length must be ≥
EuclideanSpace.numDimensions()public void setPosition(long[] position)
PositionablesetPosition in interface Positionableposition - absolute position, length must be ≥
EuclideanSpace.numDimensions()Copyright © 2015–2022 ImgLib2. All rights reserved.