Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itk::Statistics::KdTreeGenerator< TSample > Class Template Reference

This class generates a KdTree object without centroid information. More...

#include <itkKdTreeGenerator.h>

Inheritance diagram for itk::Statistics::KdTreeGenerator:

Inheritance graph
[legend]
Collaboration diagram for itk::Statistics::KdTreeGenerator< TSample >:

Collaboration graph
[legend]
List of all members.

Public Types

typedef KdTreeGenerator Self
typedef Object Superclass
typedef SmartPointer< SelfPointer
typedef TSample::MeasurementVectorType MeasurementVectorType
typedef TSample::MeasurementType MeasurementType
typedef KdTree< TSample > KdTreeType
typedef KdTreeType OutputType
typedef KdTreeType::Pointer OutputPointer
typedef KdTreeType::KdTreeNodeType KdTreeNodeType
typedef Subsample< TSample > SubsampleType
typedef SubsampleType::Pointer SubsamplePointer

Public Methods

virtual const char * GetClassName () const
 itkStaticConstMacro (MeasurementVectorSize, unsigned int, TSample::MeasurementVectorSize)
void SetSample (TSample *sample)
void SetBucketSize (int size)
OutputPointer GetOutput ()
void Update ()
void GenerateData ()

Static Public Methods

Pointer New ()

Public Attributes

unsigned int TotalInstance

Protected Methods

 KdTreeGenerator ()
virtual ~KdTreeGenerator ()
void PrintSelf (std::ostream &os, Indent indent) const
SubsamplePointer GetSubsample ()
virtual KdTreeNodeTypeGenerateNonterminalNode (int beginIndex, int endIndex, MeasurementVectorType &lowerBound, MeasurementVectorType &upperBound, int level)
KdTreeNodeTypeGenerateTreeLoop (int beginIndex, int endIndex, MeasurementVectorType &lowerBound, MeasurementVectorType &upperBound, int level)

Detailed Description

template<class TSample>
class itk::Statistics::KdTreeGenerator< TSample >

This class generates a KdTree object without centroid information.

The KdTree object stores measurment vectors in a k-d tree structure that is a binary tree. The partition value is the median value of one of the k dimension (partition dimension). The partition dimension is determined by the spread of measurement values in each dimension. The partition dimension is the dimension has the widest spread. Our implementation of k-d tree doesn't have any construction or insertion logic. Users should use this class or the WeightedCentroidKdTreeGenerator class.

The number of the measurement vectors in a terminal node is set by the SetBucketSize method. If we use too small number for this, it might cause computational overhead to calculate bound conditions. However, too large number will cause more distance calculation between the measurement vectors in a terminal node and the query point.

To run this generator, users should provides the bucket size (SetBucketSize method) and the input sample (SetSample method). The Update method will run this generator. To get the resulting KdTree object, call the GetOutput method.

See also:
KdTree, KdTreeNode, KdTreeNonterminalNode, KdTreeTerminalNode, WeightedCentroidKdTreeGenerator

Definition at line 63 of file itkKdTreeGenerator.h.


Member Typedef Documentation

template<class TSample>
typedef KdTreeType::KdTreeNodeType itk::Statistics::KdTreeGenerator< TSample >::KdTreeNodeType
 

Typedef for the k-d tree node type

Reimplemented in itk::Statistics::WeightedCentroidKdTreeGenerator< TSample >.

Definition at line 94 of file itkKdTreeGenerator.h.

template<class TSample>
typedef KdTree< TSample > itk::Statistics::KdTreeGenerator< TSample >::KdTreeType
 

Typedef for the k-d tree

Reimplemented in itk::Statistics::WeightedCentroidKdTreeGenerator< TSample >.

Definition at line 85 of file itkKdTreeGenerator.h.

template<class TSample>
typedef TSample::MeasurementType itk::Statistics::KdTreeGenerator< TSample >::MeasurementType
 

Reimplemented in itk::Statistics::WeightedCentroidKdTreeGenerator< TSample >.

Definition at line 79 of file itkKdTreeGenerator.h.

template<class TSample>
typedef TSample::MeasurementVectorType itk::Statistics::KdTreeGenerator< TSample >::MeasurementVectorType
 

typedef alias for the source data container

Reimplemented in itk::Statistics::WeightedCentroidKdTreeGenerator< TSample >.

Definition at line 78 of file itkKdTreeGenerator.h.

template<class TSample>
typedef KdTreeType::Pointer itk::Statistics::KdTreeGenerator< TSample >::OutputPointer
 

Typedef for the smart pointer to the k-d tree

Definition at line 91 of file itkKdTreeGenerator.h.

template<class TSample>
typedef KdTreeType itk::Statistics::KdTreeGenerator< TSample >::OutputType
 

Type alias for the k-d tree type

Definition at line 88 of file itkKdTreeGenerator.h.

template<class TSample>
typedef SmartPointer<Self> itk::Statistics::KdTreeGenerator< TSample >::Pointer
 

Reimplemented from itk::Object.

Reimplemented in itk::Statistics::WeightedCentroidKdTreeGenerator< TSample >.

Definition at line 69 of file itkKdTreeGenerator.h.

