62 template<
class TSample>
94 virtual const Self *
Left()
const = 0;
106 virtual unsigned int Size()
const = 0;
136 template<
class TSample>
243 template<
class TSample>
360 template<
class TSample>
481 template<
class TSample>
544 void resize(
unsigned int k )
546 m_Identifiers.clear();
550 m_FarthestNeighborIndex = 0;
555 double GetLargestDistance()
557 return m_Distances[m_FarthestNeighborIndex];
564 m_Identifiers[m_FarthestNeighborIndex] = id;
565 m_Distances[m_FarthestNeighborIndex] = distance;
567 const unsigned int size =
static_cast< unsigned int >( m_Distances.size() );
568 for (
unsigned int i = 0; i < size; i++ )
570 if ( m_Distances[i] > farthestDistance )
572 farthestDistance = m_Distances[i];
573 m_FarthestNeighborIndex = i;
582 return m_Identifiers;
589 return m_Identifiers[index];
593 const std::vector<double> & GetDistances()
const
612 void SetBucketSize(
unsigned int );
616 void SetSample(
const TSample * );
619 const TSample * GetSample()
const
626 return m_Sample->Size();
635 return m_EmptyTerminalNode;
644 this->DeleteNode( this->m_Root );
661 return m_Sample->GetMeasurementVector(
id );
668 return m_Sample->GetFrequency(
id );
674 return m_DistanceMetric.GetPointer();
678 void Search(
const MeasurementVectorType &,
unsigned int,
679 InstanceIdentifierVectorType & )
const;
682 void Search(
const MeasurementVectorType &,
double,
683 InstanceIdentifierVectorType & )
const;
690 bool BallWithinBounds(
const MeasurementVectorType &,
691 MeasurementVectorType &, MeasurementVectorType &,
double )
const;
696 bool BoundsOverlapBall(
const MeasurementVectorType &,
697 MeasurementVectorType &, MeasurementVectorType &,
double)
const;
700 void DeleteNode( KdTreeNodeType * );
703 void PrintTree( std::ostream & )
const;
706 void PrintTree( KdTreeNodeType *,
unsigned int,
unsigned int,
707 std::ostream & os = std::cout )
const;
711 void PlotTree( std::ostream & os )
const;
714 void PlotTree( KdTreeNodeType *node, std::ostream & os = std::cout )
const;
726 void PrintSelf( std::ostream & os,
Indent indent )
const;
740 void operator=(
const Self & );
763 #ifndef ITK_MANUAL_INSTANTIATION
764 #include "itkKdTree.hxx"