21 #ifndef otbKMeansAttributesLabelMapFilter_h
22 #define otbKMeansAttributesLabelMapFilter_h
24 #include "itkLabelMapFilter.h"
26 #include "itkListSample.h"
27 #include "itkWeightedCentroidKdTreeGenerator.h"
28 #include "itkKdTreeBasedKmeansEstimator.h"
38 template <
class TInputImage>
44 typedef itk::LabelMapFilter<TInputImage, TInputImage>
Superclass;
63 typedef itk::VariableLengthVector<AttributesValueType>
VectorType;
73 typedef typename TreeGeneratorType::KdTreeType
TreeType;
74 typedef itk::Statistics::KdTreeBasedKmeansEstimator<TreeType>
EstimatorType;
75 typedef itk::Statistics::EuclideanDistanceMetric<VectorType>
DistanceType;
79 itkStaticConstMacro(InputImageDimension,
unsigned int, TInputImage::ImageDimension);
98 itkSetObjectMacro(InputLabelMap, InputImageType);
99 itkGetObjectMacro(InputLabelMap, InputImageType);
105 itkSetMacro(NumberOfClasses,
unsigned int);
106 itkGetMacro(NumberOfClasses,
unsigned int);
111 return m_LabelMapToSampleListFilter->GetMeasurementFunctor();
116 m_LabelMapToSampleListFilter->SetMeasurementFunctor(functor);
128 void operator=(
const Self&) =
delete;
140 #ifndef OTB_MANUAL_INSTANTIATION