VTK
vtkPCAAnalysisFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPCAAnalysisFilter.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 =========================================================================*/
53 #ifndef __vtkPCAAnalysisFilter_h
54 #define __vtkPCAAnalysisFilter_h
55 
56 #include "vtkPointSetAlgorithm.h"
57 
58 class vtkFloatArray;
59 class vtkPointSet;
60 
62 {
63  public:
65 
67  void PrintSelf(ostream& os, vtkIndent indent);
68 
70  static vtkPCAAnalysisFilter *New();
71 
73 
74  vtkGetObjectMacro(Evals, vtkFloatArray);
76 
78  void SetNumberOfInputs(int n);
79 
81 
83  void SetInput(int idx, vtkPointSet* p);
84  void SetInput(int idx, vtkDataObject* input);
86 
89  vtkPointSet* GetInput(int idx);
90 
97  void GetParameterisedShape(vtkFloatArray *b, vtkPointSet* shape);
98 
104  void GetShapeParameters(vtkPointSet *shape, vtkFloatArray *b, int bsize);
105 
108  int GetModesRequiredFor(double proportion);
109 
110 protected:
113 
115 
119 
120 private:
121  vtkPCAAnalysisFilter(const vtkPCAAnalysisFilter&); // Not implemented.
122  void operator=(const vtkPCAAnalysisFilter&); // Not implemented.
123 
124  // Eigenvalues
125  vtkFloatArray *Evals;
126 
127  // Matrix where each column is an eigenvector
128  double **evecMat2;
129 
130  // The mean shape in a vector
131  double *meanshape;
132 };
133 
134 #endif
135 
136 
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
Store vtkAlgorithm input/output information.
void SetInput(vtkDataObject *)
dynamic, self-adjusting array of float
Definition: vtkFloatArray.h:42
vtkDataObject * GetInput()
abstract class for specifying dataset behavior
Definition: vtkPointSet.h:40
Performs principal component analysis of a set of aligned pointsets.
a simple class to control print indentation
Definition: vtkIndent.h:37
Superclass for algorithms that produce output of the same type as input.
static vtkPointSetAlgorithm * New()
void PrintSelf(ostream &os, vtkIndent indent)
Store zero or more vtkInformation instances.
virtual int FillInputPortInformation(int port, vtkInformation *info)
#define VTK_HYBRID_EXPORT
general representation of visualization data
Definition: vtkDataObject.h:70