Orfeo Toolbox  4.0
Public Member Functions | Private Attributes | List of all members
itk::Statistics::KdTree< TSample >::NearestNeighbors Class Reference

data structure for storing k-nearest neighbor search result (k number of Neighbors) More...

#include <itkKdTree.h>

+ Collaboration diagram for itk::Statistics::KdTree< TSample >::NearestNeighbors:

Public Member Functions

 NearestNeighbors ()
 
 ~NearestNeighbors ()
 
const std::vector< double > & GetDistances () const
 
double GetLargestDistance ()
 
InstanceIdentifier GetNeighbor (unsigned int index) const
 
const
InstanceIdentifierVectorType
GetNeighbors () const
 
void ReplaceFarthestNeighbor (InstanceIdentifier id, double distance)
 
void resize (unsigned int k)
 

Private Attributes

std::vector< double > m_Distances
 
unsigned int m_FarthestNeighborIndex
 
InstanceIdentifierVectorType m_Identifiers
 

Detailed Description

template<typename TSample>
class itk::Statistics::KdTree< TSample >::NearestNeighbors

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.

Constructor & Destructor Documentation

template<typename TSample >
itk::Statistics::KdTree< TSample >::NearestNeighbors::NearestNeighbors ( )
inline

Constructor

Definition at line 538 of file itkKdTree.h.

template<typename TSample >
itk::Statistics::KdTree< TSample >::NearestNeighbors::~NearestNeighbors ( )
inline

Destructor

Definition at line 541 of file itkKdTree.h.

Member Function Documentation

template<typename TSample >
const std::vector<double>& itk::Statistics::KdTree< TSample >::NearestNeighbors::GetDistances ( ) const
inline

Returns the vector of k-neighbors' instance identifiers

Definition at line 592 of file itkKdTree.h.

References itk::Statistics::KdTree< TSample >::NearestNeighbors::m_Distances.

template<typename TSample >
double itk::Statistics::KdTree< TSample >::NearestNeighbors::GetLargestDistance ( )
inline
template<typename TSample >
InstanceIdentifier itk::Statistics::KdTree< TSample >::NearestNeighbors::GetNeighbor ( unsigned int  index) const
inline

Returns the instance identifier of the index-th neighbor among k-neighbors

Definition at line 586 of file itkKdTree.h.

References itk::Statistics::KdTree< TSample >::NearestNeighbors::m_Identifiers.

template<typename TSample >
const InstanceIdentifierVectorType& itk::Statistics::KdTree< TSample >::NearestNeighbors::GetNeighbors ( ) const
inline

Returns the vector of k-neighbors' instance identifiers

Definition at line 579 of file itkKdTree.h.

References itk::Statistics::KdTree< TSample >::NearestNeighbors::m_Identifiers.

Referenced by itk::Statistics::KdTree< TSample >::Search().

template<typename TSample >
void itk::Statistics::KdTree< TSample >::NearestNeighbors::ReplaceFarthestNeighbor ( InstanceIdentifier  id,
double  distance 
)
inline
template<typename TSample >
void itk::Statistics::KdTree< TSample >::NearestNeighbors::resize ( unsigned int  k)
inline

Member Data Documentation

template<typename TSample >
std::vector<double> itk::Statistics::KdTree< TSample >::NearestNeighbors::m_Distances
private
template<typename TSample >
unsigned int itk::Statistics::KdTree< TSample >::NearestNeighbors::m_FarthestNeighborIndex
private
template<typename TSample >
InstanceIdentifierVectorType itk::Statistics::KdTree< TSample >::NearestNeighbors::m_Identifiers
private

The documentation for this class was generated from the following file:

Generated at Sat Mar 8 2014 18:02:47 for Orfeo Toolbox with doxygen 1.8.3.1