T - the pixel typepublic class LinearRealRandomAccessibleStackInterpolator<T extends NumericType<T>> extends NearestNeighborRealRandomAccessibleStackInterpolator<T>
RealRandomAccessibles.
When changing any dimension of the position, except the (n+1)th,
this position change is applied to the two active slice
RealRandomAccesses. When changing the (n+1)th dimension of
the position, two new slice RealRandomAccesses becomes active, are
set to the position of the previously active slice
RealRandomAccesses. Initially, only two RealRandomAccesses
for the first two slice are created, other slice RealRandomAccesses
are created on demand but stored for later re-use.
| Modifier and Type | Field and Description |
|---|---|
protected RealRandomAccess<T> |
sliceAccess2 |
protected T |
tmp
required because (a - b) in (a - b) * w + b cannot become
negative value in unsigned types and NumericType is not Comparable
so we cannot have decide which of the two options
(a - b) * w + b or (b - a) * w1 + a
could work
|
protected T |
value |
protected double |
w |
protected double |
w1 |
lastSliceIndex, position, sd, sliceAccess, sliceAccesses, sliceIndex, slicesn| Modifier | Constructor and Description |
|---|---|
protected |
LinearRealRandomAccessibleStackInterpolator(LinearRealRandomAccessibleStackInterpolator<T> a) |
|
LinearRealRandomAccessibleStackInterpolator(List<RealRandomAccessible<T>> slices) |
|
LinearRealRandomAccessibleStackInterpolator(RealRandomAccessible<T>[] slices) |
| Modifier and Type | Method and Description |
|---|---|
void |
bck(int d)
Move by -1 in one dimension.
|
LinearRealRandomAccessibleStackInterpolator<T> |
copy() |
LinearRealRandomAccessibleStackInterpolator<T> |
copyRealRandomAccess() |
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. |
protected int |
getSliceIndex(double position) |
void |
move(double[] distance)
Move the element relative to its current location using a float[] as
distance vector.
|
void |
move(double distance,
int d)
Move the element in one dimension for some distance.
|
void |
move(float[] distance)
Move the element relative to its current location using a float[] as
distance vector.
|
void |
move(int[] distance)
Move the element relative to its current location using an int[] as
distance vector.
|
void |
move(Localizable distance)
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(RealLocalizable distance)
Move the element relative to its current location using a
RealLocalizable as distance vector. |
void |
setPosition(double[] position)
Set the position of the element.
|
void |
setPosition(double pos,
int d)
Set the position of the element for one dimension.
|
void |
setPosition(float[] position)
Set the position of the element.
|
void |
setPosition(float pos,
int d)
Set the position of the element for one dimension.
|
void |
setPosition(int[] position)
Set the position of the element.
|
void |
setPosition(int pos,
int d)
Set the position of the element for one dimension.
|
void |
setPosition(Localizable position)
Place the element at the same location as a given
Localizable |
void |
setPosition(long[] position)
Set the position of the element.
|
void |
setPosition(long pos,
int d)
Set the position of the element for one dimension.
|
void |
setPosition(RealLocalizable position)
Place the element at the same location as a given
RealLocalizable |
protected void |
setSlice(int i) |
protected void |
updateSlice(int i) |
protected void |
updateW() |
getDoublePosition, getFloatPosition, getOrCreateAccess, localize, localize, move, move, movenumDimensionsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsetPositionAndGet, setPositionAndGet, setPositionAndGetlocalize, positionAsDoubleArray, positionAsRealPointnumDimensionsprotected RealRandomAccess<T extends NumericType<T>> sliceAccess2
protected final T extends NumericType<T> value
protected final T extends NumericType<T> tmp
protected double w
protected double w1
public LinearRealRandomAccessibleStackInterpolator(RealRandomAccessible<T>[] slices)
public LinearRealRandomAccessibleStackInterpolator(List<RealRandomAccessible<T>> slices)
protected LinearRealRandomAccessibleStackInterpolator(LinearRealRandomAccessibleStackInterpolator<T> a)
protected int getSliceIndex(double position)
getSliceIndex in class NearestNeighborRealRandomAccessibleStackInterpolator<T extends NumericType<T>>protected void setSlice(int i)
setSlice in class NearestNeighborRealRandomAccessibleStackInterpolator<T extends NumericType<T>>protected void updateSlice(int i)
updateSlice in class NearestNeighborRealRandomAccessibleStackInterpolator<T extends NumericType<T>>protected void updateW()
public void fwd(int d)
Positionablefwd in interface Positionablefwd in class NearestNeighborRealRandomAccessibleStackInterpolator<T extends NumericType<T>>d - dimensionpublic void bck(int d)
Positionablebck in interface Positionablebck in class NearestNeighborRealRandomAccessibleStackInterpolator<T extends NumericType<T>>d - dimensionpublic void move(double distance,
int d)
RealPositionablemove in interface RealPositionablemove in class NearestNeighborRealRandomAccessibleStackInterpolator<T extends NumericType<T>>public void move(RealLocalizable distance)
RealPositionableRealLocalizable as distance vector.move in interface RealPositionablemove in class NearestNeighborRealRandomAccessibleStackInterpolator<T extends NumericType<T>>distance - relative offset, EuclideanSpace.numDimensions() must
be ≥ EuclideanSpace.numDimensions()public void move(Localizable distance)
PositionableLocalizable as distance vector.move in interface Positionablemove in class NearestNeighborRealRandomAccessibleStackInterpolator<T extends NumericType<T>>distance - relative offset, EuclideanSpace.numDimensions() must be
≥ EuclideanSpace.numDimensions()public void move(int[] distance)
Positionablemove in interface Positionablemove in class NearestNeighborRealRandomAccessibleStackInterpolator<T extends NumericType<T>>distance - relative offset, length must be ≥ EuclideanSpace.numDimensions()public void move(long[] distance)
Positionablemove in interface Positionablemove in class NearestNeighborRealRandomAccessibleStackInterpolator<T extends NumericType<T>>distance - relative offset, length must be ≥ EuclideanSpace.numDimensions()public void move(double[] distance)
RealPositionablemove in interface RealPositionablemove in class NearestNeighborRealRandomAccessibleStackInterpolator<T extends NumericType<T>>public void move(float[] distance)
RealPositionablemove in interface RealPositionablemove in class NearestNeighborRealRandomAccessibleStackInterpolator<T extends NumericType<T>>public void setPosition(Localizable position)
PositionableLocalizablesetPosition in interface PositionablesetPosition in class NearestNeighborRealRandomAccessibleStackInterpolator<T extends NumericType<T>>position - absolute position, EuclideanSpace.numDimensions() must be
≥ EuclideanSpace.numDimensions()public void setPosition(RealLocalizable position)
RealPositionableRealLocalizablesetPosition in interface RealPositionablesetPosition in class NearestNeighborRealRandomAccessibleStackInterpolator<T extends NumericType<T>>position - absolute position, EuclideanSpace.numDimensions()
must be ≥ EuclideanSpace.numDimensions()public void setPosition(int[] position)
PositionablesetPosition in interface PositionablesetPosition in class NearestNeighborRealRandomAccessibleStackInterpolator<T extends NumericType<T>>position - absolute position, length must be ≥
EuclideanSpace.numDimensions()public void setPosition(long[] position)
PositionablesetPosition in interface PositionablesetPosition in class NearestNeighborRealRandomAccessibleStackInterpolator<T extends NumericType<T>>position - absolute position, length must be ≥
EuclideanSpace.numDimensions()public void setPosition(double[] position)
RealPositionablesetPosition in interface RealPositionablesetPosition in class NearestNeighborRealRandomAccessibleStackInterpolator<T extends NumericType<T>>position - absolute position, length must be ≥
EuclideanSpace.numDimensions()public void setPosition(float[] position)
RealPositionablesetPosition in interface RealPositionablesetPosition in class NearestNeighborRealRandomAccessibleStackInterpolator<T extends NumericType<T>>position - absolute position, length must be ≥
EuclideanSpace.numDimensions()public void setPosition(int pos,
int d)
PositionablesetPosition in interface PositionablesetPosition in class NearestNeighborRealRandomAccessibleStackInterpolator<T extends NumericType<T>>pos - absolute position in dimension dd - dimensionpublic void setPosition(long pos,
int d)
PositionablesetPosition in interface PositionablesetPosition in class NearestNeighborRealRandomAccessibleStackInterpolator<T extends NumericType<T>>pos - absolute position in dimension dd - dimensionpublic void setPosition(float pos,
int d)
RealPositionablesetPosition in interface RealPositionablesetPosition in class NearestNeighborRealRandomAccessibleStackInterpolator<T extends NumericType<T>>public void setPosition(double pos,
int d)
RealPositionablesetPosition in interface RealPositionablesetPosition in class NearestNeighborRealRandomAccessibleStackInterpolator<T extends NumericType<T>>public T get()
SamplerSampler points at.get in interface Sampler<T extends NumericType<T>>get in class NearestNeighborRealRandomAccessibleStackInterpolator<T extends NumericType<T>>public LinearRealRandomAccessibleStackInterpolator<T> copy()
copy in interface Sampler<T extends NumericType<T>>copy in class NearestNeighborRealRandomAccessibleStackInterpolator<T extends NumericType<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 LinearRealRandomAccessibleStackInterpolator<T> copyRealRandomAccess()
copyRealRandomAccess in interface RealRandomAccess<T extends NumericType<T>>copyRealRandomAccess in class NearestNeighborRealRandomAccessibleStackInterpolator<T extends NumericType<T>>Copyright © 2015–2022 ImgLib2. All rights reserved.