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  -------------------------------------------------------------------------*/
56 #ifndef vtkPCAStatistics_h
57 #define vtkPCAStatistics_h
58 
59 #include "vtkFiltersStatisticsModule.h" // For export macro
61 
62 class vtkDoubleArray;
63 class vtkIdTypeArray;
64 
65 class VTKFILTERSSTATISTICS_EXPORT vtkPCAStatistics : public vtkMultiCorrelativeStatistics
66 {
67 public:
69  void PrintSelf( ostream& os, vtkIndent indent ) VTK_OVERRIDE;
70  static vtkPCAStatistics* New();
71 
76  {
77  NONE,
81  NUM_NORMALIZATION_SCHEMES
82  };
83 
88  {
92  NUM_BASIS_SCHEMES
93  };
94 
96 
118  vtkSetMacro(NormalizationScheme,int);
119  vtkGetMacro(NormalizationScheme,int);
120  virtual void SetNormalizationSchemeByName( const char* sname );
121  virtual const char* GetNormalizationSchemeName( int scheme );
123 
125 
149  virtual vtkTable* GetSpecifiedNormalization();
150  virtual void SetSpecifiedNormalization( vtkTable* );
152 
154 
162  void GetEigenvalues(int request, vtkDoubleArray*);
163  void GetEigenvalues(vtkDoubleArray*);
164  double GetEigenvalue(int request, int i);
165  double GetEigenvalue(int i);
167 
169 
179  void GetEigenvectors(int request, vtkDoubleArray* eigenvectors);
180  void GetEigenvectors(vtkDoubleArray* eigenvectors);
181  void GetEigenvector(int i, vtkDoubleArray* eigenvector);
182  void GetEigenvector(int request, int i, vtkDoubleArray* eigenvector);
184 
186 
213  vtkSetMacro(BasisScheme,int);
214  vtkGetMacro(BasisScheme,int);
215  virtual const char* GetBasisSchemeName( int schemeIndex );
216  virtual void SetBasisSchemeByName( const char* schemeName );
218 
220 
224  vtkSetMacro(FixedBasisSize,int);
225  vtkGetMacro(FixedBasisSize,int);
227 
229 
233  vtkSetClampMacro(FixedBasisEnergy,double,0.,1.);
234  vtkGetMacro(FixedBasisEnergy,double);
236 
242  bool SetParameter( const char* parameter,
243  int index,
244  vtkVariant value ) VTK_OVERRIDE;
245 
246 protected:
248  ~vtkPCAStatistics() VTK_OVERRIDE;
249 
255  int FillInputPortInformation( int port, vtkInformation* info ) VTK_OVERRIDE;
256 
260  void Derive( vtkMultiBlockDataSet* ) VTK_OVERRIDE;
261 
265  void Test( vtkTable*,
267  vtkTable* ) VTK_OVERRIDE;
268 
272  void Assess( vtkTable*,
273  vtkMultiBlockDataSet*,
274  vtkTable* ) VTK_OVERRIDE;
275 
280  virtual vtkDoubleArray* CalculatePValues(vtkIdTypeArray*, vtkDoubleArray*);
281 
285  void SelectAssessFunctor( vtkTable* inData,
286  vtkDataObject* inMeta,
287  vtkStringArray* rowNames,
288  AssessFunctor*& dfunc ) VTK_OVERRIDE;
289 
290  int NormalizationScheme;
291  int BasisScheme;
292  int FixedBasisSize;
293  double FixedBasisEnergy;
294 
295  static const char* BasisSchemeEnumNames[NUM_BASIS_SCHEMES + 1];
296  static const char* NormalizationSchemeEnumNames[NUM_NORMALIZATION_SCHEMES + 1];
297 
298 private:
299  vtkPCAStatistics( const vtkPCAStatistics& ) VTK_DELETE_FUNCTION;
300  void operator = ( const vtkPCAStatistics& ) VTK_DELETE_FUNCTION;
301 };
302 
303 #endif // vtkPCAStatistics_h
304 
Normalize cov(i,j) by sqrt(V(i)*V(j)) where V is supplied by the user.
NormalizationType
Methods by which the covariance matrix may be normalized.
Store vtkAlgorithm input/output information.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Tests instantiations of the vtkNew class template.
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:75
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:39
static vtkMultiCorrelativeStatistics * New()
ProjectionType
These are the enumeration values that SetBasisScheme() accepts and GetBasisScheme returns...
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
A class for multivariate principal component analysis.
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:68
virtual bool SetParameter(const char *parameter, int index, vtkVariant value)
A convenience method (in particular for access from other applications) to set parameter values of Le...
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.
general representation of visualization data
Definition: vtkDataObject.h:64
Use consecutive basis matrix entries whose energies sum to at least T.