This class defines the interface of its derived classes. More...
#include <itkKdTree.h>
Public Types | |
typedef Array< double > | CentroidType |
typedef Array< double > | CentroidType |
typedef TSample::InstanceIdentifier | InstanceIdentifier |
typedef TSample::InstanceIdentifier | InstanceIdentifier |
typedef TSample::MeasurementType | MeasurementType |
typedef TSample::MeasurementType | MeasurementType |
typedef KdTreeNode< TSample > | Self |
typedef KdTreeNode< TSample > | Self |
Public Member Functions | |
virtual void | AddInstanceIdentifier (InstanceIdentifier id)=0 |
virtual void | AddInstanceIdentifier (InstanceIdentifier id)=0 |
virtual void | GetCentroid (CentroidType ¢roid)=0 |
virtual void | GetCentroid (CentroidType ¢roid)=0 |
virtual InstanceIdentifier | GetInstanceIdentifier (vcl_size_t index) const =0 |
virtual InstanceIdentifier | GetInstanceIdentifier (vcl_size_t index) const =0 |
virtual void | GetParameters (unsigned int &partitionDimension, MeasurementType &partitionValue) const =0 |
virtual void | GetParameters (unsigned int &partitionDimension, MeasurementType &partitionValue) const =0 |
virtual void | GetWeightedCentroid (CentroidType ¢roid)=0 |
virtual void | GetWeightedCentroid (CentroidType ¢roid)=0 |
virtual bool | IsTerminal () const =0 |
virtual bool | IsTerminal () const =0 |
virtual unsigned int | Size () const =0 |
virtual unsigned int | Size () const =0 |
virtual | ~KdTreeNode () |
virtual | ~KdTreeNode () |
virtual const Self * | Left () const =0 |
virtual Self * | Left ()=0 |
virtual const Self * | Left () const =0 |
virtual Self * | Left ()=0 |
virtual const Self * | Right () const =0 |
virtual Self * | Right ()=0 |
virtual const Self * | Right () const =0 |
virtual Self * | Right ()=0 |
This class defines the interface of its derived classes.
The methods defined in this class are a superset of the methods defined in its subclases. Therefore, the subclasses implements only part of the methods. The template argument, TSample, can be any subclass of the Sample class.
There are two categories for the subclasses, terminal and nonterminal nodes. The terminal nodes stores the instance identifiers beloging to them, while the nonterminal nodes don't. Therefore, the AddInstanceIdentifier and the GetInstanceIdentifier have meaning only with the terminal ones. The terminal nodes don't have any child (left or right). For terminal nodes, the GetParameters method is void.
Recent API changes: The static const macro to get the length of a measurement vector, MeasurementVectorSize
has been removed to allow the length of a measurement vector to be specified at run time. The typedef
for CentroidType
has been changed from Array to FixedArray.
The methods defined in this class are a superset of the methods defined in its subclases. Therefore, the subclasses implements only part of the methods. The template argument, TSample, can be any subclass of the Sample class.
There are two categories for the subclasses, terminal and nonterminal nodes. The terminal nodes stores the instance identifiers beloging to them, while the nonterminal nodes don't. Therefore, the AddInstanceIdentifier and the GetInstanceIdentifier have meaning only with the terminal ones. The terminal nodes don't have any child (left or right). For terminal nodes, the GetParameters method is void.
Recent API changes: The static const macro to get the length of a measurement vector, MeasurementVectorSize
has been removed to allow the length of a measurement vector to be specified at run time. The typedef
for CentroidType
has been changed from Array to FixedArray.
Definition at line 66 of file Numerics/Statistics/itkKdTree.h.
typedef Array< double > itk::Statistics::KdTreeNode< TSample >::CentroidType |
Centroid type
Reimplemented in itk::Statistics::KdTreeNonterminalNode< TSample >, itk::Statistics::KdTreeWeightedCentroidNonterminalNode< TSample >, itk::Statistics::KdTreeTerminalNode< TSample >, itk::Statistics::KdTreeNonterminalNode< TSample >, itk::Statistics::KdTreeWeightedCentroidNonterminalNode< TSample >, and itk::Statistics::KdTreeTerminalNode< TSample >.
Definition at line 72 of file Review/Statistics/itkKdTree.h.
typedef Array< double > itk::Statistics::KdTreeNode< TSample >::CentroidType |
Centroid type
Reimplemented in itk::Statistics::KdTreeNonterminalNode< TSample >, itk::Statistics::KdTreeWeightedCentroidNonterminalNode< TSample >, itk::Statistics::KdTreeTerminalNode< TSample >, itk::Statistics::KdTreeNonterminalNode< TSample >, itk::Statistics::KdTreeWeightedCentroidNonterminalNode< TSample >, and itk::Statistics::KdTreeTerminalNode< TSample >.
Definition at line 75 of file Numerics/Statistics/itkKdTree.h.
typedef TSample::InstanceIdentifier itk::Statistics::KdTreeNode< TSample >::InstanceIdentifier |
Instance identifier type (index value type for the measurement vector in a sample
Reimplemented in itk::Statistics::KdTreeNonterminalNode< TSample >, itk::Statistics::KdTreeWeightedCentroidNonterminalNode< TSample >, itk::Statistics::KdTreeTerminalNode< TSample >, itk::Statistics::KdTreeNonterminalNode< TSample >, itk::Statistics::KdTreeWeightedCentroidNonterminalNode< TSample >, and itk::Statistics::KdTreeTerminalNode< TSample >.
Definition at line 76 of file Review/Statistics/itkKdTree.h.
typedef TSample::InstanceIdentifier itk::Statistics::KdTreeNode< TSample >::InstanceIdentifier |
Instance identifier type (index value type for the measurement vector in a sample
Reimplemented in itk::Statistics::KdTreeNonterminalNode< TSample >, itk::Statistics::KdTreeWeightedCentroidNonterminalNode< TSample >, itk::Statistics::KdTreeTerminalNode< TSample >, itk::Statistics::KdTreeNonterminalNode< TSample >, itk::Statistics::KdTreeWeightedCentroidNonterminalNode< TSample >, and itk::Statistics::KdTreeTerminalNode< TSample >.
Definition at line 79 of file Numerics/Statistics/itkKdTree.h.
typedef TSample::MeasurementType itk::Statistics::KdTreeNode< TSample >::MeasurementType |
Measurement type, not the measurement vector type
Reimplemented in itk::Statistics::KdTreeNonterminalNode< TSample >, itk::Statistics::KdTreeWeightedCentroidNonterminalNode< TSample >, itk::Statistics::KdTreeTerminalNode< TSample >, itk::Statistics::KdTreeNonterminalNode< TSample >, itk::Statistics::KdTreeWeightedCentroidNonterminalNode< TSample >, and itk::Statistics::KdTreeTerminalNode< TSample >.
Definition at line 69 of file Review/Statistics/itkKdTree.h.
typedef TSample::MeasurementType itk::Statistics::KdTreeNode< TSample >::MeasurementType |
Measurement type, not the measurement vector type
Reimplemented in itk::Statistics::KdTreeNonterminalNode< TSample >, itk::Statistics::KdTreeWeightedCentroidNonterminalNode< TSample >, itk::Statistics::KdTreeTerminalNode< TSample >, itk::Statistics::KdTreeNonterminalNode< TSample >, itk::Statistics::KdTreeWeightedCentroidNonterminalNode< TSample >, and itk::Statistics::KdTreeTerminalNode< TSample >.
Definition at line 72 of file Numerics/Statistics/itkKdTree.h.
typedef KdTreeNode< TSample> itk::Statistics::KdTreeNode< TSample >::Self |
type alias for itself
Definition at line 66 of file Review/Statistics/itkKdTree.h.
typedef KdTreeNode< TSample> itk::Statistics::KdTreeNode< TSample >::Self |
type alias for itself
Definition at line 69 of file Numerics/Statistics/itkKdTree.h.
virtual itk::Statistics::KdTreeNode< TSample >::~KdTreeNode | ( | ) | [inline, virtual] |
Destructor
Definition at line 120 of file Numerics/Statistics/itkKdTree.h.
virtual itk::Statistics::KdTreeNode< TSample >::~KdTreeNode | ( | ) | [inline, virtual] |
Destructor
Definition at line 117 of file Review/Statistics/itkKdTree.h.
virtual void itk::Statistics::KdTreeNode< TSample >::AddInstanceIdentifier | ( | InstanceIdentifier | id | ) | [pure virtual] |
Add an instance to this node
Implemented in itk::Statistics::KdTreeNonterminalNode< TSample >, itk::Statistics::KdTreeWeightedCentroidNonterminalNode< TSample >, itk::Statistics::KdTreeTerminalNode< TSample >, itk::Statistics::KdTreeNonterminalNode< TSample >, itk::Statistics::KdTreeWeightedCentroidNonterminalNode< TSample >, and itk::Statistics::KdTreeTerminalNode< TSample >.
virtual void itk::Statistics::KdTreeNode< TSample >::AddInstanceIdentifier | ( | InstanceIdentifier | id | ) | [pure virtual] |
Add an instance to this node
Implemented in itk::Statistics::KdTreeNonterminalNode< TSample >, itk::Statistics::KdTreeWeightedCentroidNonterminalNode< TSample >, itk::Statistics::KdTreeTerminalNode< TSample >, itk::Statistics::KdTreeNonterminalNode< TSample >, itk::Statistics::KdTreeWeightedCentroidNonterminalNode< TSample >, and itk::Statistics::KdTreeTerminalNode< TSample >.
virtual void itk::Statistics::KdTreeNode< TSample >::GetCentroid | ( | CentroidType & | centroid | ) | [pure virtual] |
Returns the centroid. weighted centroid divided by the size
Implemented in itk::Statistics::KdTreeNonterminalNode< TSample >, itk::Statistics::KdTreeWeightedCentroidNonterminalNode< TSample >, itk::Statistics::KdTreeTerminalNode< TSample >, itk::Statistics::KdTreeNonterminalNode< TSample >, itk::Statistics::KdTreeWeightedCentroidNonterminalNode< TSample >, and itk::Statistics::KdTreeTerminalNode< TSample >.
virtual void itk::Statistics::KdTreeNode< TSample >::GetCentroid | ( | CentroidType & | centroid | ) | [pure virtual] |
Returns the centroid. weighted centroid divided by the size
Implemented in itk::Statistics::KdTreeNonterminalNode< TSample >, itk::Statistics::KdTreeWeightedCentroidNonterminalNode< TSample >, itk::Statistics::KdTreeTerminalNode< TSample >, itk::Statistics::KdTreeNonterminalNode< TSample >, itk::Statistics::KdTreeWeightedCentroidNonterminalNode< TSample >, and itk::Statistics::KdTreeTerminalNode< TSample >.
virtual InstanceIdentifier itk::Statistics::KdTreeNode< TSample >::GetInstanceIdentifier | ( | vcl_size_t | index | ) | const [pure virtual] |
Retuns the instance identifier of the index-th measurement vector
Implemented in itk::Statistics::KdTreeNonterminalNode< TSample >, itk::Statistics::KdTreeWeightedCentroidNonterminalNode< TSample >, itk::Statistics::KdTreeTerminalNode< TSample >, itk::Statistics::KdTreeNonterminalNode< TSample >, itk::Statistics::KdTreeWeightedCentroidNonterminalNode< TSample >, and itk::Statistics::KdTreeTerminalNode< TSample >.
virtual InstanceIdentifier itk::Statistics::KdTreeNode< TSample >::GetInstanceIdentifier | ( | vcl_size_t | index | ) | const [pure virtual] |
Retuns the instance identifier of the index-th measurement vector
Implemented in itk::Statistics::KdTreeNonterminalNode< TSample >, itk::Statistics::KdTreeWeightedCentroidNonterminalNode< TSample >, itk::Statistics::KdTreeTerminalNode< TSample >, itk::Statistics::KdTreeNonterminalNode< TSample >, itk::Statistics::KdTreeWeightedCentroidNonterminalNode< TSample >, and itk::Statistics::KdTreeTerminalNode< TSample >.
virtual void itk::Statistics::KdTreeNode< TSample >::GetParameters | ( | unsigned int & | partitionDimension, | |
MeasurementType & | partitionValue | |||
) | const [pure virtual] |
Fills the partitionDimension (the dimension that was chosen to split the measurement vectors belong to this node to the left and the right child among k dimensions) and the partitionValue (the measurement value on the partitionDimension divides the left and the right child
Implemented in itk::Statistics::KdTreeNonterminalNode< TSample >, itk::Statistics::KdTreeWeightedCentroidNonterminalNode< TSample >, itk::Statistics::KdTreeTerminalNode< TSample >, itk::Statistics::KdTreeNonterminalNode< TSample >, itk::Statistics::KdTreeWeightedCentroidNonterminalNode< TSample >, and itk::Statistics::KdTreeTerminalNode< TSample >.
virtual void itk::Statistics::KdTreeNode< TSample >::GetParameters | ( | unsigned int & | partitionDimension, | |
MeasurementType & | partitionValue | |||
) | const [pure virtual] |
Fills the partitionDimension (the dimension that was chosen to split the measurement vectors belong to this node to the left and the right child among k dimensions) and the partitionValue (the measurement value on the partitionDimension divides the left and the right child
Implemented in itk::Statistics::KdTreeNonterminalNode< TSample >, itk::Statistics::KdTreeWeightedCentroidNonterminalNode< TSample >, itk::Statistics::KdTreeTerminalNode< TSample >, itk::Statistics::KdTreeNonterminalNode< TSample >, itk::Statistics::KdTreeWeightedCentroidNonterminalNode< TSample >, and itk::Statistics::KdTreeTerminalNode< TSample >.
virtual void itk::Statistics::KdTreeNode< TSample >::GetWeightedCentroid | ( | CentroidType & | centroid | ) | [pure virtual] |
Returns the vector sum of the all measurement vectors under this node
Implemented in itk::Statistics::KdTreeNonterminalNode< TSample >, itk::Statistics::KdTreeWeightedCentroidNonterminalNode< TSample >, itk::Statistics::KdTreeTerminalNode< TSample >, itk::Statistics::KdTreeNonterminalNode< TSample >, itk::Statistics::KdTreeWeightedCentroidNonterminalNode< TSample >, and itk::Statistics::KdTreeTerminalNode< TSample >.
virtual void itk::Statistics::KdTreeNode< TSample >::GetWeightedCentroid | ( | CentroidType & | centroid | ) | [pure virtual] |
Returns the vector sum of the all measurement vectors under this node
Implemented in itk::Statistics::KdTreeNonterminalNode< TSample >, itk::Statistics::KdTreeWeightedCentroidNonterminalNode< TSample >, itk::Statistics::KdTreeTerminalNode< TSample >, itk::Statistics::KdTreeNonterminalNode< TSample >, itk::Statistics::KdTreeWeightedCentroidNonterminalNode< TSample >, and itk::Statistics::KdTreeTerminalNode< TSample >.
virtual bool itk::Statistics::KdTreeNode< TSample >::IsTerminal | ( | ) | const [pure virtual] |
Returns true if the node is a terminal node, that is a node that doesn't have any child.
Implemented in itk::Statistics::KdTreeNonterminalNode< TSample >, itk::Statistics::KdTreeWeightedCentroidNonterminalNode< TSample >, itk::Statistics::KdTreeTerminalNode< TSample >, itk::Statistics::KdTreeNonterminalNode< TSample >, itk::Statistics::KdTreeWeightedCentroidNonterminalNode< TSample >, and itk::Statistics::KdTreeTerminalNode< TSample >.
virtual bool itk::Statistics::KdTreeNode< TSample >::IsTerminal | ( | ) | const [pure virtual] |
Returns true if the node is a terminal node, that is a node that doesn't have any child.
Implemented in itk::Statistics::KdTreeNonterminalNode< TSample >, itk::Statistics::KdTreeWeightedCentroidNonterminalNode< TSample >, itk::Statistics::KdTreeTerminalNode< TSample >, itk::Statistics::KdTreeNonterminalNode< TSample >, itk::Statistics::KdTreeWeightedCentroidNonterminalNode< TSample >, and itk::Statistics::KdTreeTerminalNode< TSample >.
virtual const Self* itk::Statistics::KdTreeNode< TSample >::Left | ( | ) | const [pure virtual] |
Returns the pointer to the left child of this node
Implemented in itk::Statistics::KdTreeNonterminalNode< TSample >, itk::Statistics::KdTreeWeightedCentroidNonterminalNode< TSample >, itk::Statistics::KdTreeTerminalNode< TSample >, itk::Statistics::KdTreeNonterminalNode< TSample >, itk::Statistics::KdTreeWeightedCentroidNonterminalNode< TSample >, and itk::Statistics::KdTreeTerminalNode< TSample >.
virtual Self* itk::Statistics::KdTreeNode< TSample >::Left | ( | ) | [pure virtual] |
Returns the pointer to the left child of this node
Implemented in itk::Statistics::KdTreeNonterminalNode< TSample >, itk::Statistics::KdTreeWeightedCentroidNonterminalNode< TSample >, itk::Statistics::KdTreeTerminalNode< TSample >, itk::Statistics::KdTreeNonterminalNode< TSample >, itk::Statistics::KdTreeWeightedCentroidNonterminalNode< TSample >, and itk::Statistics::KdTreeTerminalNode< TSample >.
virtual const Self* itk::Statistics::KdTreeNode< TSample >::Left | ( | ) | const [pure virtual] |
Returns the pointer to the left child of this node
Implemented in itk::Statistics::KdTreeNonterminalNode< TSample >, itk::Statistics::KdTreeWeightedCentroidNonterminalNode< TSample >, itk::Statistics::KdTreeTerminalNode< TSample >, itk::Statistics::KdTreeNonterminalNode< TSample >, itk::Statistics::KdTreeWeightedCentroidNonterminalNode< TSample >, and itk::Statistics::KdTreeTerminalNode< TSample >.
virtual Self* itk::Statistics::KdTreeNode< TSample >::Left | ( | ) | [pure virtual] |
Returns the pointer to the left child of this node
Implemented in itk::Statistics::KdTreeNonterminalNode< TSample >, itk::Statistics::KdTreeWeightedCentroidNonterminalNode< TSample >, itk::Statistics::KdTreeTerminalNode< TSample >, itk::Statistics::KdTreeNonterminalNode< TSample >, itk::Statistics::KdTreeWeightedCentroidNonterminalNode< TSample >, and itk::Statistics::KdTreeTerminalNode< TSample >.
virtual const Self* itk::Statistics::KdTreeNode< TSample >::Right | ( | ) | const [pure virtual] |
Returns the pointer to the left child of this node
Implemented in itk::Statistics::KdTreeNonterminalNode< TSample >, itk::Statistics::KdTreeWeightedCentroidNonterminalNode< TSample >, itk::Statistics::KdTreeTerminalNode< TSample >, itk::Statistics::KdTreeNonterminalNode< TSample >, itk::Statistics::KdTreeWeightedCentroidNonterminalNode< TSample >, and itk::Statistics::KdTreeTerminalNode< TSample >.
virtual Self* itk::Statistics::KdTreeNode< TSample >::Right | ( | ) | [pure virtual] |
Returns the pointer to the right child of this node
Implemented in itk::Statistics::KdTreeNonterminalNode< TSample >, itk::Statistics::KdTreeWeightedCentroidNonterminalNode< TSample >, itk::Statistics::KdTreeTerminalNode< TSample >, itk::Statistics::KdTreeNonterminalNode< TSample >, itk::Statistics::KdTreeWeightedCentroidNonterminalNode< TSample >, and itk::Statistics::KdTreeTerminalNode< TSample >.
virtual const Self* itk::Statistics::KdTreeNode< TSample >::Right | ( | ) | const [pure virtual] |
Returns the pointer to the left child of this node
Implemented in itk::Statistics::KdTreeNonterminalNode< TSample >, itk::Statistics::KdTreeWeightedCentroidNonterminalNode< TSample >, itk::Statistics::KdTreeTerminalNode< TSample >, itk::Statistics::KdTreeNonterminalNode< TSample >, itk::Statistics::KdTreeWeightedCentroidNonterminalNode< TSample >, and itk::Statistics::KdTreeTerminalNode< TSample >.
virtual Self* itk::Statistics::KdTreeNode< TSample >::Right | ( | ) | [pure virtual] |
Returns the pointer to the right child of this node
Implemented in itk::Statistics::KdTreeNonterminalNode< TSample >, itk::Statistics::KdTreeWeightedCentroidNonterminalNode< TSample >, itk::Statistics::KdTreeTerminalNode< TSample >, itk::Statistics::KdTreeNonterminalNode< TSample >, itk::Statistics::KdTreeWeightedCentroidNonterminalNode< TSample >, and itk::Statistics::KdTreeTerminalNode< TSample >.
virtual unsigned int itk::Statistics::KdTreeNode< TSample >::Size | ( | ) | const [pure virtual] |
Returs the number of measurement vectors under this node including its children
Implemented in itk::Statistics::KdTreeNonterminalNode< TSample >, itk::Statistics::KdTreeWeightedCentroidNonterminalNode< TSample >, itk::Statistics::KdTreeTerminalNode< TSample >, itk::Statistics::KdTreeNonterminalNode< TSample >, itk::Statistics::KdTreeWeightedCentroidNonterminalNode< TSample >, and itk::Statistics::KdTreeTerminalNode< TSample >.
virtual unsigned int itk::Statistics::KdTreeNode< TSample >::Size | ( | ) | const [pure virtual] |
Returs the number of measurement vectors under this node including its children
Implemented in itk::Statistics::KdTreeNonterminalNode< TSample >, itk::Statistics::KdTreeWeightedCentroidNonterminalNode< TSample >, itk::Statistics::KdTreeTerminalNode< TSample >, itk::Statistics::KdTreeNonterminalNode< TSample >, itk::Statistics::KdTreeWeightedCentroidNonterminalNode< TSample >, and itk::Statistics::KdTreeTerminalNode< TSample >.