Package net.imglib2

Class KDTree.ValueNode<T>

java.lang.Object
net.imglib2.KDTreeNode<T>
net.imglib2.KDTree.ValueNode<T>
All Implemented Interfaces:
EuclideanSpace, RealLocalizable, Sampler<T>
Enclosing class:
KDTree<T>

protected static final class KDTree.ValueNode<T> extends KDTreeNode<T>
A KDTreeNode that stores it's value as a reference.
  • Field Details

    • value

      protected final T value
  • Constructor Details

    • ValueNode

      public ValueNode(T value, RealLocalizable position, int dimension, KDTree.ValueNode<T> left, KDTree.ValueNode<T> right)
      Parameters:
      value - reference to the node's value
      position - coordinates of this node
      dimension - dimension along which this node divides the space
      left - left child node
      right - right child node
    • ValueNode

      protected ValueNode(KDTree.ValueNode<T> node)
  • 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.
    • copy

      public KDTree.ValueNode<T> copy()
      Specified by:
      copy in interface Sampler<T>
      Specified by:
      copy in class KDTreeNode<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)
    • toString

      public String toString()
      Overrides:
      toString in class Object