18 #ifndef __itkImageKmeansModelEstimator_h
19 #define __itkImageKmeansModelEstimator_h
25 #include "vnl/vnl_vector.h"
26 #include "vnl/vnl_matrix.h"
27 #include "vnl/vnl_math.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
129 template<
class TInputImage,
130 class TMembershipFunction >
185 itkSetMacro(Threshold,
double);
188 itkGetConstMacro(Threshold,
double);
191 itkSetMacro(OffsetAdd,
double);
194 itkGetConstMacro(OffsetAdd,
double);
197 itkSetMacro(OffsetMultiply,
double);
200 itkGetConstMacro(OffsetMultiply,
double);
203 itkSetMacro(MaxSplitAttempts,
int);
206 itkGetConstMacro(MaxSplitAttempts,
int);
213 virtual void PrintSelf(std::ostream & os,
Indent indent)
const;
223 void PrintKmeansAlgorithmResults();
227 void operator=(
const Self &);
235 virtual void EstimateModels();
237 void EstimateKmeansModelParameters();
244 void Reallocate(
int oldSize,
int newSize);
247 int WithCodebookUseGLA();
249 int WithoutCodebookUseLBG();
251 void NearestNeighborSearchBasic(
double *distortion);
253 void SplitCodewords(
int currentSize,
257 void Perturb(
double *oldCodeword,
259 double *newCodeword);
286 #ifndef ITK_MANUAL_INSTANTIATION
287 #include "itkImageKmeansModelEstimator.hxx"