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 >
176 void SetCodebook(CodebookMatrixOfDoubleType InCodebook);
179 itkGetConstMacro(Codebook, CodebookMatrixOfDoubleType);
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;
227 void operator=(
const Self &) ITK_DELETE_FUNCTION;
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
Base class for ImageKmeansModelEstimator object.
TInputImage::PixelType InputImagePixelType
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
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes...
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 PrintKmeansAlgorithmResults()
TInputImage::Pointer InputImagePointer
int WithoutCodebookUseLBG()
virtual void EstimateModels() override
CodebookMatrixOfDoubleType m_CodewordDistortion
void GenerateData() override
ImageKmeansModelEstimator Self
CodebookMatrixOfDoubleType GetKmeansResults(void)
void EstimateKmeansModelParameters()
vnl_matrix< double > CodebookMatrixOfDoubleType
~ImageKmeansModelEstimator()
Control indentation during Print() invocation.
TInputImage::PixelType::VectorType InputImageVectorType
void operator=(const Self &) ITK_DELETE_FUNCTION
TInputImage::ConstPointer InputImageConstPointer
SizeValueType m_NumberOfCodewords
virtual void PrintSelf(std::ostream &os, Indent indent) const override
A multi-dimensional iterator templated over image type that walks a region of pixels.
CodebookMatrixOfDoubleType m_Centroid
int m_OutputNumberOfEmptyCells