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<
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);
257 void Perturb(
double *oldCodeword,
259 double *newCodeword);
286 #ifndef ITK_MANUAL_INSTANTIATION
287 #include "itkImageKmeansModelEstimator.hxx"
void Perturb(double *oldCodeword, int scale, double *newCodeword)
ImageKmeansModelEstimator()
double m_OutputDistortion
SmartPointer< const Self > ConstPointer
virtual void EstimateModels()
Base class for ImageKmeansModelEstimator object.
Light weight base class for most itk classes.
TInputImage::PixelType InputImagePixelType
virtual void PrintSelf(std::ostream &os, Indent indent) const
void Reallocate(int oldSize, int newSize)
ImageRegionIterator< TInputImage > InputImageIterator
SizeValueType m_CurrentNumberOfCodewords
CodebookMatrixOfDoubleType GetOutCodebook()
CodebookMatrixOfIntegerType m_CodewordHistogram
TMembershipFunction::Pointer MembershipFunctionPointer
void SetCodebook(CodebookMatrixOfDoubleType InCodebook)
void NearestNeighborSearchBasic(double *distortion)
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
void SplitCodewords(int currentSize, int numDesired, int scale)
ImageModelEstimatorBase< TInputImage, TMembershipFunction > Superclass
CodebookMatrixOfDoubleType m_Codebook
ImageRegionConstIterator< TInputImage > InputImageConstIterator
SmartPointer< Self > Pointer
SizeValueType m_VectorDimension
A multi-dimensional iterator templated over image type that walks a region of pixels.
void operator=(const Self &)
void PrintKmeansAlgorithmResults()
TInputImage::Pointer InputImagePointer
int WithoutCodebookUseLBG()
CodebookMatrixOfDoubleType m_CodewordDistortion
ImageKmeansModelEstimator Self
CodebookMatrixOfDoubleType GetKmeansResults(void)
void EstimateKmeansModelParameters()
vnl_matrix< double > CodebookMatrixOfDoubleType
~ImageKmeansModelEstimator()
Control indentation during Print() invocation.
TInputImage::PixelType::VectorType InputImageVectorType
TInputImage::ConstPointer InputImageConstPointer
SizeValueType m_NumberOfCodewords
A multi-dimensional iterator templated over image type that walks a region of pixels.
CodebookMatrixOfDoubleType m_Centroid
int m_OutputNumberOfEmptyCells