ITK
6.0.0
Insight Toolkit
|
#include <itkKdTree.h>
This class defines the interface of its derived classes.
The methods defined in this class are a superset of the methods defined in its subclasses. 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 belonging 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 type
alias for CentroidType
has been changed from Array to FixedArray.
Definition at line 65 of file itkKdTree.h.
Public Types | |
using | CentroidType = Array< double > |
using | InstanceIdentifier = typename TSample::InstanceIdentifier |
using | MeasurementType = typename TSample::MeasurementType |
using | Self = KdTreeNode< TSample > |
Public Member Functions | |
virtual void | AddInstanceIdentifier (InstanceIdentifier)=0 |
virtual void | GetCentroid (CentroidType &)=0 |
virtual InstanceIdentifier | GetInstanceIdentifier (InstanceIdentifier) const =0 |
virtual void | GetParameters (unsigned int &, MeasurementType &) const =0 |
virtual void | GetWeightedCentroid (CentroidType &)=0 |
virtual bool | IsTerminal () const =0 |
virtual const Self * | Left () const =0 |
virtual Self * | Left ()=0 |
virtual const Self * | Right () const =0 |
virtual Self * | Right ()=0 |
virtual unsigned int | Size () const =0 |
virtual | ~KdTreeNode ()=default |
using itk::Statistics::KdTreeNode< TSample >::CentroidType = Array<double> |
Centroid type
Definition at line 74 of file itkKdTree.h.
using itk::Statistics::KdTreeNode< TSample >::InstanceIdentifier = typename TSample::InstanceIdentifier |
Instance identifier type (index value type for the measurement vector in a sample
Definition at line 78 of file itkKdTree.h.
using itk::Statistics::KdTreeNode< TSample >::MeasurementType = typename TSample::MeasurementType |
Measurement type, not the measurement vector type
Definition at line 71 of file itkKdTree.h.
using itk::Statistics::KdTreeNode< TSample >::Self = KdTreeNode<TSample> |
type alias for itself
Definition at line 68 of file itkKdTree.h.
|
virtualdefault |
Destructor
|
pure virtual |
Add an instance to this node
Implemented in itk::Statistics::KdTreeTerminalNode< TSample >, itk::Statistics::KdTreeNonterminalNode< TSample >, and itk::Statistics::KdTreeWeightedCentroidNonterminalNode< TSample >.
|
pure virtual |
Returns the centroid. weighted centroid divided by the size
Implemented in itk::Statistics::KdTreeNonterminalNode< TSample >, itk::Statistics::KdTreeTerminalNode< TSample >, and itk::Statistics::KdTreeWeightedCentroidNonterminalNode< TSample >.
|
pure virtual |
Returns the instance identifier of the index-th measurement vector
Implemented in itk::Statistics::KdTreeTerminalNode< TSample >, itk::Statistics::KdTreeNonterminalNode< TSample >, and itk::Statistics::KdTreeWeightedCentroidNonterminalNode< TSample >.
|
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 >, and itk::Statistics::KdTreeTerminalNode< TSample >.
|
pure virtual |
Returns the vector sum of the all measurement vectors under this node
Implemented in itk::Statistics::KdTreeNonterminalNode< TSample >, itk::Statistics::KdTreeTerminalNode< TSample >, and itk::Statistics::KdTreeWeightedCentroidNonterminalNode< TSample >.
|
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 >, and itk::Statistics::KdTreeTerminalNode< TSample >.
|
pure virtual |
Returns the const pointer to the left child of this node
Implemented in itk::Statistics::KdTreeNonterminalNode< TSample >, itk::Statistics::KdTreeWeightedCentroidNonterminalNode< TSample >, and itk::Statistics::KdTreeTerminalNode< TSample >.
|
pure virtual |
Returns the pointer to the left child of this node
Implemented in itk::Statistics::KdTreeNonterminalNode< TSample >, itk::Statistics::KdTreeWeightedCentroidNonterminalNode< TSample >, and itk::Statistics::KdTreeTerminalNode< TSample >.
|
pure virtual |
Returns the const pointer to the right child of this node
Implemented in itk::Statistics::KdTreeNonterminalNode< TSample >, itk::Statistics::KdTreeWeightedCentroidNonterminalNode< TSample >, and itk::Statistics::KdTreeTerminalNode< TSample >.
|
pure virtual |
Returns the pointer to the right child of this node
Implemented in itk::Statistics::KdTreeNonterminalNode< TSample >, itk::Statistics::KdTreeWeightedCentroidNonterminalNode< TSample >, and itk::Statistics::KdTreeTerminalNode< TSample >.
|
pure virtual |
Returns the number of measurement vectors under this node including its children
Implemented in itk::Statistics::KdTreeNonterminalNode< TSample >, itk::Statistics::KdTreeWeightedCentroidNonterminalNode< TSample >, and itk::Statistics::KdTreeTerminalNode< TSample >.