18#ifndef itkImageKmeansModelEstimator_h
19#define itkImageKmeansModelEstimator_h
25#include "vnl/vnl_vector.h"
26#include "vnl/vnl_matrix.h"
31#if !defined(ITK_LEGACY_REMOVE) && !defined(ITK_FUTURE_LEGACY_REMOVE)
32# include "vnl/algo/vnl_matrix_inverse.h"
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);
272 Perturb(
double * oldCodeword,
int scale,
double * newCodeword);
299#ifndef ITK_MANUAL_INSTANTIATION
300# 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()=default
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.
constexpr int8_t GLA_NOT_CONVERGED
constexpr int8_t LBG_COMPLETED
constexpr int8_t GLA_CONVERGED
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
unsigned long SizeValueType