#include <itkKdTree.h>
This class stores the instance identifiers and the distance values of k-nearest neighbors. We can also query the farthest neighbor's distance from the query point using the GetLargestDistance method.
Definition at line 411 of file itkKdTree.h.
Public Member Functions | |
std::vector< double > & | GetDistances () |
double | GetLargestDistance () |
InstanceIdentifier | GetNeighbor (unsigned int index) |
InstanceIdentifierVectorType | GetNeighbors () |
NearestNeighbors () | |
~NearestNeighbors () | |
void | ReplaceFarthestNeighbor (InstanceIdentifier id, double distance) |
void | resize (unsigned int k) |
itk::Statistics::KdTree< TSample >::NearestNeighbors::NearestNeighbors | ( | ) | [inline] |
Constructor
Definition at line 415 of file itkKdTree.h.
itk::Statistics::KdTree< TSample >::NearestNeighbors::~NearestNeighbors | ( | ) | [inline] |
Destructor
Definition at line 418 of file itkKdTree.h.
std::vector< double >& itk::Statistics::KdTree< TSample >::NearestNeighbors::GetDistances | ( | ) | [inline] |
Returns the vector of k-neighbors' instance identifiers
Definition at line 465 of file itkKdTree.h.
double itk::Statistics::KdTree< TSample >::NearestNeighbors::GetLargestDistance | ( | ) | [inline] |
Returns the distance of the farthest neighbor from the query point
Definition at line 433 of file itkKdTree.h.
InstanceIdentifier itk::Statistics::KdTree< TSample >::NearestNeighbors::GetNeighbor | ( | unsigned int | index | ) | [inline] |
Returns the instance identifier of the index-th neighbor among k-neighbors
Definition at line 461 of file itkKdTree.h.
InstanceIdentifierVectorType itk::Statistics::KdTree< TSample >::NearestNeighbors::GetNeighbors | ( | ) | [inline] |
Returns the vector of k-neighbors' instance identifiers
Definition at line 456 of file itkKdTree.h.
void itk::Statistics::KdTree< TSample >::NearestNeighbors::ReplaceFarthestNeighbor | ( | InstanceIdentifier | id, | |
double | distance | |||
) | [inline] |
Replaces the farthest neighbor's instance identifier and distance value with the id and the distance
Definition at line 438 of file itkKdTree.h.
void itk::Statistics::KdTree< TSample >::NearestNeighbors::resize | ( | unsigned int | k | ) | [inline] |
Initialize the internal instance identifier and distance holders with the size, k
Definition at line 422 of file itkKdTree.h.