T - public class UnsafeRandomAccess<T extends NativeLongAccessType<T>> extends AbstractLocalizable implements RandomAccess<T>
RandomAccess on an ArrayImg.| Modifier and Type | Field and Description |
|---|---|
protected T |
type |
positionn| Modifier | Constructor and Description |
|---|---|
|
UnsafeRandomAccess(UnsafeImg<T,?> container) |
protected |
UnsafeRandomAccess(UnsafeRandomAccess<T> randomAccess) |
| Modifier and Type | Method and Description |
|---|---|
void |
bck(int d)
Move by -1 in one dimension.
|
void |
bckDim0()
Moves one step backward in dimension 0
|
UnsafeRandomAccess<T> |
copy() |
UnsafeRandomAccess<T> |
copyRandomAccess() |
void |
fwd(int d)
Move by 1 in one dimension.
|
void |
fwdDim0()
Moves one step forward in dimension 0
|
T |
get()
Access the actual T instance providing access to a pixel,
sub-pixel or integral region value the
Sampler points at. |
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)
Moves n steps in dimension 0
|
void |
move(long[] distance)
Move the element relative to its current location using a long[] as
distance vector.
|
void |
move(long distance,
int d)
Move the element in one dimension for some distance.
|
void |
moveDim0(int distance)
Moves n steps in dimension 0
|
void |
setPosition(int[] pos)
Set the position of the element.
|
void |
setPosition(int pos,
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[] pos)
Set the position of the element.
|
void |
setPosition(long pos,
int d)
Set the position of the element for one dimension.
|
void |
setPositionDim0(int pos)
Sets the
UnsafeRandomAccess to a certain position in dimension 0
Careful: it assumes that it is only a one-dimensional image, all other
dimensions would be set to zero (this saves one subtraction) |
void |
setPositionDim0(long pos)
Sets the
UnsafeRandomAccess to a certain position in dimension 0
Careful: it assumes that it is only a one-dimensional image, all other
dimensions would be set to zero (this saves one subtraction) |
getDoublePosition, getFloatPosition, getIntPosition, getLongPosition, localize, localize, localize, localizenumDimensionsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsetPositionAndGet, setPositionAndGet, setPositionAndGetgetDoublePosition, getFloatPosition, getIntPosition, getLongPosition, localize, localize, localize, positionAsLongArray, positionAsPointlocalize, localize, localize, positionAsDoubleArray, positionAsRealPointnumDimensionsprotected final T extends NativeLongAccessType<T> type
protected UnsafeRandomAccess(UnsafeRandomAccess<T> randomAccess)
public T get()
SamplerSampler points at.get in interface Sampler<T extends NativeLongAccessType<T>>public void fwd(int d)
Positionablefwd in interface Positionabled - dimensionpublic void bck(int d)
Positionablebck in interface Positionabled - dimensionpublic void move(int distance,
int d)
Positionablemove in interface Positionabledistance - relative offset in dimension dd - dimensionpublic void move(long 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(Localizable localizable)
PositionableLocalizablesetPosition in interface Positionablelocalizable - absolute position, EuclideanSpace.numDimensions() must be
≥ EuclideanSpace.numDimensions()public void setPosition(int[] pos)
PositionablesetPosition in interface Positionablepos - absolute position, length must be ≥
EuclideanSpace.numDimensions()public void setPosition(long[] pos)
PositionablesetPosition in interface Positionablepos - absolute position, length must be ≥
EuclideanSpace.numDimensions()public void setPosition(int pos,
int d)
PositionablesetPosition in interface Positionablepos - absolute position in dimension dd - dimensionpublic void setPosition(long pos,
int d)
PositionablesetPosition in interface Positionablepos - absolute position in dimension dd - dimensionpublic UnsafeRandomAccess<T> copy()
copy in interface Sampler<T extends NativeLongAccessType<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 UnsafeRandomAccess<T> copyRandomAccess()
copyRandomAccess in interface RandomAccess<T extends NativeLongAccessType<T>>public void fwdDim0()
public void bckDim0()
public void moveDim0(int distance)
distance - - how many steps (positive or negative)public void move(long distance)
distance - - how many steps (positive or negative)public void setPositionDim0(int pos)
UnsafeRandomAccess to a certain position in dimension 0
Careful: it assumes that it is only a one-dimensional image, all other
dimensions would be set to zero (this saves one subtraction)pos - - the new positionpublic void setPositionDim0(long pos)
UnsafeRandomAccess to a certain position in dimension 0
Careful: it assumes that it is only a one-dimensional image, all other
dimensions would be set to zero (this saves one subtraction)pos - - the new positionCopyright © 2015–2022 ImgLib2. All rights reserved.