00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00050 #ifndef __vtkPCAStatistics_h
00051 #define __vtkPCAStatistics_h
00052
00053 #include "vtkMultiCorrelativeStatistics.h"
00054
00055 class vtkDoubleArray;
00056
00057 class VTK_INFOVIS_EXPORT vtkPCAStatistics : public vtkMultiCorrelativeStatistics
00058 {
00059 public:
00060 vtkTypeMacro(vtkPCAStatistics,vtkMultiCorrelativeStatistics);
00061 virtual void PrintSelf( ostream& os, vtkIndent indent );
00062 static vtkPCAStatistics* New();
00063
00064
00066
00067 enum NormalizationType
00068 {
00069 NONE,
00070 TRIANGLE_SPECIFIED,
00071 DIAGONAL_SPECIFIED,
00072 DIAGONAL_VARIANCE,
00073 NUM_NORMALIZATION_SCHEMES
00074 };
00076
00078
00080 enum ProjectionType
00081 {
00082 FULL_BASIS,
00083 FIXED_BASIS_SIZE,
00084 FIXED_BASIS_ENERGY,
00085 NUM_BASIS_SCHEMES
00086 };
00087
00089
00091
00109 vtkSetMacro(NormalizationScheme,int);
00110 vtkGetMacro(NormalizationScheme,int);
00111 virtual void SetNormalizationSchemeByName( const char* sname );
00112 virtual const char* GetNormalizationSchemeName( int scheme );
00114
00116
00134 virtual vtkTable* GetSpecifiedNormalization();
00135 virtual void SetSpecifiedNormalization( vtkTable* );
00137
00139
00144 void GetEigenvalues(int request, vtkDoubleArray*);
00145 void GetEigenvalues(vtkDoubleArray*);
00146 double GetEigenvalue(int request, int i);
00147 double GetEigenvalue(int i);
00149
00150
00152
00157 void GetEigenvectors(int request, vtkDoubleArray* eigenvectors);
00158 void GetEigenvectors(vtkDoubleArray* eigenvectors);
00159 void GetEigenvector(int i, vtkDoubleArray* eigenvector);
00160 void GetEigenvector(int request, int i, vtkDoubleArray* eigenvector);
00162
00164
00184 vtkSetMacro(BasisScheme,int);
00185 vtkGetMacro(BasisScheme,int);
00186 virtual const char* GetBasisSchemeName( int schemeIndex );
00187 virtual void SetBasisSchemeByName( const char* schemeName );
00189
00191
00194 vtkSetMacro(FixedBasisSize,int);
00195 vtkGetMacro(FixedBasisSize,int);
00197
00199
00203 vtkSetClampMacro(FixedBasisEnergy,double,0.,1.);
00204 vtkGetMacro(FixedBasisEnergy,double);
00206
00208
00211 virtual bool SetParameter( const char* parameter,
00212 int index,
00213 vtkVariant value );
00215
00216 protected:
00217 vtkPCAStatistics();
00218 ~vtkPCAStatistics();
00219
00223 virtual int FillInputPortInformation( int port, vtkInformation* info );
00224
00226 virtual void Derive( vtkMultiBlockDataSet* inMeta );
00227
00229
00230 virtual void Test( vtkTable*,
00231 vtkMultiBlockDataSet*,
00232 vtkTable* );
00234
00236
00237 virtual void Assess( vtkTable*,
00238 vtkMultiBlockDataSet*,
00239 vtkTable* );
00241
00242
00244
00245 virtual void SelectAssessFunctor( vtkTable* inData,
00246 vtkDataObject* inMeta,
00247 vtkStringArray* rowNames,
00248 AssessFunctor*& dfunc );
00249
00251
00252 int NormalizationScheme;
00253 int BasisScheme;
00254 int FixedBasisSize;
00255 double FixedBasisEnergy;
00256
00257
00258 static const char* BasisSchemeEnumNames[NUM_BASIS_SCHEMES + 1];
00259 static const char* NormalizationSchemeEnumNames[NUM_NORMALIZATION_SCHEMES + 1];
00260
00261
00262 private:
00263 vtkPCAStatistics( const vtkPCAStatistics& );
00264 void operator = ( const vtkPCAStatistics& );
00265 };
00266
00267 #endif // __vtkPCAStatistics_h
00268