00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkWeightedCentroidKdTreeGenerator_h
00018 #define __itkWeightedCentroidKdTreeGenerator_h
00019
00020 #include <vector>
00021
00022 #include "itkSample.h"
00023 #include "itkSubsample.h"
00024 #include "itkKdTree.h"
00025 #include "itkKdTreeGenerator.h"
00026 #include "itkStatisticsAlgorithm.h"
00027
00028 namespace itk{
00029 namespace Statistics{
00030
00065 template < class TSample >
00066 class ITK_EXPORT WeightedCentroidKdTreeGenerator :
00067 public KdTreeGenerator< TSample >
00068 {
00069 public:
00071 typedef WeightedCentroidKdTreeGenerator Self ;
00072 typedef KdTreeGenerator< TSample > Superclass ;
00073 typedef SmartPointer<Self> Pointer;
00074 typedef SmartPointer<const Self> ConstPointer;
00075
00077 itkTypeMacro(WeightedCentroidKdTreeGenerator, KdTreeGenerator);
00078
00080 itkNewMacro(Self) ;
00081
00083 typedef typename Superclass::MeasurementVectorType MeasurementVectorType ;
00084 typedef typename Superclass::MeasurementType MeasurementType ;
00085 typedef typename Superclass::SubsampleType SubsampleType ;
00086 typedef typename Superclass::SubsamplePointer SubsamplePointer ;
00087 typedef typename Superclass::KdTreeType KdTreeType ;
00088 typedef typename Superclass::KdTreeNodeType KdTreeNodeType ;
00089
00090
00091 protected:
00093 WeightedCentroidKdTreeGenerator() ;
00094
00096 virtual ~WeightedCentroidKdTreeGenerator() {}
00097
00098 void PrintSelf(std::ostream& os, Indent indent) const ;
00099
00101 virtual KdTreeNodeType* GenerateNonterminalNode(unsigned int beginIndex,
00102 unsigned int endIndex,
00103 MeasurementVectorType
00104 &lowerBound,
00105 MeasurementVectorType
00106 &upperBound,
00107 unsigned int level) ;
00108
00109 private:
00110 WeightedCentroidKdTreeGenerator(const Self&) ;
00111 void operator=(const Self&) ;
00112
00113 MeasurementVectorType m_TempLowerBound ;
00114 MeasurementVectorType m_TempUpperBound ;
00115 MeasurementVectorType m_TempMean ;
00116 } ;
00117
00118 }
00119 }
00120
00121 #ifndef ITK_MANUAL_INSTANTIATION
00122 #include "itkWeightedCentroidKdTreeGenerator.txx"
00123 #endif
00124
00125 #endif
00126
00127
00128
00129
00130