template<class TSample>
typedef KdTreeGenerator itk::Statistics::KdTreeGenerator< TSample >::Self
 

Standard class typedefs

Reimplemented from itk::Object.

Reimplemented in itk::Statistics::WeightedCentroidKdTreeGenerator< TSample >.

Definition at line 67 of file itkKdTreeGenerator.h.

template<class TSample>
typedef SubsampleType::Pointer itk::Statistics::KdTreeGenerator< TSample >::SubsamplePointer
 

Typedef for the smart pointer to the Subsample

Reimplemented in itk::Statistics::WeightedCentroidKdTreeGenerator< TSample >.

Definition at line 100 of file itkKdTreeGenerator.h.

template<class TSample>
typedef Subsample< TSample > itk::Statistics::KdTreeGenerator< TSample >::SubsampleType
 

Typedef for the internal Subsample

Reimplemented in itk::Statistics::WeightedCentroidKdTreeGenerator< TSample >.

Definition at line 97 of file itkKdTreeGenerator.h.

template<class TSample>
typedef Object itk::Statistics::KdTreeGenerator< TSample >::Superclass
 

Reimplemented from itk::Object.

Reimplemented in itk::Statistics::WeightedCentroidKdTreeGenerator< TSample >.

Definition at line 68 of file itkKdTreeGenerator.h.


Constructor & Destructor Documentation

template<class TSample>
itk::Statistics::KdTreeGenerator< TSample >::KdTreeGenerator   [protected]
 

Constructor

template<class TSample>
virtual itk::Statistics::KdTreeGenerator< TSample >::~KdTreeGenerator   [inline, protected, virtual]
 

Destructor

Definition at line 128 of file itkKdTreeGenerator.h.


Member Function Documentation

template<class TSample>
void itk::Statistics::KdTreeGenerator< TSample >::GenerateData  
 

Runs this k-d tree construction algorithm.

template<class TSample>
virtual KdTreeNodeType* itk::Statistics::KdTreeGenerator< TSample >::GenerateNonterminalNode int    beginIndex,
int    endIndex,
MeasurementVectorType   lowerBound,
MeasurementVectorType   upperBound,
int    level
[protected, virtual]
 

Nonterminal node generation routine

Reimplemented in itk::Statistics::WeightedCentroidKdTreeGenerator< TSample >.

template<class TSample>
KdTreeNodeType* itk::Statistics::KdTreeGenerator< TSample >::GenerateTreeLoop int    beginIndex,
int    endIndex,
MeasurementVectorType   lowerBound,
MeasurementVectorType   upperBound,
int    level
[protected]
 

Tree generation loop

template<class TSample>
virtual const char* itk::Statistics::KdTreeGenerator< TSample >::GetClassName   const [virtual]
 

Run-time type information (and related methods)

Reimplemented from itk::Object.

Reimplemented in itk::Statistics::WeightedCentroidKdTreeGenerator< TSample >.

template<class TSample>
OutputPointer itk::Statistics::KdTreeGenerator< TSample >::GetOutput void    [inline]
 

Returns the pointer to the generated k-d tree.

Definition at line 110 of file itkKdTreeGenerator.h.

template<class TSample>
SubsamplePointer itk::Statistics::KdTreeGenerator< TSample >::GetSubsample   [inline, protected]
 

Returns the smart pointer to the internal Subsample object.

Definition at line 133 of file itkKdTreeGenerator.h.

template<class TSample>
itk::Statistics::KdTreeGenerator< TSample >::itkStaticConstMacro MeasurementVectorSize   ,
unsigned    int,
TSample::MeasurementVectorSize   
 

Reimplemented in itk::Statistics::WeightedCentroidKdTreeGenerator< TSample >.

template<class TSample>
Pointer itk::Statistics::KdTreeGenerator< TSample >::New   [static]
 

Method for creation through the object factory.

Reimplemented from itk::Object.

Reimplemented in itk::Statistics::WeightedCentroidKdTreeGenerator< TSample >.

template<class TSample>
void itk::Statistics::KdTreeGenerator< TSample >::PrintSelf std::ostream &    os,
Indent    indent
const [protected, virtual]
 

Methods invoked by Print() to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from itk::Object.

Reimplemented in itk::Statistics::WeightedCentroidKdTreeGenerator< TSample >.

template<class TSample>
void itk::Statistics::KdTreeGenerator< TSample >::SetBucketSize int    size
 

Sets the number of measurement vectors that can be stored in a terminal node.

template<class TSample>
void itk::Statistics::KdTreeGenerator< TSample >::SetSample TSample *    sample
 

Sets the input sample that provides the measurement vectors.

template<class TSample>
void itk::Statistics::KdTreeGenerator< TSample >::Update void    [inline]
 

Runs this k-d tree construction algorithm.

Definition at line 114 of file itkKdTreeGenerator.h.

References HardConnectedComponentImageFilter::GenerateData().


Member Data Documentation

template<class TSample>
unsigned int itk::Statistics::KdTreeGenerator< TSample >::TotalInstance
 

The number of measurement vectors in an object of this class.

Definition at line 121 of file itkKdTreeGenerator.h.


The documentation for this class was generated from the following file:
Generated at Tue Sep 16 11:42:36 2003 for ITK by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2000