#include <itkWeightedCentroidKdTreeGenerator.h>
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().
Definition at line 67 of file itkWeightedCentroidKdTreeGenerator.h.
Public Member Functions | |
virtual::itk::LightObject::Pointer | CreateAnother () const |
const char * | GetNameOfClass () const override |
![]() | |
void | GenerateData () |
virtual unsigned int | GetMeasurementVectorSize () const |
OutputPointer | GetOutput () |
void | Update () |
void | SetSample (TSample *sample) |
virtual TSample * | GetSourceSample () const |
void | SetBucketSize (unsigned int size) |
virtual unsigned int | GetBucketSize () const |
![]() | |
unsigned long | AddObserver (const EventObject &event, Command *cmd) const |
unsigned long | AddObserver (const EventObject &event, std::function< void(const EventObject &)> function) const |
virtual void | DebugOff () const |
virtual void | DebugOn () const |
Command * | GetCommand (unsigned long tag) |
bool | GetDebug () const |
MetaDataDictionary & | GetMetaDataDictionary () |
const MetaDataDictionary & | GetMetaDataDictionary () const |
virtual ModifiedTimeType | GetMTime () const |
virtual const TimeStamp & | GetTimeStamp () 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) const |
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 |
![]() | |
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 Pointer | New () |
![]() | |
static bool | GetGlobalWarningDisplay () |
static void | GlobalWarningDisplayOff () |
static void | GlobalWarningDisplayOn () |
static Pointer | New () |
static void | SetGlobalWarningDisplay (bool val) |
![]() | |
static void | BreakOnError () |
static Pointer | New () |
Protected Member Functions | |
KdTreeNodeType * | GenerateNonterminalNode (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 | |
![]() | |
KdTreeNodeType * | GenerateTreeLoop (unsigned int beginIndex, unsigned int endIndex, MeasurementVectorType &lowerBound, MeasurementVectorType &upperBound, unsigned int level) |
SubsamplePointer | GetSubsample () |
KdTreeGenerator () | |
~KdTreeGenerator () override=default | |
![]() | |
Object () | |
bool | PrintObservers (std::ostream &os, Indent indent) const |
virtual void | SetTimeStamp (const TimeStamp &timeStamp) |
~Object () override | |
![]() | |
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 | |
![]() | |
std::atomic< int > | m_ReferenceCount {} |
using itk::Statistics::WeightedCentroidKdTreeGenerator< TSample >::ConstPointer = SmartPointer<const Self> |
Definition at line 76 of file itkWeightedCentroidKdTreeGenerator.h.
using itk::Statistics::KdTreeGenerator< TSample >::KdTreeNodeType |
Typedef for the k-d tree node type
Definition at line 105 of file itkKdTreeGenerator.h.
using itk::Statistics::KdTreeGenerator< TSample >::KdTreeType |
Typedef for the k-d tree
Definition at line 96 of file itkKdTreeGenerator.h.
using itk::Statistics::KdTreeGenerator< TSample >::MeasurementType |
Definition at line 90 of file itkKdTreeGenerator.h.
using itk::Statistics::KdTreeGenerator< TSample >::MeasurementVectorType |
type alias alias for the source data container
Definition at line 89 of file itkKdTreeGenerator.h.
using itk::Statistics::WeightedCentroidKdTreeGenerator< TSample >::Pointer = SmartPointer<Self> |
Definition at line 75 of file itkWeightedCentroidKdTreeGenerator.h.
using itk::Statistics::WeightedCentroidKdTreeGenerator< TSample >::Self = WeightedCentroidKdTreeGenerator |
Standard class type aliases
Definition at line 73 of file itkWeightedCentroidKdTreeGenerator.h.
using itk::Statistics::KdTreeGenerator< TSample >::SubsamplePointer |
Typedef for the smart pointer to the Subsample
Definition at line 111 of file itkKdTreeGenerator.h.
using itk::Statistics::KdTreeGenerator< TSample >::SubsampleType |
Typedef for the internal Subsample
Definition at line 108 of file itkKdTreeGenerator.h.
using itk::Statistics::WeightedCentroidKdTreeGenerator< TSample >::Superclass = KdTreeGenerator<TSample> |
Definition at line 74 of file itkWeightedCentroidKdTreeGenerator.h.
|
protecteddefault |
Constructor
|
overrideprotecteddefault |
Destructor
|
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 >.
|
overrideprotectedvirtual |
Nonterminal node generation routine
Reimplemented from itk::Statistics::KdTreeGenerator< TSample >.
|
overridevirtual |
Reimplemented from itk::Statistics::KdTreeGenerator< TSample >.
|
static |
Method for creation through the object factory.
|
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 >.
|
private |
Definition at line 111 of file itkWeightedCentroidKdTreeGenerator.h.
|
private |
Definition at line 113 of file itkWeightedCentroidKdTreeGenerator.h.
|
private |
Definition at line 112 of file itkWeightedCentroidKdTreeGenerator.h.