T
- the pixel typepublic class LinearRealRandomAccessibleStackInterpolator<T extends NumericType<T>> extends NearestNeighborRealRandomAccessibleStackInterpolator<T>
RealRandomAccessible
s.
When changing any dimension of the position, except the (n+1)th,
this position change is applied to the two active slice
RealRandomAccess
es. When changing the (n+1)th dimension of
the position, two new slice RealRandomAccess
es becomes active, are
set to the position of the previously active slice
RealRandomAccess
es. Initially, only two RealRandomAccess
es
for the first two slice are created, other slice RealRandomAccess
es
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, slices
n
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, move
numDimensions
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setPositionAndGet, setPositionAndGet, setPositionAndGet
localize, positionAsDoubleArray, positionAsRealPoint
numDimensions
protected 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)
Positionable
fwd
in interface Positionable
fwd
in class NearestNeighborRealRandomAccessibleStackInterpolator<T extends NumericType<T>>
d
- dimensionpublic void bck(int d)
Positionable
bck
in interface Positionable
bck
in class NearestNeighborRealRandomAccessibleStackInterpolator<T extends NumericType<T>>
d
- dimensionpublic void move(double distance, int d)
RealPositionable
move
in interface RealPositionable
move
in class NearestNeighborRealRandomAccessibleStackInterpolator<T extends NumericType<T>>
public void move(RealLocalizable distance)
RealPositionable
RealLocalizable
as distance vector.move
in interface RealPositionable
move
in class NearestNeighborRealRandomAccessibleStackInterpolator<T extends NumericType<T>>
distance
- relative offset, EuclideanSpace.numDimensions()
must
be ≥ EuclideanSpace.numDimensions()
public void move(Localizable distance)
Positionable
Localizable
as distance vector.move
in interface Positionable
move
in class NearestNeighborRealRandomAccessibleStackInterpolator<T extends NumericType<T>>
distance
- relative offset, EuclideanSpace.numDimensions()
must be
≥ EuclideanSpace.numDimensions()
public void move(int[] distance)
Positionable
move
in interface Positionable
move
in class NearestNeighborRealRandomAccessibleStackInterpolator<T extends NumericType<T>>
distance
- relative offset, length must be ≥ EuclideanSpace.numDimensions()
public void move(long[] distance)
Positionable
move
in interface Positionable
move
in class NearestNeighborRealRandomAccessibleStackInterpolator<T extends NumericType<T>>
distance
- relative offset, length must be ≥ EuclideanSpace.numDimensions()
public void move(double[] distance)
RealPositionable
move
in interface RealPositionable
move
in class NearestNeighborRealRandomAccessibleStackInterpolator<T extends NumericType<T>>
public void move(float[] distance)
RealPositionable
move
in interface RealPositionable
move
in class NearestNeighborRealRandomAccessibleStackInterpolator<T extends NumericType<T>>
public void setPosition(Localizable position)
Positionable
Localizable
setPosition
in interface Positionable
setPosition
in class NearestNeighborRealRandomAccessibleStackInterpolator<T extends NumericType<T>>
position
- absolute position, EuclideanSpace.numDimensions()
must be
≥ EuclideanSpace.numDimensions()
public void setPosition(RealLocalizable position)
RealPositionable
RealLocalizable
setPosition
in interface RealPositionable
setPosition
in class NearestNeighborRealRandomAccessibleStackInterpolator<T extends NumericType<T>>
position
- absolute position, EuclideanSpace.numDimensions()
must be ≥ EuclideanSpace.numDimensions()
public void setPosition(int[] position)
Positionable
setPosition
in interface Positionable
setPosition
in class NearestNeighborRealRandomAccessibleStackInterpolator<T extends NumericType<T>>
position
- absolute position, length must be ≥
EuclideanSpace.numDimensions()
public void setPosition(long[] position)
Positionable
setPosition
in interface Positionable
setPosition
in class NearestNeighborRealRandomAccessibleStackInterpolator<T extends NumericType<T>>
position
- absolute position, length must be ≥
EuclideanSpace.numDimensions()
public void setPosition(double[] position)
RealPositionable
setPosition
in interface RealPositionable
setPosition
in class NearestNeighborRealRandomAccessibleStackInterpolator<T extends NumericType<T>>
position
- absolute position, length must be ≥
EuclideanSpace.numDimensions()
public void setPosition(float[] position)
RealPositionable
setPosition
in interface RealPositionable
setPosition
in class NearestNeighborRealRandomAccessibleStackInterpolator<T extends NumericType<T>>
position
- absolute position, length must be ≥
EuclideanSpace.numDimensions()
public void setPosition(int pos, int d)
Positionable
setPosition
in interface Positionable
setPosition
in class NearestNeighborRealRandomAccessibleStackInterpolator<T extends NumericType<T>>
pos
- absolute position in dimension dd
- dimensionpublic void setPosition(long pos, int d)
Positionable
setPosition
in interface Positionable
setPosition
in class NearestNeighborRealRandomAccessibleStackInterpolator<T extends NumericType<T>>
pos
- absolute position in dimension dd
- dimensionpublic void setPosition(float pos, int d)
RealPositionable
setPosition
in interface RealPositionable
setPosition
in class NearestNeighborRealRandomAccessibleStackInterpolator<T extends NumericType<T>>
public void setPosition(double pos, int d)
RealPositionable
setPosition
in interface RealPositionable
setPosition
in class NearestNeighborRealRandomAccessibleStackInterpolator<T extends NumericType<T>>
public T get()
Sampler
Sampler
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.