ITK  5.2.0
Insight Toolkit
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes | List of all members
itk::Statistics::WeightedCentroidKdTreeGenerator< TSample > Class Template Reference

#include <itkWeightedCentroidKdTreeGenerator.h>

+ Inheritance diagram for itk::Statistics::WeightedCentroidKdTreeGenerator< TSample >:
+ Collaboration diagram for itk::Statistics::WeightedCentroidKdTreeGenerator< TSample >:

Public Types

using ConstPointer = SmartPointer< const Self >
 
using KdTreeNodeType = typename Superclass::KdTreeNodeType
 
using KdTreeType = typename Superclass::KdTreeType
 
using MeasurementType = typename Superclass::MeasurementType
 
using MeasurementVectorType = typename Superclass::MeasurementVectorType
 
using Pointer = SmartPointer< Self >
 
using Self = WeightedCentroidKdTreeGenerator
 
using SubsamplePointer = typename Superclass::SubsamplePointer
 
using SubsampleType = typename Superclass::SubsampleType
 
using Superclass = KdTreeGenerator< TSample >
 
- Public Types inherited from itk::Statistics::KdTreeGenerator< TSample >
using ConstPointer = SmartPointer< const Self >
 
using KdTreeNodeType = typename KdTreeType::KdTreeNodeType
 
using KdTreeType = KdTree< TSample >
 
using MeasurementType = typename TSample::MeasurementType
 
using MeasurementVectorSizeType = unsigned int
 
using MeasurementVectorType = typename TSample::MeasurementVectorType
 
using OutputPointer = typename KdTreeType::Pointer
 
using OutputType = KdTreeType
 
using Pointer = SmartPointer< Self >
 
using Self = KdTreeGenerator
 
using SubsamplePointer = typename SubsampleType::Pointer
 
using SubsampleType = Subsample< TSample >
 
using Superclass = Object
 
- Public Types inherited from itk::Object
using ConstPointer = SmartPointer< const Self >
 
using Pointer = SmartPointer< Self >
 
using Self = Object
 
using Superclass = LightObject
 
- Public Types inherited from itk::LightObject
using ConstPointer = SmartPointer< const Self >
 
using Pointer = SmartPointer< Self >
 
using Self = LightObject
 

Public Member Functions

virtual ::itk::LightObject::Pointer CreateAnother () const
 
virtual const char * GetNameOfClass () const
 
- Public Member Functions inherited from itk::Statistics::KdTreeGenerator< TSample >
void GenerateData ()
 
virtual unsigned int GetMeasurementVectorSize () const
 
OutputPointer GetOutput ()
 
void SetBucketSize (unsigned int size)
 
void SetSample (TSample *sample)
 
void Update ()
 
- Public Member Functions inherited from itk::Object
unsigned long AddObserver (const EventObject &event, Command *)
 
unsigned long AddObserver (const EventObject &event, Command *) const
 
unsigned long AddObserver (const EventObject &event, std::function< void(const EventObject &)> function) const
 
virtual void DebugOff () const
 
virtual void DebugOn () const
 
CommandGetCommand (unsigned long tag)
 
bool GetDebug () const
 
MetaDataDictionaryGetMetaDataDictionary ()
 
const MetaDataDictionaryGetMetaDataDictionary () const
 
virtual ModifiedTimeType GetMTime () const
 
virtual const TimeStampGetTimeStamp () const
 
bool HasObserver (const EventObject &event) const
 
void InvokeEvent (const EventObject &)
 
void InvokeEvent (const EventObject &) const
 
virtual void Modified () const
 
void Register () const override
 
void RemoveAllObservers ()
 
void RemoveObserver (unsigned long tag)
 
void SetDebug (bool debugFlag) const
 
void SetReferenceCount (int) override
 
void UnRegister () const noexcept override
 
void SetMetaDataDictionary (const MetaDataDictionary &rhs)
 
void SetMetaDataDictionary (MetaDataDictionary &&rrhs)
 
virtual void SetObjectName (std::string _arg)
 
virtual const std::string & GetObjectName () const
 
- Public Member Functions inherited from itk::LightObject
Pointer Clone () const
 
virtual void Delete ()
 
virtual int GetReferenceCount () const
 
void Print (std::ostream &os, Indent indent=0) const
 

Static Public Member Functions

static Pointer New ()
 
- Static Public Member Functions inherited from itk::Statistics::KdTreeGenerator< TSample >
static Pointer New ()
 
