VTK
vtkPCAStatistics.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3 Program: Visualization Toolkit
4 Module: vtkPCAStatistics.h
5 
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 /*-------------------------------------------------------------------------
16  Copyright 2010 Sandia Corporation.
17  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
18  the U.S. Government retains certain rights in this software.
19  -------------------------------------------------------------------------*/
55 #ifndef vtkPCAStatistics_h
56 #define vtkPCAStatistics_h
57 
58 #include "vtkFiltersStatisticsModule.h" // For export macro
60 
61 class vtkDoubleArray;
62 class vtkIdTypeArray;
63 
65 {
66 public:
68  virtual void PrintSelf( ostream& os, vtkIndent indent );
69  static vtkPCAStatistics* New();
70 
71  //BTX
73 
75  {
76  NONE,
80  NUM_NORMALIZATION_SCHEMES
81  };
83 
85 
88  {
92  NUM_BASIS_SCHEMES
93  };
94  //ETX
96 
98 
116  vtkSetMacro(NormalizationScheme,int);
117  vtkGetMacro(NormalizationScheme,int);
118  virtual void SetNormalizationSchemeByName( const char* sname );
119  virtual const char* GetNormalizationSchemeName( int scheme );
121 
123 
143  virtual vtkTable* GetSpecifiedNormalization();
144  virtual void SetSpecifiedNormalization( vtkTable* );
146 
148 
154  void GetEigenvalues(int request, vtkDoubleArray*);
155  void GetEigenvalues(vtkDoubleArray*);
156  double GetEigenvalue(int request, int i);
157  double GetEigenvalue(int i);
159 
161 
169  void GetEigenvectors(int request, vtkDoubleArray* eigenvectors);
170  void GetEigenvectors(vtkDoubleArray* eigenvectors);
171  void GetEigenvector(int i, vtkDoubleArray* eigenvector);
172  void GetEigenvector(int request, int i, vtkDoubleArray* eigenvector);
174 
176 
196  vtkSetMacro(BasisScheme,int);
197  vtkGetMacro(BasisScheme,int);
198  virtual const char* GetBasisSchemeName( int schemeIndex );
199  virtual void SetBasisSchemeByName( const char* schemeName );
201 
203 
206  vtkSetMacro(FixedBasisSize,int);
207  vtkGetMacro(FixedBasisSize,int);
209 
211 
215  vtkSetClampMacro(FixedBasisEnergy,double,0.,1.);
216  vtkGetMacro(FixedBasisEnergy,double);
218 
220 
223  virtual bool SetParameter( const char* parameter,
224  int index,
225  vtkVariant value );
227 
228 protected:
230  ~vtkPCAStatistics();
231 
235  virtual int FillInputPortInformation( int port, vtkInformation* info );
236 
238  virtual void Derive( vtkMultiBlockDataSet* );
239 
241 
242  virtual void Test( vtkTable*,
244  vtkTable* );
246 
248 
249  virtual void Assess( vtkTable*,
251  vtkTable* );
252  //BTX
254 
256  virtual vtkDoubleArray* CalculatePValues(vtkIdTypeArray*, vtkDoubleArray*);
257 
258  //BTX
260 
261  virtual void SelectAssessFunctor( vtkTable* inData,
262  vtkDataObject* inMeta,
263  vtkStringArray* rowNames,
264  AssessFunctor*& dfunc );
265  //ETX
267 
272 
273  //BTX
274  static const char* BasisSchemeEnumNames[NUM_BASIS_SCHEMES + 1];
275  static const char* NormalizationSchemeEnumNames[NUM_NORMALIZATION_SCHEMES + 1];
276  //ETX
277 
278 private:
279  vtkPCAStatistics( const vtkPCAStatistics& ); // Not implemented
280  void operator = ( const vtkPCAStatistics& ); // Not implemented
281 };
282 
283 #endif // vtkPCAStatistics_h
284 
virtual void PrintSelf(ostream &os, vtkIndent indent)
Normalize cov(i,j) by sqrt(V(i)*V(j)) where V is supplied by the user.
Store vtkAlgorithm input/output information.
a vtkAbstractArray subclass for strings
dynamic, self-adjusting array of vtkIdType
Normalize cov(i,j) by V(i,j) where V is supplied by the user.
A atomic type representing the union of many types.
Definition: vtkVariant.h:78
dynamic, self-adjusting array of double
A class for multivariate linear correlation.
Use the first N entries in the basis matrix.
Use all entries in the basis matrix.
a simple class to control print indentation
Definition: vtkIndent.h:38
virtual void SelectAssessFunctor(vtkTable *inData, vtkDataObject *inMeta, vtkStringArray *rowNames, AssessFunctor *&dfunc)
static vtkMultiCorrelativeStatistics * New()
virtual void Assess(vtkTable *, vtkMultiBlockDataSet *, vtkTable *)
virtual int FillInputPortInformation(int port, vtkInformation *info)
A class for multivariate principal component analysis.
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:67
virtual bool SetParameter(const char *parameter, int index, vtkVariant value)
Normalize cov(i,j) by sqrt(cov(i,i)*cov(j,j)).
Composite dataset that organizes datasets into blocks.
The covariance matrix should be used as computed.
#define VTKFILTERSSTATISTICS_EXPORT
virtual void Test(vtkTable *, vtkMultiBlockDataSet *, vtkTable *)
general representation of visualization data
Definition: vtkDataObject.h:64
virtual void Derive(vtkMultiBlockDataSet *)
Use consecutive basis matrix entries whose energies sum to at least T.