#include <itkKdTree.h>
This is a subclass of the KdTreeNode.
KdTreeNonterminalNode does have the information related with the centroids. Therefore, the GetWeightedCentroid and the GetCentroid methods returns meaningful values. This class should have the left and right children. If we have a sample and want to generate a KdTree with the centroid related information, we can use the WeightedCentroidKdTreeGenerator. The centroid, the weighted centroid, and the size (the number of measurement vectors) can be used to accelerate the k-means estimation.
Definition at line 268 of file itkKdTree.h.
Public Types | |
using | CentroidType |
using | InstanceIdentifier |
using | MeasurementType |
using | MeasurementVectorSizeType = typename TSample::MeasurementVectorSizeType |
using | Superclass = KdTreeNode<TSample> |
![]() | |
using | CentroidType = Array<double> |
using | InstanceIdentifier = typename TSample::InstanceIdentifier |
using | MeasurementType = typename TSample::MeasurementType |
using | Self = KdTreeNode<TSample> |
Public Member Functions | |
void | AddInstanceIdentifier (InstanceIdentifier valueId) override |
void | GetCentroid (CentroidType ¢roid) override |
InstanceIdentifier | GetInstanceIdentifier (InstanceIdentifier) const override |
MeasurementVectorSizeType | GetMeasurementVectorSize () const |
void | GetParameters (unsigned int &, MeasurementType &) const override |
void | GetWeightedCentroid (CentroidType ¢roid) override |
bool | IsTerminal () const override |
KdTreeWeightedCentroidNonterminalNode (unsigned int, MeasurementType, Superclass *, Superclass *, CentroidType &, unsigned int) | |
const Superclass * | Left () const override |
Superclass * | Left () override |
const Superclass * | Right () const override |
Superclass * | Right () override |
unsigned int | Size () const override |
~KdTreeWeightedCentroidNonterminalNode () override=default | |
![]() | |
virtual | ~KdTreeNode ()=default |
Private Attributes | |
CentroidType | m_Centroid {} |
InstanceIdentifier | m_InstanceIdentifier {} |
Superclass * | m_Left {} |
MeasurementVectorSizeType | m_MeasurementVectorSize {} |
unsigned int | m_PartitionDimension {} |
MeasurementType | m_PartitionValue {} |
Superclass * | m_Right {} |
unsigned int | m_Size {} |
CentroidType | m_WeightedCentroid {} |
using itk::Statistics::KdTreeNode< TSample >::CentroidType |
Centroid type
Definition at line 74 of file itkKdTree.h.
using itk::Statistics::KdTreeNode< 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 |
Measurement type, not the measurement vector type
Definition at line 71 of file itkKdTree.h.
using itk::Statistics::KdTreeWeightedCentroidNonterminalNode< TSample >::MeasurementVectorSizeType = typename TSample::MeasurementVectorSizeType |
Definition at line 274 of file itkKdTree.h.
using itk::Statistics::KdTreeWeightedCentroidNonterminalNode< TSample >::Superclass = KdTreeNode<TSample> |
Definition at line 270 of file itkKdTree.h.
itk::Statistics::KdTreeWeightedCentroidNonterminalNode< TSample >::KdTreeWeightedCentroidNonterminalNode | ( | unsigned int | , |
MeasurementType | , | ||
Superclass * | , | ||
Superclass * | , | ||
CentroidType & | , | ||
unsigned int | ) |
|
overridedefault |
|
inlineoverridevirtual |
Set the identifier of the node.
Implements itk::Statistics::KdTreeNode< TSample >.
Definition at line 371 of file itkKdTree.h.
References m_InstanceIdentifier.
|
inlineoverridevirtual |
Returns the centroid. weighted centroid divided by the size.
Implements itk::Statistics::KdTreeNode< TSample >.
Definition at line 351 of file itkKdTree.h.
References m_Centroid.
|
inlineoverridevirtual |
Returns the identifier of the only MeasurementVector associated with this node in the tree. This MeasurementVector will be used later during the distance computation when querying the tree.
Implements itk::Statistics::KdTreeNode< TSample >.
Definition at line 362 of file itkKdTree.h.
References m_InstanceIdentifier.
|
inline |
Return the length of a measurement vector
Definition at line 298 of file itkKdTree.h.
References m_MeasurementVectorSize.
|
overridevirtual |
Return the parameters of the node.
Implements itk::Statistics::KdTreeNode< TSample >.
|
inlineoverridevirtual |
Returns the vector sum of the all measurement vectors under this node.
Implements itk::Statistics::KdTreeNode< TSample >.
Definition at line 342 of file itkKdTree.h.
References m_WeightedCentroid.
|
inlineoverridevirtual |
Not a terminal node.
Implements itk::Statistics::KdTreeNode< TSample >.
Definition at line 287 of file itkKdTree.h.
|
inlineoverridevirtual |
Return the left tree const pointer.
Implements itk::Statistics::KdTreeNode< TSample >.
Definition at line 319 of file itkKdTree.h.
References m_Left.
|
inlineoverridevirtual |
Return the left tree pointer.
Implements itk::Statistics::KdTreeNode< TSample >.
Definition at line 305 of file itkKdTree.h.
References m_Left.
|
inlineoverridevirtual |
Return the right tree const pointer.
Implements itk::Statistics::KdTreeNode< TSample >.
Definition at line 326 of file itkKdTree.h.
References m_Right.
|
inlineoverridevirtual |
Return the right tree pointer.
Implements itk::Statistics::KdTreeNode< TSample >.
Definition at line 312 of file itkKdTree.h.
References m_Right.
|
inlineoverridevirtual |
Return the size of the node.
Implements itk::Statistics::KdTreeNode< TSample >.
Definition at line 333 of file itkKdTree.h.
References m_Size.
|
private |
Definition at line 381 of file itkKdTree.h.
Referenced by GetCentroid().
|
private |
Definition at line 382 of file itkKdTree.h.
Referenced by AddInstanceIdentifier(), and GetInstanceIdentifier().
|
private |
Definition at line 384 of file itkKdTree.h.
|
private |
Definition at line 377 of file itkKdTree.h.
Referenced by GetMeasurementVectorSize().
|
private |
Definition at line 378 of file itkKdTree.h.
|
private |
Definition at line 379 of file itkKdTree.h.
|
private |
Definition at line 385 of file itkKdTree.h.
|
private |
Definition at line 383 of file itkKdTree.h.
Referenced by Size().
|
private |
Definition at line 380 of file itkKdTree.h.
Referenced by GetWeightedCentroid().