18#ifndef itkImageKmeansModelEstimator_h
19#define itkImageKmeansModelEstimator_h
25#include "vnl/vnl_vector.h"
26#include "vnl/vnl_matrix.h"
28#include "vnl/algo/vnl_matrix_inverse.h"
36#define GLA_CONVERGED 1
37#define GLA_NOT_CONVERGED 2
38#define LBG_COMPLETED 3
130template <
typename TInputImage,
typename TMembershipFunction>
191 itkSetMacro(Threshold,
double);
192 itkGetConstMacro(Threshold,
double);
196 itkSetMacro(OffsetAdd,
double);
197 itkGetConstMacro(OffsetAdd,
double);
201 itkSetMacro(OffsetMultiply,
double);
202 itkGetConstMacro(OffsetMultiply,
double);
206 itkSetMacro(MaxSplitAttempts,
int);
207 itkGetConstMacro(MaxSplitAttempts,
int);
273 Perturb(
double * oldCodeword,
int scale,
double * newCodeword);
280 double m_Threshold{};
281 double m_OffsetAdd{};
282 double m_OffsetMultiply{};
283 int m_MaxSplitAttempts{};
285 bool m_ValidInCodebook{};
286 double m_DoubleMaximum{};
287 double m_OutputDistortion{};
288 int m_OutputNumberOfEmptyCells{};
300#ifndef ITK_MANUAL_INSTANTIATION
301# include "itkImageKmeansModelEstimator.hxx"
Base class for ImageKmeansModelEstimator object.
void Reallocate(int oldSize, int newSize)
typename TInputImage::Pointer InputImagePointer
void EstimateModels() override
typename TInputImage::PixelType::VectorType InputPixelVectorType
void GenerateData() override
typename TMembershipFunction::Pointer MembershipFunctionPointer
~ImageKmeansModelEstimator() override=default
typename TInputImage::ConstPointer InputImageConstPointer
void NearestNeighborSearchBasic(double *distortion)
vnl_matrix< int > CodebookMatrixOfIntegerType
void PrintSelf(std::ostream &os, Indent indent) const override
void SplitCodewords(int currentSize, int numDesired, int scale)
typename TInputImage::PixelType InputImagePixelType
void SetCodebook(CodebookMatrixOfDoubleType inCodebook)
CodebookMatrixOfDoubleType GetKmeansResults()
TInputImage InputImageType
ImageKmeansModelEstimator()
void Perturb(double *oldCodeword, int scale, double *newCodeword)
int WithoutCodebookUseLBG()
vnl_matrix< double > CodebookMatrixOfDoubleType
typename TInputImage::PixelType::VectorType InputImageVectorType
typename TInputImage::SizeType ImageSizeType
CodebookMatrixOfDoubleType GetOutCodebook()
void PrintKmeansAlgorithmResults()
void EstimateKmeansModelParameters()
Base class for model estimation from images used for classification.
A multi-dimensional iterator templated over image type that walks a region of pixels.
A multi-dimensional iterator templated over image type that walks a region of pixels.
Control indentation during Print() invocation.
Light weight base class for most itk classes.
Base class for most ITK classes.
SmartPointer< const Self > ConstPointer
SmartPointer< Self > Pointer
ImageBaseType::SizeType SizeType
ImageBaseType::SpacingType VectorType
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
unsigned long SizeValueType