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
00059
template <
class TSample >
00060 class ITK_EXPORT WeightedCentroidKdTreeGenerator :
00061
public KdTreeGenerator< TSample >
00062 {
00063
public:
00065 typedef WeightedCentroidKdTreeGenerator
Self ;
00066 typedef KdTreeGenerator< TSample > Superclass ;
00067 typedef SmartPointer<Self> Pointer;
00068 typedef SmartPointer<const Self> ConstPointer;
00069
00071
itkTypeMacro(WeightedCentroidKdTreeGenerator,
KdTreeGenerator);
00072
00074
itkNewMacro(
Self) ;
00075
00077 typedef typename Superclass::MeasurementVectorType
MeasurementVectorType ;
00078 typedef typename Superclass::MeasurementType
MeasurementType ;
00079 typedef typename Superclass::SubsampleType
SubsampleType ;
00080 typedef typename Superclass::SubsamplePointer
SubsamplePointer ;
00081 typedef typename Superclass::KdTreeType
KdTreeType ;
00082 typedef typename Superclass::KdTreeNodeType
KdTreeNodeType ;
00083
itkStaticConstMacro(MeasurementVectorSize,
unsigned int,
00084 TSample::MeasurementVectorSize);
00085
00086
protected:
00088 WeightedCentroidKdTreeGenerator() ;
00089
00091 virtual ~WeightedCentroidKdTreeGenerator() {}
00092
00093
void PrintSelf(std::ostream& os,
Indent indent)
const ;
00094
00096
virtual KdTreeNodeType* GenerateNonterminalNode(
int beginIndex,
00097
int endIndex,
00098 MeasurementVectorType
00099 &lowerBound,
00100 MeasurementVectorType
00101 &upperBound,
00102
int level) ;
00103
00104
private:
00105 WeightedCentroidKdTreeGenerator(
const Self&) ;
00106
void operator=(
const Self&) ;
00107
00108 MeasurementVectorType m_TempLowerBound ;
00109 MeasurementVectorType m_TempUpperBound ;
00110 MeasurementVectorType m_TempMean ;
00111 } ;
00112
00113 }
00114 }
00115
00116
#ifndef ITK_MANUAL_INSTANTIATION
00117
#include "itkWeightedCentroidKdTreeGenerator.txx"
00118
#endif
00119
00120
#endif
00121
00122
00123
00124