4 #include <vnl/vnl_matrix.h> 5 #include <vnl/vnl_diag_matrix.h> 7 #include <itkSymmetricEigenAnalysis.h> 19 template <
class ScalarType>
28 typedef itk::SymmetricEigenAnalysis <MatrixType, vnl_diag_matrix<ScalarType>, MatrixType>
EigenAnalysisType;
56 VectorType &
GetCentroid(
unsigned int i) {
return m_Centroids[i];}
60 std::vector <VectorType> m_ClassesMembership;
61 std::vector <VectorType> m_Centroids;
62 std::vector <VectorType> m_SpectralVectors;
63 MatrixType m_InputData;
64 VectorType m_DataWeights;
66 unsigned int m_NbClass;
68 CMeansAverageType m_CMeansAverageType;
69 CMeansFilterType m_MainFilter;
73 unsigned int m_MaxIterations;
74 double m_RelStopCriterion;
77 double m_SigmaWeighting;
81 std::vector <double> m_DValues;
83 EigenAnalysisType m_EigenAnalyzer;
84 vnl_diag_matrix<ScalarType> m_EigVals;
void InitializeSigmaFromDistances()
void SetDataWeights(VectorType &val)
std::vector< ScalarType > VectorType
Provides an implementation of spectral clustering, as proposed in A.Y. Ng, M.I. Jordan and Y...
void SetRelStopCriterion(double rC)
vnl_matrix< ScalarType > MatrixType
void SetCMeansAverageType(CMeansAverageType val)
void SetSigmaWeighting(double sigma)
void SetInputData(MatrixType &data)
Input data: matrix of squared distances.
VectorType & GetClassesMembership(unsigned int i)
anima::FuzzyCMeansFilter< ScalarType > CMeansFilterType
void ComputeSpectralVectors()
void SetVerbose(bool verb)
double ComputeClustersSpreading()
SpectralClusteringFilter()
itk::SymmetricEigenAnalysis< MatrixType, vnl_diag_matrix< ScalarType >, MatrixType > EigenAnalysisType
VectorType & GetCentroid(unsigned int i)
void SetMValue(double mV)
void SetMaxIterations(unsigned int mIt)
VectorType & GetSpectralVector(unsigned int i)
virtual ~SpectralClusteringFilter()
CMeansFilterType::CentroidAverageType CMeansAverageType
void SetNbClass(unsigned int nbC)
std::vector< unsigned int > GetClassMembers(unsigned int i)