00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkWeightedCenteroidKdTreeGenerator_h
00018 #define __itkWeightedCenteroidKdTreeGenerator_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
00035 template < class TSample >
00036 class ITK_EXPORT WeightedCenteroidKdTreeGenerator :
00037 public KdTreeGenerator< TSample >
00038 {
00039 public:
00041 typedef WeightedCenteroidKdTreeGenerator Self ;
00042 typedef KdTreeGenerator< TSample > Superclass ;
00043 typedef SmartPointer<Self> Pointer;
00044
00046 itkTypeMacro(WeightedCenteroidKdTreeGenerator, KdTreeGenerator);
00047
00049 itkNewMacro(Self) ;
00050
00052 typedef typename Superclass::MeasurementVectorType MeasurementVectorType ;
00053 typedef typename Superclass::MeasurementType MeasurementType ;
00054 typedef typename Superclass::SubsampleType SubsampleType ;
00055 typedef typename Superclass::SubsamplePointer SubsamplePointer ;
00056 typedef typename Superclass::KdTreeType KdTreeType ;
00057 typedef typename Superclass::KdTreeNodeType KdTreeNodeType ;
00058 itkStaticConstMacro(MeasurementVectorSize, unsigned int,
00059 TSample::MeasurementVectorSize);
00060
00061 protected:
00062 WeightedCenteroidKdTreeGenerator() ;
00063 virtual ~WeightedCenteroidKdTreeGenerator() {}
00064 void PrintSelf(std::ostream& os, Indent indent) const ;
00065
00066 virtual KdTreeNodeType* GenerateNonterminalNode(int beginIndex,
00067 int endIndex,
00068 MeasurementVectorType
00069 &lowerBound,
00070 MeasurementVectorType
00071 &upperBound,
00072 int level) ;
00073
00074 private:
00075 WeightedCenteroidKdTreeGenerator(const Self&) ;
00076 void operator=(const Self&) ;
00077
00078 MeasurementVectorType m_TempLowerBound ;
00079 MeasurementVectorType m_TempUpperBound ;
00080 MeasurementVectorType m_TempMean ;
00081 } ;
00082
00083 }
00084 }
00085
00086 #ifndef ITK_MANUAL_INSTANTIATION
00087 #include "itkWeightedCenteroidKdTreeGenerator.txx"
00088 #endif
00089
00090 #endif
00091
00092
00093
00094