Class InverseDistanceWeightingInterpolator<T extends RealType<T>>
java.lang.Object
net.imglib2.AbstractEuclideanSpace
net.imglib2.AbstractRealLocalizable
net.imglib2.RealPoint
net.imglib2.interpolation.neighborsearch.InverseDistanceWeightingInterpolator<T>
- Type Parameters:
T-
- All Implemented Interfaces:
EuclideanSpace,Positionable,RealLocalizable,RealPositionable,RealRandomAccess<T>,Sampler<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.- Author:
- Stephan Preibisch, Stephan Saalfeld
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final doubleprotected final KNearestNeighborSearch<T> Fields inherited from class net.imglib2.AbstractRealLocalizable
positionFields inherited from class net.imglib2.AbstractEuclideanSpace
n -
Constructor Summary
ConstructorsConstructorDescriptionInverseDistanceWeightingInterpolator(KNearestNeighborSearch<T> search, double p) Creates a newInverseDistanceWeightingInterpolatorbased on aKNearestNeighborSearch. -
Method Summary
Modifier and TypeMethodDescriptionprotected doublecomputeWeight(double squareDistance) copy()get()Access the actual T instance providing access to a pixel, sub-pixel or integral region value theSamplerpoints at.Methods inherited from class net.imglib2.RealPoint
bck, fwd, move, move, move, move, move, move, move, move, move, move, setPosition, setPosition, setPosition, setPosition, setPosition, setPosition, setPosition, setPosition, setPosition, setPosition, toString, wrapMethods inherited from class net.imglib2.AbstractRealLocalizable
getDoublePosition, getFloatPosition, localize, localizeMethods inherited from class net.imglib2.AbstractEuclideanSpace
numDimensionsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.imglib2.EuclideanSpace
numDimensionsMethods inherited from interface net.imglib2.Positionable
bck, fwd, move, move, move, move, move, setPosition, setPosition, setPosition, setPosition, setPositionMethods inherited from interface net.imglib2.RealLocalizable
getDoublePosition, getFloatPosition, localize, localizeMethods inherited from interface net.imglib2.RealPositionable
move, move, move, move, move, setPosition, setPosition, setPosition, setPosition, setPosition
-
Field Details
-
minThreshold
protected static final double minThreshold- See Also:
-
search
-
-
Constructor Details
-
InverseDistanceWeightingInterpolator
Creates a newInverseDistanceWeightingInterpolatorbased on aKNearestNeighborSearch.- Parameters:
search- - theKNearestNeighborSearchp- power applied to the distance, higher values result in 'sharper' results, 0 results in a non-weighted mean of the k nearest neighbors.
-
-
Method Details
-
get
Description copied from interface:SamplerAccess the actual T instance providing access to a pixel, sub-pixel or integral region value theSamplerpoints at. -
computeWeight
protected double computeWeight(double squareDistance) -
copy
- Specified by:
copyin interfaceSampler<T extends RealType<T>>- Returns:
- - A new
Samplerin the same state accessing the same values. It does NOT copy T, just the state of theSampler. 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 anArrayCursorfor example)
-
copyRealRandomAccess
- Specified by:
copyRealRandomAccessin interfaceRealRandomAccess<T extends RealType<T>>
-