ITK  5.2.0
Insight Toolkit
itkKdTree.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright NumFOCUS
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef itkKdTree_h
19 #define itkKdTree_h
20 
21 #include <queue>
22 #include <vector>
23 
24 #include "itkPoint.h"
25 #include "itkSize.h"
26 #include "itkObject.h"
27 #include "itkArray.h"
28 
29 #include "itkSubsample.h"
30 
32 
33 namespace itk
34 {
35 namespace Statistics
36 {
63 template <typename TSample>
64 
65 struct ITK_TEMPLATE_EXPORT KdTreeNode
66 {
69 
71  using MeasurementType = typename TSample::MeasurementType;
72 
75 
78  using InstanceIdentifier = typename TSample::InstanceIdentifier;
79 
82  virtual bool
83  IsTerminal() const = 0;
84 
90  virtual void
91  GetParameters(unsigned int &, MeasurementType &) const = 0;
92 
94  virtual Self *
95  Left() = 0;
96 
98  virtual const Self *
99  Left() const = 0;
100 
102  virtual Self *
103  Right() = 0;
104 
106  virtual const Self *
107  Right() const = 0;
108 
113  virtual unsigned int
114  Size() const = 0;
115 
117  virtual void
118  GetWeightedCentroid(CentroidType &) = 0;
119 
121  virtual void
122  GetCentroid(CentroidType &) = 0;
123 
125  virtual InstanceIdentifier GetInstanceIdentifier(InstanceIdentifier) const = 0;
126 
128  virtual void AddInstanceIdentifier(InstanceIdentifier) = 0;
129 
131  virtual ~KdTreeNode() = default; // needed to subclasses will actually be deleted
132 }; // end of class
133 
147 template <typename TSample>
148 
149 struct ITK_TEMPLATE_EXPORT KdTreeNonterminalNode : public KdTreeNode<TSample>
150 {
155 
157 
158  ~KdTreeNonterminalNode() override = default;
159 
160  bool
161  IsTerminal() const override
162  {
163  return false;
164  }
165 
166  void
167  GetParameters(unsigned int &, MeasurementType &) const override;
168 
170  Superclass *
171  Left() override
172  {
173  return m_Left;
174  }
175 
177  Superclass *
178  Right() override
179  {
180  return m_Right;
181  }
182 
184  const Superclass *
185  Left() const override
186  {
187  return m_Left;
188  }
189 
191  const Superclass *
192  Right() const override
193  {
194  return m_Right;
195  }
196 
201  unsigned int
202  Size() const override
203  {
204  return 0;
205  }
206 
211  void
213  {}
214 
219  void
221  {}
222 
228  InstanceIdentifier GetInstanceIdentifier(InstanceIdentifier) const override { return this->m_InstanceIdentifier; }
229 
233  void
235  {
236  this->m_InstanceIdentifier = valueId;
237  }
238 
239 private:
240  unsigned int m_PartitionDimension;
245 }; // end of class
246 
263 template <typename TSample>
264 struct ITK_TEMPLATE_EXPORT KdTreeWeightedCentroidNonterminalNode : public KdTreeNode<TSample>
265 {
270  using MeasurementVectorSizeType = typename TSample::MeasurementVectorSizeType;
271 
274  Superclass *,
275  Superclass *,
276  CentroidType &,
277  unsigned int);
278 
279  ~KdTreeWeightedCentroidNonterminalNode() override = default;
280 
282  bool
283  IsTerminal() const override
284  {
285  return false;
286  }
287 
289  void
290  GetParameters(unsigned int &, MeasurementType &) const override;
291 
293  MeasurementVectorSizeType
295  {
296  return m_MeasurementVectorSize;
297  }
298 
300  Superclass *
301  Left() override
302  {
303  return m_Left;
304  }
305 
307  Superclass *
308  Right() override
309  {
310  return m_Right;
311  }
312 
314  const Superclass *
315  Left() const override
316  {
317  return m_Left;
318  }
319 
321  const Superclass *
322  Right() const override
323  {
324  return m_Right;
325  }
326 
328  unsigned int
329  Size() const override
330  {
331  return m_Size;
332  }
333 
337  void
338  GetWeightedCentroid(CentroidType & centroid) override
339  {
340  centroid = m_WeightedCentroid;
341  }
342 
346  void
347  GetCentroid(CentroidType & centroid) override
348  {
349  centroid = m_Centroid;
350  }
351 
357  InstanceIdentifier GetInstanceIdentifier(InstanceIdentifier) const override { return this->m_InstanceIdentifier; }
358 
362  void
364  {
365  this->m_InstanceIdentifier = valueId;
366  }
367 
368 private:
370  unsigned int m_PartitionDimension;
375  unsigned int m_Size;
378 }; // end of class
379 
393 template <typename TSample>
394 struct ITK_TEMPLATE_EXPORT KdTreeTerminalNode : public KdTreeNode<TSample>
395 {
400 
401  KdTreeTerminalNode() = default;
402 
403  ~KdTreeTerminalNode() override { this->m_InstanceIdentifiers.clear(); }
404 
406  bool
407  IsTerminal() const override
408  {
409  return true;
410  }
411 
413  void
414  GetParameters(unsigned int &, MeasurementType &) const override
415  {}
416 
418  Superclass *
419  Left() override
420  {
421  return nullptr;
422  }
423 
425  Superclass *
426  Right() override
427  {
428  return nullptr;
429  }
430 
432  const Superclass *
433  Left() const override
434  {
435  return nullptr;
436  }
437 
439  const Superclass *
440  Right() const override
441  {
442  return nullptr;
443  }
444 
446  unsigned int
447  Size() const override
448  {
449  return static_cast<unsigned int>(m_InstanceIdentifiers.size());
450  }
451 
456  void
458  {}
459 
464  void
466  {}
467 
473  InstanceIdentifier
475  {
476  return m_InstanceIdentifiers[index];
477  }
478 
482  void
484  {
485  m_InstanceIdentifiers.push_back(id);
486  }
487 
488 private:
489  std::vector<InstanceIdentifier> m_InstanceIdentifiers;
490 }; // end of class
491 
526 template <typename TSample>
527 class ITK_TEMPLATE_EXPORT KdTree : public Object
528 {
529 public:
530  ITK_DISALLOW_COPY_AND_ASSIGN(KdTree);
531 
533  using Self = KdTree;
537 
539  itkTypeMacro(KdTree, Object);
540 
542  itkNewMacro(Self);
543 
545  using SampleType = TSample;
546  using MeasurementVectorType = typename TSample::MeasurementVectorType;
547  using MeasurementType = typename TSample::MeasurementType;
548  using InstanceIdentifier = typename TSample::InstanceIdentifier;
549  using AbsoluteFrequencyType = typename TSample::AbsoluteFrequencyType;
550 
551  using MeasurementVectorSizeType = unsigned int;
552 
555  itkGetConstMacro(MeasurementVectorSize, MeasurementVectorSizeType);
556 
559 
562 
566  using NeighborType = std::pair<InstanceIdentifier, double>;
567 
568  using InstanceIdentifierVectorType = std::vector<InstanceIdentifier>;
569 
582  {
583  public:
584 
586  NearestNeighbors(std::vector<double> & cache_vector)
587  : m_FarthestNeighborIndex(0)
588  , m_Distances(cache_vector)
589  {}
590  NearestNeighbors() = delete;
591 
593  ~NearestNeighbors() = default;
594 
597  void
598  resize(unsigned int k)
599  {
600  m_Identifiers.clear();
601  m_Identifiers.resize(k, NumericTraits<IdentifierType>::max());
602  m_Distances.clear();
603  m_Distances.resize(k, NumericTraits<double>::max());
604  m_FarthestNeighborIndex = 0;
605  }
607 
609  double
611  {
612  return m_Distances[m_FarthestNeighborIndex];
613  }
614 
617  void
619  {
620  m_Identifiers[m_FarthestNeighborIndex] = id;
621  m_Distances[m_FarthestNeighborIndex] = distance;
622  double farthestDistance = NumericTraits<double>::min();
623  const auto size = static_cast<unsigned int>(m_Distances.size());
624  for (unsigned int i = 0; i < size; i++)
625  {
626  if (m_Distances[i] > farthestDistance)
627  {
628  farthestDistance = m_Distances[i];
629  m_FarthestNeighborIndex = i;
630  }
631  }
632  }
634 
637  GetNeighbors() const
638  {
639  return m_Identifiers;
640  }
641 
645  GetNeighbor(unsigned int index) const
646  {
647  return m_Identifiers[index];
648  }
649 
650  private:
653 
656 
660  std::vector<double> & m_Distances;
661  };
662 
665  void
666  SetBucketSize(unsigned int);
667 
670  void
671  SetSample(const TSample *);
672 
674  const TSample *
675  GetSample() const
676  {
677  return m_Sample;
678  }
679 
681  Size() const
682  {
683  return m_Sample->Size();
684  }
685 
690  KdTreeNodeType *
692  {
693  return m_EmptyTerminalNode;
694  }
695 
698  void
700  {
701  if (this->m_Root)
702  {
703  this->DeleteNode(this->m_Root);
704  }
705  this->m_Root = root;
706  }
708 
710  KdTreeNodeType *
712  {
713  return m_Root;
714  }
715 
718  const MeasurementVectorType &
720  {
721  return m_Sample->GetMeasurementVector(id);
722  }
723 
726  AbsoluteFrequencyType
728  {
729  return m_Sample->GetFrequency(id);
730  }
731 
733  DistanceMetricType *
735  {
736  return m_DistanceMetric.GetPointer();
737  }
738 
740  void
741  Search(const MeasurementVectorType &, unsigned int, InstanceIdentifierVectorType &) const;
742 
746  void
747  Search(const MeasurementVectorType &, unsigned int, InstanceIdentifierVectorType &, std::vector<double> &) const;
748 
750  void
751  Search(const MeasurementVectorType &, double, InstanceIdentifierVectorType &) const;
752 
758  bool
759  BallWithinBounds(const MeasurementVectorType &, MeasurementVectorType &, MeasurementVectorType &, double) const;
760 
764  bool
765  BoundsOverlapBall(const MeasurementVectorType &, MeasurementVectorType &, MeasurementVectorType &, double) const;
766 
768  void
769  DeleteNode(KdTreeNodeType *);
770 
772  void
773  PrintTree(std::ostream &) const;
774 
776  void
777  PrintTree(KdTreeNodeType *, unsigned int, unsigned int, std::ostream & os = std::cout) const;
778 
781  void
782  PlotTree(std::ostream & os) const;
783 
785  void
786  PlotTree(KdTreeNodeType * node, std::ostream & os = std::cout) const;
787 
788  using Iterator = typename TSample::Iterator;
789  using ConstIterator = typename TSample::ConstIterator;
790 
791 protected:
793  KdTree();
794 
796  ~KdTree() override;
797 
798  void
799  PrintSelf(std::ostream & os, Indent indent) const override;
800 
802  int
803  NearestNeighborSearchLoop(const KdTreeNodeType *,
804  const MeasurementVectorType &,
807  NearestNeighbors &) const;
808 
810  int
811  SearchLoop(const KdTreeNodeType *,
812  const MeasurementVectorType &,
813  double,
817 
818 private:
820  const TSample * m_Sample;
821 
824 
827 
830 
833 
836 }; // end of class
837 } // end of namespace Statistics
838 } // end of namespace itk
839 
840 #ifndef ITK_MANUAL_INSTANTIATION
841 # include "itkKdTree.hxx"
842 #endif
843 
844 #endif
itk::Statistics::KdTreeNonterminalNode::m_PartitionValue
MeasurementType m_PartitionValue
Definition: itkKdTree.h:241
itk::Statistics::KdTreeWeightedCentroidNonterminalNode::GetWeightedCentroid
void GetWeightedCentroid(CentroidType &centroid) override
Definition: itkKdTree.h:338
itk::Statistics::KdTreeWeightedCentroidNonterminalNode::Size
unsigned int Size() const override
Definition: itkKdTree.h:329
itk::Statistics::KdTree::NearestNeighbors::GetNeighbor
InstanceIdentifier GetNeighbor(unsigned int index) const
Definition: itkKdTree.h:645
itk::Statistics::KdTree::m_BucketSize
int m_BucketSize
Definition: itkKdTree.h:823
itk::Statistics::KdTree
This class provides methods for k-nearest neighbor search and related data structures for a k-d tree.
Definition: itkKdTree.h:527
itkSubsample.h
itk::Statistics::KdTree::NearestNeighbors::m_FarthestNeighborIndex
unsigned int m_FarthestNeighborIndex
Definition: itkKdTree.h:652
itk::Statistics::KdTree::NearestNeighbors::m_Distances
std::vector< double > & m_Distances
Definition: itkKdTree.h:660
itk::Statistics::KdTree::m_DistanceMetric
DistanceMetricType::Pointer m_DistanceMetric
Definition: itkKdTree.h:832
itk::Statistics::KdTreeWeightedCentroidNonterminalNode::m_InstanceIdentifier
InstanceIdentifier m_InstanceIdentifier
Definition: itkKdTree.h:374
itk::Statistics::KdTreeNonterminalNode::AddInstanceIdentifier
void AddInstanceIdentifier(InstanceIdentifier valueId) override
Definition: itkKdTree.h:234
itk::Statistics::KdTreeNode::MeasurementType
typename TSample::MeasurementType MeasurementType
Definition: itkKdTree.h:71
itk::Size
Represent a n-dimensional size (bounds) of a n-dimensional image.
Definition: itkSize.h:69
itk::Statistics::KdTree::GetFrequency
AbsoluteFrequencyType GetFrequency(InstanceIdentifier id) const
Definition: itkKdTree.h:727
itk::Statistics::KdTree::MeasurementVectorSizeType
unsigned int MeasurementVectorSizeType
Definition: itkKdTree.h:551
itk::Statistics::KdTreeNonterminalNode::GetWeightedCentroid
void GetWeightedCentroid(CentroidType &) override
Definition: itkKdTree.h:212
itk::Statistics::KdTreeNode::InstanceIdentifier
typename TSample::InstanceIdentifier InstanceIdentifier
Definition: itkKdTree.h:78
itk::Statistics::KdTreeWeightedCentroidNonterminalNode
This is a subclass of the KdTreeNode.
Definition: itkKdTree.h:264
itk::Statistics::KdTreeWeightedCentroidNonterminalNode::m_Right
Superclass * m_Right
Definition: itkKdTree.h:377
itk::Statistics::KdTree::m_Sample
const TSample * m_Sample
Definition: itkKdTree.h:820
itkPoint.h
itk::Statistics::KdTree::NearestNeighbors::NearestNeighbors
NearestNeighbors(std::vector< double > &cache_vector)
Definition: itkKdTree.h:586
itk::Statistics::KdTree::GetDistanceMetric
DistanceMetricType * GetDistanceMetric()
Definition: itkKdTree.h:734
itk::Statistics::KdTree::NeighborType
std::pair< InstanceIdentifier, double > NeighborType
Definition: itkKdTree.h:566
itk::Statistics::KdTreeNonterminalNode
This is a subclass of the KdTreeNode.
Definition: itkKdTree.h:149
itk::NumericTraits::min
static constexpr T min(const T &)
Definition: itkNumericTraits.h:172
itk::Statistics::KdTree::m_EmptyTerminalNode
KdTreeNodeType * m_EmptyTerminalNode
Definition: itkKdTree.h:829
itk::Statistics::KdTree::InstanceIdentifier
typename TSample::InstanceIdentifier InstanceIdentifier
Definition: itkKdTree.h:548
itk::Statistics::KdTree::InstanceIdentifierVectorType
std::vector< InstanceIdentifier > InstanceIdentifierVectorType
Definition: itkKdTree.h:568
itk::Statistics::KdTreeTerminalNode::Size
unsigned int Size() const override
Definition: itkKdTree.h:447
itk::Statistics::KdTreeNonterminalNode::GetCentroid
void GetCentroid(CentroidType &) override
Definition: itkKdTree.h:220
itk::Statistics::KdTreeNonterminalNode::Left
const Superclass * Left() const override
Definition: itkKdTree.h:185
itk::SmartPointer< Self >
itk::Statistics::KdTreeWeightedCentroidNonterminalNode::MeasurementVectorSizeType
typename TSample::MeasurementVectorSizeType MeasurementVectorSizeType
Definition: itkKdTree.h:270
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::Statistics::KdTreeTerminalNode::m_InstanceIdentifiers
std::vector< InstanceIdentifier > m_InstanceIdentifiers
Definition: itkKdTree.h:489
itk::Statistics::KdTree::NearestNeighbors::GetLargestDistance
double GetLargestDistance()
Definition: itkKdTree.h:610
itk::Statistics::KdTreeNonterminalNode::Left
Superclass * Left() override
Definition: itkKdTree.h:171
itk::Statistics::KdTree::MeasurementVectorType
typename TSample::MeasurementVectorType MeasurementVectorType
Definition: itkKdTree.h:546
itk::Statistics::KdTreeWeightedCentroidNonterminalNode::Left
Superclass * Left() override
Definition: itkKdTree.h:301
itk::Statistics::KdTreeTerminalNode::~KdTreeTerminalNode
~KdTreeTerminalNode() override
Definition: itkKdTree.h:403
itk::Statistics::KdTree::GetEmptyTerminalNode
KdTreeNodeType * GetEmptyTerminalNode()
Definition: itkKdTree.h:691
itk::Statistics::KdTreeNonterminalNode::Right
const Superclass * Right() const override
Definition: itkKdTree.h:192
itk::Statistics::KdTree::NearestNeighbors::GetNeighbors
const InstanceIdentifierVectorType & GetNeighbors() const
Definition: itkKdTree.h:637
itk::Statistics::KdTreeNonterminalNode::IsTerminal
bool IsTerminal() const override
Definition: itkKdTree.h:161
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:59
itk::Statistics::KdTree::NearestNeighbors::ReplaceFarthestNeighbor
void ReplaceFarthestNeighbor(InstanceIdentifier id, double distance)
Definition: itkKdTree.h:618
itk::Statistics::KdTreeWeightedCentroidNonterminalNode::m_Centroid
CentroidType m_Centroid
Definition: itkKdTree.h:373
itk::Statistics::KdTree::NearestNeighbors::resize
void resize(unsigned int k)
Definition: itkKdTree.h:598
itk::Statistics::KdTreeWeightedCentroidNonterminalNode::AddInstanceIdentifier
void AddInstanceIdentifier(InstanceIdentifier valueId) override
Definition: itkKdTree.h:363
itk::Statistics::KdTreeNonterminalNode::Size
unsigned int Size() const override
Definition: itkKdTree.h:202
itk::Statistics::KdTreeTerminalNode::IsTerminal
bool IsTerminal() const override
Definition: itkKdTree.h:407
itk::Statistics::KdTreeTerminalNode
This class is the node that doesn't have any child node. The IsTerminal method returns true for this ...
Definition: itkKdTree.h:394
itk::Statistics::KdTreeNonterminalNode::m_Left
Superclass * m_Left
Definition: itkKdTree.h:243
itk::Statistics::KdTree::Size
SizeValueType Size() const
Definition: itkKdTree.h:681
itk::Statistics::KdTree::NearestNeighbors::m_Identifiers
InstanceIdentifierVectorType m_Identifiers
Definition: itkKdTree.h:655
itk::Statistics::KdTreeWeightedCentroidNonterminalNode::m_Size
unsigned int m_Size
Definition: itkKdTree.h:375
itk::Statistics::KdTreeNonterminalNode::GetInstanceIdentifier
InstanceIdentifier GetInstanceIdentifier(InstanceIdentifier) const override
Definition: itkKdTree.h:228
itk::Statistics::KdTree::GetSample
const TSample * GetSample() const
Definition: itkKdTree.h:675
itk::Statistics::KdTreeWeightedCentroidNonterminalNode::m_PartitionDimension
unsigned int m_PartitionDimension
Definition: itkKdTree.h:370
itk::Statistics::KdTreeWeightedCentroidNonterminalNode::GetCentroid
void GetCentroid(CentroidType &centroid) override
Definition: itkKdTree.h:347
itk::Statistics::KdTreeTerminalNode::GetCentroid
void GetCentroid(CentroidType &) override
Definition: itkKdTree.h:465
itk::Statistics::KdTree::MeasurementType
typename TSample::MeasurementType MeasurementType
Definition: itkKdTree.h:547
itk::Statistics::KdTree::SetRoot
void SetRoot(KdTreeNodeType *root)
Definition: itkKdTree.h:699
itk::Statistics::KdTreeNonterminalNode::m_Right
Superclass * m_Right
Definition: itkKdTree.h:244
itk::Statistics::KdTreeTerminalNode::Right
const Superclass * Right() const override
Definition: itkKdTree.h:440
itk::Statistics::KdTreeWeightedCentroidNonterminalNode::m_MeasurementVectorSize
MeasurementVectorSizeType m_MeasurementVectorSize
Definition: itkKdTree.h:369
itk::Statistics::KdTreeTerminalNode::Left
const Superclass * Left() const override
Definition: itkKdTree.h:433
itk::Statistics::EuclideanDistanceMetric
Euclidean distance function.
Definition: itkEuclideanDistanceMetric.h:35
itk::Statistics::KdTreeWeightedCentroidNonterminalNode::Right
const Superclass * Right() const override
Definition: itkKdTree.h:322
itk::Statistics::KdTreeTerminalNode::GetWeightedCentroid
void GetWeightedCentroid(CentroidType &) override
Definition: itkKdTree.h:457
itk::Statistics::KdTree::ConstIterator
typename TSample::ConstIterator ConstIterator
Definition: itkKdTree.h:789
itk::NumericTraits
Define additional traits for native types such as int or float.
Definition: itkNumericTraits.h:58
itkArray.h
itk::Statistics::KdTree::SampleType
TSample SampleType
Definition: itkKdTree.h:545
itk::Statistics::KdTreeTerminalNode::GetInstanceIdentifier
InstanceIdentifier GetInstanceIdentifier(InstanceIdentifier index) const override
Definition: itkKdTree.h:474
itk::Statistics::KdTreeWeightedCentroidNonterminalNode::GetInstanceIdentifier
InstanceIdentifier GetInstanceIdentifier(InstanceIdentifier) const override
Definition: itkKdTree.h:357
itkObject.h
itk::Statistics::KdTreeTerminalNode::GetParameters
void GetParameters(unsigned int &, MeasurementType &) const override
Definition: itkKdTree.h:414
itk::Statistics::KdTreeNonterminalNode::m_PartitionDimension
unsigned int m_PartitionDimension
Definition: itkKdTree.h:240
itk::Statistics::KdTreeTerminalNode::Right
Superclass * Right() override
Definition: itkKdTree.h:426
itk::Statistics::KdTreeWeightedCentroidNonterminalNode::m_WeightedCentroid
CentroidType m_WeightedCentroid
Definition: itkKdTree.h:372
itk::Statistics::KdTreeNonterminalNode::Right
Superclass * Right() override
Definition: itkKdTree.h:178
itk::Statistics::KdTree::Iterator
typename TSample::Iterator Iterator
Definition: itkKdTree.h:788
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::Statistics::KdTreeWeightedCentroidNonterminalNode::m_Left
Superclass * m_Left
Definition: itkKdTree.h:376
itk::Statistics::KdTree::m_Root
KdTreeNodeType * m_Root
Definition: itkKdTree.h:826
itk::Statistics::KdTreeTerminalNode::Left
Superclass * Left() override
Definition: itkKdTree.h:419
itk::Statistics::KdTreeWeightedCentroidNonterminalNode::Right
Superclass * Right() override
Definition: itkKdTree.h:308
itk::Array< double >
itk::Statistics::KdTreeWeightedCentroidNonterminalNode::IsTerminal
bool IsTerminal() const override
Definition: itkKdTree.h:283
itk::Object
Base class for most ITK classes.
Definition: itkObject.h:62
itk::Statistics::KdTree::GetRoot
KdTreeNodeType * GetRoot()
Definition: itkKdTree.h:711
itk::Statistics::KdTreeWeightedCentroidNonterminalNode::m_PartitionValue
MeasurementType m_PartitionValue
Definition: itkKdTree.h:371
itk::Statistics::KdTreeWeightedCentroidNonterminalNode::Left
const Superclass * Left() const override
Definition: itkKdTree.h:315
itk::Statistics::KdTree::GetMeasurementVector
const MeasurementVectorType & GetMeasurementVector(InstanceIdentifier id) const
Definition: itkKdTree.h:719
itkEuclideanDistanceMetric.h
itk::Statistics::KdTreeWeightedCentroidNonterminalNode::GetMeasurementVectorSize
MeasurementVectorSizeType GetMeasurementVectorSize() const
Definition: itkKdTree.h:294
itk::Statistics::KdTreeTerminalNode::AddInstanceIdentifier
void AddInstanceIdentifier(InstanceIdentifier id) override
Definition: itkKdTree.h:483
itk::Statistics::KdTree::NearestNeighbors
data structure for storing k-nearest neighbor search result (k number of Neighbors)
Definition: itkKdTree.h:581
itk::SizeValueType
unsigned long SizeValueType
Definition: itkIntTypes.h:83
itkSize.h
itk::Statistics::KdTree::AbsoluteFrequencyType
typename TSample::AbsoluteFrequencyType AbsoluteFrequencyType
Definition: itkKdTree.h:549
itk::Statistics::KdTreeNonterminalNode::m_InstanceIdentifier
InstanceIdentifier m_InstanceIdentifier
Definition: itkKdTree.h:242
itk::Statistics::KdTreeNode
This class defines the interface of its derived classes.
Definition: itkKdTree.h:65
itk::Statistics::KdTree::m_MeasurementVectorSize
MeasurementVectorSizeType m_MeasurementVectorSize
Definition: itkKdTree.h:835