Package net.imglib2.neighborsearch
Interface NearestNeighborSearch<T>
- All Superinterfaces:
EuclideanSpace
- All Known Subinterfaces:
KNearestNeighborSearch<T>
- All Known Implementing Classes:
KNearestNeighborSearchOnIterableRealInterval
,KNearestNeighborSearchOnKDTree
,NearestNeighborSearchOnIterableRealInterval
,NearestNeighborSearchOnKDTree
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 own
NearestNeighborSearch
.- Author:
- Stephan Saalfeld
-
Method Summary
Modifier and TypeMethodDescriptioncopy()
Create a copy.double
Access the Euclidean distance between the reference location as used for the last search and the nearest neighbor, ordered by square Euclidean distance.Access the position of the nearest neighbor, ordered by square Euclidean distance.Access the data of the nearest neighbor.double
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 Details
-
search
Perform nearest-neighbor search for a reference coordinate.- Parameters:
reference
-
-
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.
-