|
OTB
9.0.0
Orfeo Toolbox
|
Go to the documentation of this file.
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
itk::SmartPointer< Self > Pointer
LabelObjectType::ClassLabelType ClassLabelType
itk::SmartPointer< const Self > ConstPointer
void SetMeasurementFunctor(MeasurementFunctorType &functor)
LabelMapToSampleListFilterType::Pointer m_LabelMapToSampleListFilter
itk::Statistics::ListSample< ClassLabelVectorType > TrainingListSampleType
TreeGeneratorType::KdTreeType TreeType
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
This class converts a LabelObjectMap with some class labeled objects to a SampleList and a TrainingSa...
InputImageType::Pointer InputImagePointer
itk::Statistics::ListSample< VectorType > ListSampleType
InputImagePointer m_InputLabelMap
itk::LabelMapFilter< TInputImage, TInputImage > Superclass
InputImageType::ConstPointer InputImageConstPointer
itk::SmartPointer< Self > Pointer
CentroidsVectorType m_Centroids
TMeasurementFunctor MeasurementFunctorType
unsigned int m_NumberOfClasses
LabelMapToSampleListFilterType::MeasurementFunctorType MeasurementFunctorType
CentroidsVectorType & GetCentroids()
Execute a KMeans on the attributes of a itk::LabelMap<otb::AttributesMapLabelObject>
itk::FixedArray< ClassLabelType, 1 > ClassLabelVectorType
InputImageType::PixelType InputImagePixelType
LabelObjectType::AttributesValueType AttributesValueType
InputImageType::RegionType InputImageRegionType
std::vector< VectorType > CentroidsVectorType
const CentroidsVectorType & GetCentroids() const
itk::Statistics::KdTreeBasedKmeansEstimator< TreeType > EstimatorType
itk::DataObject DataObjectType
InputImageType::LabelObjectType LabelObjectType
KMeansAttributesLabelMapFilter Self
itk::Statistics::EuclideanDistanceMetric< VectorType > DistanceType
itk::VariableLengthVector< AttributesValueType > VectorType
otb::LabelMapWithClassLabelToLabeledSampleListFilter< InputImageType, ListSampleType, TrainingListSampleType > LabelMapToSampleListFilterType
DataObjectType::Pointer DataObjectPointerType
~KMeansAttributesLabelMapFilter() override
MeasurementFunctorType & GetMeasurementFunctor()
itk::Statistics::WeightedCentroidKdTreeGenerator< ListSampleType > TreeGeneratorType
TInputImage InputImageType