62 template<
class TSample>
94 virtual const Self *
Left()
const = 0;
106 virtual unsigned int Size()
const = 0;
136 template<
class TSample>
244 template<
class TSample>
361 template<
class TSample>
482 template<
class TSample>
545 void resize(
unsigned int k )
547 m_Identifiers.clear();
551 m_FarthestNeighborIndex = 0;
556 double GetLargestDistance()
558 return m_Distances[m_FarthestNeighborIndex];
565 m_Identifiers[m_FarthestNeighborIndex] = id;
566 m_Distances[m_FarthestNeighborIndex] = distance;
568 const unsigned int size =
static_cast< unsigned int >( m_Distances.size() );
569 for (
unsigned int i = 0; i < size; i++ )
571 if ( m_Distances[i] > farthestDistance )
573 farthestDistance = m_Distances[i];
574 m_FarthestNeighborIndex = i;
583 return m_Identifiers;
590 return m_Identifiers[index];
594 const std::vector<double> & GetDistances()
const
613 void SetBucketSize(
unsigned int );
617 void SetSample(
const TSample * );
620 const TSample * GetSample()
const
627 return m_Sample->Size();
636 return m_EmptyTerminalNode;
645 this->DeleteNode( this->m_Root );
662 return m_Sample->GetMeasurementVector(
id );
669 return m_Sample->GetFrequency(
id );
675 return m_DistanceMetric.GetPointer();
679 void Search(
const MeasurementVectorType &,
unsigned int,
680 InstanceIdentifierVectorType & )
const;
683 void Search(
const MeasurementVectorType &,
double,
684 InstanceIdentifierVectorType & )
const;
691 bool BallWithinBounds(
const MeasurementVectorType &,
692 MeasurementVectorType &, MeasurementVectorType &,
double )
const;
697 bool BoundsOverlapBall(
const MeasurementVectorType &,
698 MeasurementVectorType &, MeasurementVectorType &,
double)
const;
701 void DeleteNode( KdTreeNodeType * );
704 void PrintTree( std::ostream & )
const;
707 void PrintTree( KdTreeNodeType *,
unsigned int,
unsigned int,
708 std::ostream & os = std::cout )
const;
712 void PlotTree( std::ostream & os )
const;
715 void PlotTree( KdTreeNodeType *node, std::ostream & os = std::cout )
const;
727 void PrintSelf( std::ostream & os,
Indent indent )
const;
741 void operator=(
const Self & );
764 #ifndef ITK_MANUAL_INSTANTIATION
765 #include "itkKdTree.hxx"