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  -------------------------------------------------------------------------*/
53 #ifndef vtkPCAStatistics_h
54 #define vtkPCAStatistics_h
55 
56 #include "vtkFiltersStatisticsModule.h" // For export macro
58 
59 class vtkDoubleArray;
60 class vtkIdTypeArray;
61 
62 class VTKFILTERSSTATISTICS_EXPORT vtkPCAStatistics : public vtkMultiCorrelativeStatistics
63 {
64 public:
66  void PrintSelf( ostream& os, vtkIndent indent ) VTK_OVERRIDE;
67  static vtkPCAStatistics* New();
68 
73  {
74  NONE,
78  NUM_NORMALIZATION_SCHEMES
79  };
80 
85  {
89  NUM_BASIS_SCHEMES
90  };
91 
93 
115  vtkSetMacro(NormalizationScheme,int);
116  vtkGetMacro(NormalizationScheme,int);
117  virtual void SetNormalizationSchemeByName( const char* sname );
118  virtual const char* GetNormalizationSchemeName( int scheme );
120 
122 
146  virtual vtkTable* GetSpecifiedNormalization();
147  virtual void SetSpecifiedNormalization( vtkTable* );
149 
151 
159  void GetEigenvalues(int request, vtkDoubleArray*);
160  void GetEigenvalues(vtkDoubleArray*);
161  double GetEigenvalue(int request, int i);
162  double GetEigenvalue(int i);
164 
166 
176  void GetEigenvectors(int request, vtkDoubleArray* eigenvectors);
177  void GetEigenvectors(vtkDoubleArray* eigenvectors);
178  void GetEigenvector(int i, vtkDoubleArray* eigenvector);
179  void GetEigenvector(int request, int i, vtkDoubleArray* eigenvector);
181 
183 
210  vtkSetMacro(BasisScheme,int);
211  vtkGetMacro(BasisScheme,int);
212  virtual const char* GetBasisSchemeName( int schemeIndex );
213  virtual void SetBasisSchemeByName( const char* schemeName );
215 
217 
221  vtkSetMacro(FixedBasisSize,int);
222  vtkGetMacro(FixedBasisSize,int);
224 
226 
230  vtkSetClampMacro(FixedBasisEnergy,double,0.,1.);
231  vtkGetMacro(FixedBasisEnergy,double);
233 
239  bool SetParameter( const char* parameter,
240  int index,
241  vtkVariant value ) VTK_OVERRIDE;
242 
243 protected:
245  ~vtkPCAStatistics() VTK_OVERRIDE;
246 
252  int FillInputPortInformation( int port, vtkInformation* info ) VTK_OVERRIDE;
253 
257  void Derive( vtkMultiBlockDataSet* ) VTK_OVERRIDE;
258 
262  void Test( vtkTable*,
264  vtkTable* ) VTK_OVERRIDE;
265 
269  void Assess( vtkTable*,
271  vtkTable* ) VTK_OVERRIDE;
272 
277  virtual vtkDoubleArray* CalculatePValues(vtkIdTypeArray*, vtkDoubleArray*);
278 
282  void SelectAssessFunctor( vtkTable* inData,
283  vtkDataObject* inMeta,
284  vtkStringArray* rowNames,
285  AssessFunctor*& dfunc ) VTK_OVERRIDE;
286 
287  int NormalizationScheme;
288  int BasisScheme;
289  int FixedBasisSize;
290  double FixedBasisEnergy;
291 
292  static const char* BasisSchemeEnumNames[NUM_BASIS_SCHEMES + 1];
293  static const char* NormalizationSchemeEnumNames[NUM_NORMALIZATION_SCHEMES + 1];
294 
295 private:
296  vtkPCAStatistics( const vtkPCAStatistics& ) VTK_DELETE_FUNCTION;
297  void operator = ( const vtkPCAStatistics& ) VTK_DELETE_FUNCTION;
298 };
299 
300 #endif // vtkPCAStatistics_h
301 
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:69
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:33
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:62
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:58
Use consecutive basis matrix entries whose energies sum to at least T.