Package net.imglib2.neighborsearch
Interface NearestNeighborSearch<T>
-
- All Superinterfaces:
EuclideanSpace
- All Known Subinterfaces:
KNearestNeighborSearch<T>
- All Known Implementing Classes:
KNearestNeighborSearchOnIterableRealInterval
,KNearestNeighborSearchOnKDTree
,NearestNeighborSearchOnIterableRealInterval
,NearestNeighborSearchOnKDTree
public interface NearestNeighborSearch<T> extends EuclideanSpace
Nearest-neighbor search in an Euclidean space. The interface describes implementations that perform the search for a specified location and provide access to the data, location and distance of the found nearest neighbor until the next search is performed. In a multi-threaded application, each thread will thus need its ownNearestNeighborSearch
.- Author:
- Stephan Saalfeld
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description NearestNeighborSearch<T>
copy()
Create a copy.double
getDistance()
Access the Euclidean distance between the reference location as used for the last search and the nearest neighbor, ordered by square Euclidean distance.RealLocalizable
getPosition()
Access the position of the nearest neighbor, ordered by square Euclidean distance.Sampler<T>
getSampler()
Access the data of the nearest neighbor.double
getSquareDistance()
Access the square Euclidean distance between the reference location as used for the last search and the nearest neighbor, ordered by square Euclidean distance.void
search(RealLocalizable reference)
Perform nearest-neighbor search for a reference coordinate.-
Methods inherited from interface net.imglib2.EuclideanSpace
numDimensions
-
-
-
-
Method Detail
-
search
void search(RealLocalizable reference)
Perform nearest-neighbor search for a reference coordinate.- Parameters:
reference
-
-
getSampler
Sampler<T> getSampler()
Access the data of the nearest neighbor. Data is accessed through aSampler
that guarantees write access if the underlying data set is writable.
-
getPosition
RealLocalizable getPosition()
Access the position of the nearest neighbor, ordered by square Euclidean distance.
-
getSquareDistance
double getSquareDistance()
Access the square Euclidean distance between the reference location as used for the last search and the nearest neighbor, ordered by square Euclidean distance.
-
getDistance
double getDistance()
Access the Euclidean distance between the reference location as used for the last search and the nearest neighbor, ordered by square Euclidean distance.
-
copy
NearestNeighborSearch<T> copy()
Create a copy.
-
-