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
128template <
typename TInputImage,
typename TMembershipFunction>
189 itkSetMacro(Threshold,
double);
190 itkGetConstMacro(Threshold,
double);
194 itkSetMacro(OffsetAdd,
double);
195 itkGetConstMacro(OffsetAdd,
double);
199 itkSetMacro(OffsetMultiply,
double);
200 itkGetConstMacro(OffsetMultiply,
double);
204 itkSetMacro(MaxSplitAttempts,
int);
205 itkGetConstMacro(MaxSplitAttempts,
int);
271 Perturb(
double * oldCodeword,
int scale,
double * newCodeword);
298#ifndef ITK_MANUAL_INSTANTIATION
299# include "itkImageKmeansModelEstimator.hxx"
SizeValueType m_VectorDimension
SmartPointer< Self > Pointer
void Reallocate(int oldSize, int newSize)
ImageRegionConstIterator< TInputImage > InputImageConstIterator
ImageKmeansModelEstimator Self
typename TInputImage::Pointer InputImagePointer
void EstimateModels() override
typename TInputImage::PixelType::VectorType InputPixelVectorType
void GenerateData() override
typename TMembershipFunction::Pointer MembershipFunctionPointer
int m_OutputNumberOfEmptyCells
~ImageKmeansModelEstimator() override=default
typename TInputImage::ConstPointer InputImageConstPointer
void NearestNeighborSearchBasic(double *distortion)
vnl_matrix< int > CodebookMatrixOfIntegerType
void PrintSelf(std::ostream &os, Indent indent) const override
CodebookMatrixOfIntegerType m_CodewordHistogram
SmartPointer< const Self > ConstPointer
SizeValueType m_NumberOfCodewords
CodebookMatrixOfDoubleType m_Centroid
void SplitCodewords(int currentSize, int numDesired, int scale)
CodebookMatrixOfDoubleType m_CodewordDistortion
typename TInputImage::PixelType InputImagePixelType
void SetCodebook(CodebookMatrixOfDoubleType inCodebook)
ImageRegionIterator< TInputImage > InputImageIterator
CodebookMatrixOfDoubleType GetKmeansResults()
TInputImage InputImageType
ImageKmeansModelEstimator()
void Perturb(double *oldCodeword, int scale, double *newCodeword)
int WithoutCodebookUseLBG()
vnl_matrix< double > CodebookMatrixOfDoubleType
typename TInputImage::PixelType::VectorType InputImageVectorType
ImageModelEstimatorBase< TInputImage, TMembershipFunction > Superclass
typename TInputImage::SizeType ImageSizeType
SizeValueType m_CurrentNumberOfCodewords
CodebookMatrixOfDoubleType GetOutCodebook()
void PrintKmeansAlgorithmResults()
double m_OutputDistortion
void EstimateKmeansModelParameters()
CodebookMatrixOfDoubleType m_Codebook
ImageModelEstimatorBase()
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.
Implements transparent reference counting.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
unsigned long SizeValueType