21 #ifndef otbKMeansImageClassificationFilter_h
22 #define otbKMeansImageClassificationFilter_h
24 #include "itkInPlaceImageFilter.h"
25 #include "itkListSample.h"
26 #include "itkEuclideanDistanceMetric.h"
44 template <
class TInputImage,
class TOutputImage,
unsigned int VMaxSampleDimension = 10,
class TMaskImage = TOutputImage>
50 typedef itk::InPlaceImageFilter<TInputImage, TOutputImage>
Superclass;
64 itkStaticConstMacro(MaxSampleDimension,
unsigned int, VMaxSampleDimension);
68 typedef typename InputImageType::InternalPixelType
ValueType;
77 typedef typename OutputImageType::PixelType
LabelType;
79 typedef itk::FixedArray<ValueType, MaxSampleDimension>
SampleType;
82 typedef itk::Statistics::EuclideanDistanceMetric<SampleType>
DistanceType;
114 void ThreadedGenerateData(
const OutputImageRegionType& outputRegionForThread, itk::ThreadIdType threadId)
override;
117 void BeforeThreadedGenerateData()
override;
120 void PrintSelf(std::ostream& os, itk::Indent indent)
const override;
124 void operator=(
const Self&) =
delete;
136 #ifndef OTB_MANUAL_INSTANTIATION