T
- public class InverseDistanceWeightingInterpolator<T extends RealType<T>> extends RealPoint implements RealRandomAccess<T>
RealRandomAccess
to a KNearestNeighborSearch
whose sample
value is generated by weighting the k nearest neighbors of a query
real coordinate by their inverse distance to an arbitrary power p.Modifier and Type | Field and Description |
---|---|
protected static double |
minThreshold |
protected KNearestNeighborSearch<T> |
search |
position
n
Constructor and Description |
---|
InverseDistanceWeightingInterpolator(KNearestNeighborSearch<T> search,
double p)
Creates a new
InverseDistanceWeightingInterpolator based on a
KNearestNeighborSearch . |
Modifier and Type | Method and Description |
---|---|
protected double |
computeWeight(double squareDistance) |
InverseDistanceWeightingInterpolator<T> |
copy() |
InverseDistanceWeightingInterpolator<T> |
copyRealRandomAccess() |
T |
get()
Access the actual T instance providing access to a pixel,
sub-pixel or integral region value the
Sampler points at. |
bck, equals, fwd, hashCode, move, move, move, move, move, move, move, move, move, move, setPosition, setPosition, setPosition, setPosition, setPosition, setPosition, setPosition, setPosition, setPosition, setPosition, toString, wrap
getDoublePosition, getFloatPosition, localize, localize
numDimensions
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
setPositionAndGet, setPositionAndGet, setPositionAndGet
getDoublePosition, getFloatPosition, localize, localize, localize, positionAsDoubleArray, positionAsRealPoint
move, move, move, move, move, setPosition, setPosition, setPosition, setPosition, setPosition
bck, fwd, move, move, move, move, move, setPosition, setPosition, setPosition, setPosition, setPosition
numDimensions
protected static final double minThreshold
protected final KNearestNeighborSearch<T extends RealType<T>> search
public InverseDistanceWeightingInterpolator(KNearestNeighborSearch<T> search, double p)
InverseDistanceWeightingInterpolator
based on a
KNearestNeighborSearch
.search
- - the KNearestNeighborSearch
p
- power applied to the distance, higher values result in
'sharper' results, 0 results in a non-weighted mean of the
k nearest neighbors.public T get()
Sampler
Sampler
points at.protected double computeWeight(double squareDistance)
public InverseDistanceWeightingInterpolator<T> copy()
copy
in interface Sampler<T extends RealType<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 InverseDistanceWeightingInterpolator<T> copyRealRandomAccess()
copyRealRandomAccess
in interface RealRandomAccess<T extends RealType<T>>
Copyright © 2015–2022 ImgLib2. All rights reserved.