ITK  4.1.0
Insight Segmentation and Registration Toolkit
Public Member Functions | Private Attributes
itk::Statistics::KdTree< TSample >::NearestNeighbors Class Reference

#include <itkKdTree.h>

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

List of all members.

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

Detailed Description

template<class 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 533 of file itkKdTree.h.


Constructor & Destructor Documentation

template<class TSample >
itk::Statistics::KdTree< TSample >::NearestNeighbors::NearestNeighbors ( ) [inline]

Constructor

Definition at line 537 of file itkKdTree.h.

template<class TSample >
itk::Statistics::KdTree< TSample >::NearestNeighbors::~NearestNeighbors ( ) [inline]

Destructor

Definition at line 540 of file itkKdTree.h.


Member Function Documentation

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

Returns the vector of k-neighbors' instance identifiers

Definition at line 593 of file itkKdTree.h.

template<class TSample >
double itk::Statistics::KdTree< TSample >::NearestNeighbors::GetLargestDistance ( ) [inline]

Returns the distance of the farthest neighbor from the query point

Definition at line 555 of file itkKdTree.h.

template<class 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 587 of file itkKdTree.h.

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

Returns the vector of k-neighbors' instance identifiers

Definition at line 580 of file itkKdTree.h.

template<class TSample >
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 562 of file itkKdTree.h.

template<class TSample >
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 544 of file itkKdTree.h.


Member Data Documentation

template<class TSample >
std::vector<double> itk::Statistics::KdTree< TSample >::NearestNeighbors::m_Distances [private]

Storage for the distance values of k-neighbors from the query point

Definition at line 607 of file itkKdTree.h.

template<class TSample >
unsigned int itk::Statistics::KdTree< TSample >::NearestNeighbors::m_FarthestNeighborIndex [private]

The index of the farthest neighbor among k-neighbors

Definition at line 600 of file itkKdTree.h.

Storage for the instance identifiers of k-neighbors

Definition at line 603 of file itkKdTree.h.


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