Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members

mitkKdTree Class Reference

mitkKdTree - a class for implementation of k-d tree data structure More...

#include <mitkKdTree.h>

Collaboration diagram for mitkKdTree:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 mitkKdTree (mitkPointSet *points, int points_per_leaf=4)
 ~mitkKdTree ()
void GetPointsKNearest (double *queryPoint, int k, vector< int > &closestIndices)
void GetPointsInBoundingBox (mitkBoundingBox< double > &box, vector< int > &indices_in_box)
void GetPointsInRadius (double *query_point, double radius, vector< int > &indices_in_radius)
void SetFlagUseHeap (bool flag)

Detailed Description

mitkKdTree - a class for implementation of k-d tree data structure

mitkKdTree is a class for the implementation of k-d tree data structure. It's designed to accelerate point set k nearest neighbor searching and points indexing. Some codes are borrowed from rsdl library.


Constructor & Destructor Documentation

mitkKdTree::mitkKdTree mitkPointSet points,
int  points_per_leaf = 4
 

Constructor with tree building.

Parameters:
points The input point set.
points_per_leaf Max number of points can be stored in a leaf.

mitkKdTree::~mitkKdTree  ) 
 

Deconstructor.


Member Function Documentation

void mitkKdTree::GetPointsInBoundingBox mitkBoundingBox< double > &  box,
vector< int > &  indices_in_box
 

Get points in a bounding box.

Parameters:
box The query bounding box
indices_in_box Return a vector contains result point's indices

void mitkKdTree::GetPointsInRadius double *  query_point,
double  radius,
vector< int > &  indices_in_radius
 

Get points in a given circle/sphere.

Parameters:
query_point The query point
radius The radius of the given circle
indices_in_radius Return a vector contains result point's indices

void mitkKdTree::GetPointsKNearest double *  queryPoint,
int  k,
vector< int > &  closestIndices
 

Get k nearest point to a query point.

Parameters:
queryPoint The query point stored in an array
k The number of points to search
closestIndices Return a vector contains result point's indices

void mitkKdTree::SetFlagUseHeap bool  flag  )  [inline]
 

Set knn search using heap flag.

Parameters:
flag Use heap in knn search if flag is true


The documentation for this class was generated from the following file:
Generated on Tue Feb 25 15:03:33 2014 for MITK (Medical Imaging ToolKit) by  doxygen 1.4.3