T - public final class FullSourceMapMixedRandomAccess<T> extends AbstractEuclideanSpace implements RandomAccess<T>
source RandomAccess which is related to this by a
Mixed transformToSource. This is for Mixed transforms
that feature a full mapping of source to target components. That is, there is
no down-projection, no source component is discarded. In this case, the
current position can be recovered from the position of the source
RandomAccess. Localize can be implemented via localize on the source
RandomAccess.
For the general case, see MixedRandomAccess.
n| Modifier | Constructor and Description |
|---|---|
protected |
FullSourceMapMixedRandomAccess(FullSourceMapMixedRandomAccess<T> randomAccess) |
| Modifier and Type | Method and Description |
|---|---|
void |
bck(int d)
Move by -1 in one dimension.
|
FullSourceMapMixedRandomAccess<T> |
copy() |
FullSourceMapMixedRandomAccess<T> |
copyRandomAccess() |
void |
fwd(int d)
Move by 1 in one dimension.
|
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.
|
void |
localize(double[] position)
Write the current position into the passed array.
|
void |
localize(float[] position)
Write the current position into the passed array.
|
void |
localize(int[] position)
Write the current position into the passed array.
|
void |
localize(long[] position)
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)
Move the element in one dimension for some distance.
|
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.
|
void |
setPosition(long position,
int d)
Set the position of the element for one dimension.
|
numDimensionsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsetPositionAndGet, setPositionAndGet, setPositionAndGetlocalize, positionAsLongArray, positionAsPointlocalize, positionAsDoubleArray, positionAsRealPointnumDimensionsprotected FullSourceMapMixedRandomAccess(FullSourceMapMixedRandomAccess<T> randomAccess)
public void localize(int[] position)
Localizablelocalize in interface Localizableposition - receives current positionpublic void localize(long[] position)
Localizablelocalize in interface Localizableposition - receives current positionpublic int getIntPosition(int d)
LocalizablegetIntPosition in interface Localizabled - dimensionpublic long getLongPosition(int d)
LocalizablegetLongPosition in interface Localizabled - dimensionpublic void localize(float[] position)
RealLocalizablelocalize in interface RealLocalizableposition - receives current positionpublic void localize(double[] position)
RealLocalizablelocalize in interface RealLocalizableposition - 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 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[] 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()public void setPosition(int position,
int d)
PositionablesetPosition in interface Positionableposition - absolute position in dimension dd - dimensionpublic void setPosition(long position,
int d)
PositionablesetPosition in interface Positionableposition - absolute position in dimension dd - dimensionpublic T get()
SamplerSampler points at.public FullSourceMapMixedRandomAccess<T> copy()
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 FullSourceMapMixedRandomAccess<T> copyRandomAccess()
copyRandomAccess in interface RandomAccess<T>Copyright © 2015–2022 ImgLib2. All rights reserved.