- Static Public Member Functions inherited from itk::Object
static bool GetGlobalWarningDisplay ()
 
static void GlobalWarningDisplayOff ()
 
static void GlobalWarningDisplayOn ()
 
static Pointer New ()
 
static void SetGlobalWarningDisplay (bool val)
 
- Static Public Member Functions inherited from itk::LightObject
static void BreakOnError ()
 
static Pointer New ()
 

Protected Member Functions

KdTreeNodeTypeGenerateNonterminalNode (unsigned int beginIndex, unsigned int endIndex, MeasurementVectorType &lowerBound, MeasurementVectorType &upperBound, unsigned int level) override
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
 WeightedCentroidKdTreeGenerator ()=default
 
 ~WeightedCentroidKdTreeGenerator () override=default
 
- Protected Member Functions inherited from itk::Statistics::KdTreeGenerator< TSample >
KdTreeNodeTypeGenerateTreeLoop (unsigned int beginIndex, unsigned int endIndex, MeasurementVectorType &lowerBound, MeasurementVectorType &upperBound, unsigned int level)
 
SubsamplePointer GetSubsample ()
 
 KdTreeGenerator ()
 
 ~KdTreeGenerator () override=default
 
- Protected Member Functions inherited from itk::Object
 Object ()
 
 ~Object () override
 
bool PrintObservers (std::ostream &os, Indent indent) const
 
virtual void SetTimeStamp (const TimeStamp &timeStamp)
 
- Protected Member Functions inherited from itk::LightObject
virtual LightObject::Pointer InternalClone () const
 
 LightObject ()
 
virtual void PrintHeader (std::ostream &os, Indent indent) const
 
virtual void PrintTrailer (std::ostream &os, Indent indent) const
 
virtual ~LightObject ()
 

Private Attributes

MeasurementVectorType m_TempLowerBound
 
MeasurementVectorType m_TempMean
 
MeasurementVectorType m_TempUpperBound
 

Additional Inherited Members

- Protected Attributes inherited from itk::LightObject
std::atomic< int > m_ReferenceCount
 

Detailed Description

template<typename TSample>
class itk::Statistics::WeightedCentroidKdTreeGenerator< TSample >

This class generates a KdTree object with centroid information.

The KdTree object stores measurement 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 KdTreeGenerator class.

This class is derived from the KdTreeGenerator class. The only difference between this class and the KdTreeGenerator class is that the nonterminal node type of this class is KdTreeWeightedCentroidNonterminalNode and that of the KdTreeGenerator is KdTreeNonterminalNode. Therefore, the public interface is identical to each other. The nonterminal node generation routines differ.

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.

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. It is now obtained from the sample set as input. You may query this length using the function GetMeasurementVectorSize().

See also
KdTree, KdTreeNode, KdTreeWeightedCentroidNonterminalNode, KdTreeTerminalNode, KdTreeGenerator
Examples
Examples/Statistics/KdTree.cxx, Examples/Statistics/KdTreeBasedKMeansClustering.cxx, and Examples/Statistics/ScalarImageKmeansModelEstimator.cxx.

Definition at line 67 of file itkWeightedCentroidKdTreeGenerator.h.

Member Typedef Documentation

◆ ConstPointer

template<typename TSample >
using itk::Statistics::WeightedCentroidKdTreeGenerator< TSample >::ConstPointer = SmartPointer<const Self>

Definition at line 76 of file itkWeightedCentroidKdTreeGenerator.h.

◆ KdTreeNodeType

template<typename TSample >
using itk::Statistics::WeightedCentroidKdTreeGenerator< TSample >::KdTreeNodeType = typename Superclass::KdTreeNodeType

Definition at line 90 of file itkWeightedCentroidKdTreeGenerator.h.

◆ KdTreeType

template<typename TSample >
using itk::Statistics::WeightedCentroidKdTreeGenerator< TSample >::KdTreeType = typename Superclass::KdTreeType

Definition at line 89 of file itkWeightedCentroidKdTreeGenerator.h.

◆ MeasurementType

template<typename TSample >
using itk::Statistics::WeightedCentroidKdTreeGenerator< TSample >::MeasurementType = typename Superclass::MeasurementType

Definition at line 86 of file itkWeightedCentroidKdTreeGenerator.h.

◆ MeasurementVectorType

type alias alias for the source data container

