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>, Typed<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.
  • Field Details

  • Constructor Details

  • Method Details

    • get

      public T get()
      Description copied from interface: Sampler
      Access the actual T instance providing access to a pixel, sub-pixel or integral region value the Sampler points at.
      Specified by:
      get in interface Sampler<T extends RealType<T>>
    • getType

      public T getType()
      Description copied from interface: Typed
      Get an instance of T.

      It should not be assumed that the returned T instance is an independent copy. In particular, repeated calls to getType() may return the same instance.

      Specified by:
      getType in interface Sampler<T extends RealType<T>>
      Specified by:
      getType in interface Typed<T extends RealType<T>>
      Returns:
      an instance of T
    • computeWeight

      protected double computeWeight(double squareDistance)
    • copy

      Specified by:
      copy in interface RealRandomAccess<T extends RealType<T>>
      Specified by:
      copy in interface Sampler<T extends RealType<T>>
      Returns:
      - A new 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)