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
129 template<
typename TInputImage,
130 typename 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);
214 virtual
void PrintSelf(std::ostream & os,
Indent indent) const ITK_OVERRIDE;
217 void GenerateData() ITK_OVERRIDE;
223 void PrintKmeansAlgorithmResults();
234 virtual
void EstimateModels() ITK_OVERRIDE;
236 void EstimateKmeansModelParameters();
243 void Reallocate(
int oldSize,
int newSize);
246 int WithCodebookUseGLA();
248 int WithoutCodebookUseLBG();
250 void NearestNeighborSearchBasic(
double *distortion);
252 void SplitCodewords(
int currentSize,
256 void Perturb(
double *oldCodeword,
258 double *newCodeword);
267 double m_OffsetMultiply;
268 int m_MaxSplitAttempts;
270 bool m_ValidInCodebook;
271 double m_DoubleMaximum;
272 double m_OutputDistortion;
273 int m_OutputNumberOfEmptyCells;
285 #ifndef ITK_MANUAL_INSTANTIATION
286 #include "itkImageKmeansModelEstimator.hxx"
SmartPointer< const Self > ConstPointer
Base class for ImageKmeansModelEstimator object.
Light weight base class for most itk classes.
TInputImage::PixelType InputImagePixelType
ImageRegionIterator< TInputImage > InputImageIterator
CodebookMatrixOfDoubleType GetOutCodebook()
TMembershipFunction::Pointer MembershipFunctionPointer
TInputImage::SizeType ImageSizeType
vnl_matrix< int > CodebookMatrixOfIntegerType
TInputImage::PixelType::VectorType InputPixelVectorType
Base class for model estimation from images used for classification.
TInputImage InputImageType
unsigned long SizeValueType
ImageBaseType::SpacingType VectorType
ImageModelEstimatorBase< TInputImage, TMembershipFunction > Superclass
ImageRegionConstIterator< TInputImage > InputImageConstIterator
SmartPointer< Self > Pointer
A multi-dimensional iterator templated over image type that walks a region of pixels.
TInputImage::Pointer InputImagePointer
ImageKmeansModelEstimator Self
CodebookMatrixOfDoubleType GetKmeansResults(void)
vnl_matrix< double > CodebookMatrixOfDoubleType
Control indentation during Print() invocation.
TInputImage::PixelType::VectorType InputImageVectorType
ImageBaseType::SizeType SizeType
TInputImage::ConstPointer InputImageConstPointer
A multi-dimensional iterator templated over image type that walks a region of pixels.