Definition at line 85 of file itkWeightedCentroidKdTreeGenerator.h.

◆ Pointer

template<typename TSample >
using itk::Statistics::WeightedCentroidKdTreeGenerator< TSample >::Pointer = SmartPointer<Self>

Definition at line 75 of file itkWeightedCentroidKdTreeGenerator.h.

◆ Self

Standard class type aliases

Definition at line 73 of file itkWeightedCentroidKdTreeGenerator.h.

◆ SubsamplePointer

template<typename TSample >
using itk::Statistics::WeightedCentroidKdTreeGenerator< TSample >::SubsamplePointer = typename Superclass::SubsamplePointer

Definition at line 88 of file itkWeightedCentroidKdTreeGenerator.h.

◆ SubsampleType

template<typename TSample >
using itk::Statistics::WeightedCentroidKdTreeGenerator< TSample >::SubsampleType = typename Superclass::SubsampleType

Definition at line 87 of file itkWeightedCentroidKdTreeGenerator.h.

◆ Superclass

template<typename TSample >
using itk::Statistics::WeightedCentroidKdTreeGenerator< TSample >::Superclass = KdTreeGenerator<TSample>

Definition at line 74 of file itkWeightedCentroidKdTreeGenerator.h.

Constructor & Destructor Documentation

◆ WeightedCentroidKdTreeGenerator()

template<typename TSample >
itk::Statistics::WeightedCentroidKdTreeGenerator< TSample >::WeightedCentroidKdTreeGenerator ( )
protecteddefault

Constructor

◆ ~WeightedCentroidKdTreeGenerator()

template<typename TSample >
itk::Statistics::WeightedCentroidKdTreeGenerator< TSample >::~WeightedCentroidKdTreeGenerator ( )
overrideprotecteddefault

Destructor

Member Function Documentation

◆ CreateAnother()

template<typename TSample >
virtual::itk::LightObject::Pointer itk::Statistics::WeightedCentroidKdTreeGenerator< TSample >::CreateAnother ( ) const
virtual

Create an object from an instance, potentially deferring to a factory. This method allows you to create an instance of an object that is exactly the same type as the referring object. This is useful in cases where an object has been cast back to a base class.

Reimplemented from itk::Statistics::KdTreeGenerator< TSample >.

◆ GenerateNonterminalNode()

template<typename TSample >
KdTreeNodeType* itk::Statistics::WeightedCentroidKdTreeGenerator< TSample >::GenerateNonterminalNode ( unsigned int  beginIndex,
unsigned int  endIndex,
MeasurementVectorType lowerBound,
MeasurementVectorType upperBound,
unsigned int  level 
)
overrideprotectedvirtual

Nonterminal node generation routine

Reimplemented from itk::Statistics::KdTreeGenerator< TSample >.

◆ GetNameOfClass()

template<typename TSample >
virtual const char* itk::Statistics::WeightedCentroidKdTreeGenerator< TSample >::GetNameOfClass ( ) const
virtual

Run-time type information (and related methods)

Reimplemented from itk::Statistics::KdTreeGenerator< TSample >.

◆ New()

template<typename TSample >
static Pointer itk::Statistics::WeightedCentroidKdTreeGenerator< TSample >::New ( )
static

Method for creation through the object factory.

◆ PrintSelf()

template<typename TSample >
void itk::Statistics::WeightedCentroidKdTreeGenerator< TSample >::PrintSelf ( std::ostream &  os,
Indent  indent 
) const
overrideprotectedvirtual

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::Statistics::KdTreeGenerator< TSample >.

Member Data Documentation

◆ m_TempLowerBound

template<typename TSample >
MeasurementVectorType itk::Statistics::WeightedCentroidKdTreeGenerator< TSample >::m_TempLowerBound
private

Definition at line 111 of file itkWeightedCentroidKdTreeGenerator.h.

◆ m_TempMean

template<typename TSample >
MeasurementVectorType itk::Statistics::WeightedCentroidKdTreeGenerator< TSample >::m_TempMean
private

Definition at line 113 of file itkWeightedCentroidKdTreeGenerator.h.

◆ m_TempUpperBound

template<typename TSample >
MeasurementVectorType itk::Statistics::WeightedCentroidKdTreeGenerator< TSample >::m_TempUpperBound
private

Definition at line 112 of file itkWeightedCentroidKdTreeGenerator.h.


The documentation for this class was generated from the following file: