Package net.imglib2
Class KDTree.SamplerNode<T>
- java.lang.Object
-
- net.imglib2.KDTreeNode<T>
-
- net.imglib2.KDTree.SamplerNode<T>
-
- All Implemented Interfaces:
EuclideanSpace
,RealLocalizable
,Sampler<T>
protected static final class KDTree.SamplerNode<T> extends KDTreeNode<T>
A KDTreeNode that stores it's value as a Sampler.
-
-
Field Summary
Fields Modifier and Type Field Description protected Sampler<T>
sampler
-
Fields inherited from class net.imglib2.KDTreeNode
left, n, pos, right, splitDimension
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
SamplerNode(KDTree.SamplerNode<T> node)
SamplerNode(Sampler<T> sampler, RealLocalizable position, int dimension, KDTree.SamplerNode<T> left, KDTree.SamplerNode<T> right)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description KDTree.SamplerNode<T>
copy()
T
get()
Access the actual T instance providing access to a pixel, sub-pixel or integral region value theSampler
points at.java.lang.String
toString()
-
Methods inherited from class net.imglib2.KDTreeNode
getDoublePosition, getFloatPosition, getSplitCoordinate, getSplitDimension, localize, localize, numDimensions, squDistanceTo, squDistanceTo, squDistanceTo
-
-
-
-
Constructor Detail
-
SamplerNode
public SamplerNode(Sampler<T> sampler, RealLocalizable position, int dimension, KDTree.SamplerNode<T> left, KDTree.SamplerNode<T> right)
- Parameters:
sampler
- a sampler providing the node's valueposition
- coordinates of this nodedimension
- dimension along which this node divides the spaceleft
- left child noderight
- right child node
-
SamplerNode
protected SamplerNode(KDTree.SamplerNode<T> node)
-
-
Method Detail
-
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 theSampler
points at.
-
copy
public KDTree.SamplerNode<T> copy()
- Specified by:
copy
in interfaceSampler<T>
- Specified by:
copy
in classKDTreeNode<T>
- Returns:
- - A new
Sampler
in 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 anArrayCursor
for example)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-