ITK
4.8.0
Insight Segmentation and Registration Toolkit
|
#include <itkKdTree.h>
data structure for storing k-nearest neighbor search result (k number of Neighbors)
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 534 of file itkKdTree.h.
Public Member Functions | |
const std::vector< double > & | GetDistances () const |
double | GetLargestDistance () |
InstanceIdentifier | GetNeighbor (unsigned int index) const |
const InstanceIdentifierVectorType & | GetNeighbors () const |
NearestNeighbors () | |
~NearestNeighbors () | |
void | resize (unsigned int k) |
void | ReplaceFarthestNeighbor (InstanceIdentifier id, double distance) |
Private Attributes | |
std::vector< double > | m_Distances |
unsigned int | m_FarthestNeighborIndex |
InstanceIdentifierVectorType | m_Identifiers |
|
inline |
Constructor
Definition at line 538 of file itkKdTree.h.
|
inline |
Destructor
Definition at line 541 of file itkKdTree.h.
|
inline |
Returns the vector of k-neighbors' instance identifiers
Definition at line 594 of file itkKdTree.h.
References itk::Statistics::KdTree< TSample >::NearestNeighbors::m_Distances.
|
inline |
Returns the distance of the farthest neighbor from the query point
Definition at line 556 of file itkKdTree.h.
References itk::Statistics::KdTree< TSample >::NearestNeighbors::m_Distances, and itk::Statistics::KdTree< TSample >::NearestNeighbors::m_FarthestNeighborIndex.
|
inline |
Returns the instance identifier of the index-th neighbor among k-neighbors
Definition at line 588 of file itkKdTree.h.
References itk::Statistics::KdTree< TSample >::NearestNeighbors::m_Identifiers.
|
inline |
Returns the vector of k-neighbors' instance identifiers
Definition at line 581 of file itkKdTree.h.
References itk::Statistics::KdTree< TSample >::NearestNeighbors::m_Identifiers.
|
inline |
Replaces the farthest neighbor's instance identifier and distance value with the id and the distance
Definition at line 563 of file itkKdTree.h.
References itk::Statistics::KdTree< TSample >::NearestNeighbors::m_Distances, itk::Statistics::KdTree< TSample >::NearestNeighbors::m_FarthestNeighborIndex, itk::Statistics::KdTree< TSample >::NearestNeighbors::m_Identifiers, and itk::NumericTraits< T >::min().
|
inline |
Initialize the internal instance identifier and distance holders with the size, k
Definition at line 545 of file itkKdTree.h.
References itk::Statistics::KdTree< TSample >::NearestNeighbors::m_Distances, itk::Statistics::KdTree< TSample >::NearestNeighbors::m_FarthestNeighborIndex, and itk::Statistics::KdTree< TSample >::NearestNeighbors::m_Identifiers.
|
private |
Storage for the distance values of k-neighbors from the query point
Definition at line 608 of file itkKdTree.h.
Referenced by itk::Statistics::KdTree< TSample >::NearestNeighbors::GetDistances(), itk::Statistics::KdTree< TSample >::NearestNeighbors::GetLargestDistance(), itk::Statistics::KdTree< TSample >::NearestNeighbors::ReplaceFarthestNeighbor(), and itk::Statistics::KdTree< TSample >::NearestNeighbors::resize().
|
private |
The index of the farthest neighbor among k-neighbors
Definition at line 601 of file itkKdTree.h.
Referenced by itk::Statistics::KdTree< TSample >::NearestNeighbors::GetLargestDistance(), itk::Statistics::KdTree< TSample >::NearestNeighbors::ReplaceFarthestNeighbor(), and itk::Statistics::KdTree< TSample >::NearestNeighbors::resize().
|
private |
Storage for the instance identifiers of k-neighbors
Definition at line 604 of file itkKdTree.h.
Referenced by itk::Statistics::KdTree< TSample >::NearestNeighbors::GetNeighbor(), itk::Statistics::KdTree< TSample >::NearestNeighbors::GetNeighbors(), itk::Statistics::KdTree< TSample >::NearestNeighbors::ReplaceFarthestNeighbor(), and itk::Statistics::KdTree< TSample >::NearestNeighbors::resize().