VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkPCAAnalysisFilter.h 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00052 #ifndef __vtkPCAAnalysisFilter_h 00053 #define __vtkPCAAnalysisFilter_h 00054 00055 #include "vtkFiltersHybridModule.h" // For export macro 00056 #include "vtkMultiBlockDataSetAlgorithm.h" 00057 00058 class vtkFloatArray; 00059 class vtkPointSet; 00060 00061 class VTKFILTERSHYBRID_EXPORT vtkPCAAnalysisFilter : public vtkMultiBlockDataSetAlgorithm 00062 { 00063 public: 00064 vtkTypeMacro(vtkPCAAnalysisFilter,vtkMultiBlockDataSetAlgorithm); 00065 00067 void PrintSelf(ostream& os, vtkIndent indent); 00068 00070 static vtkPCAAnalysisFilter *New(); 00071 00073 00074 vtkGetObjectMacro(Evals, vtkFloatArray); 00076 00083 void GetParameterisedShape(vtkFloatArray *b, vtkPointSet* shape); 00084 00090 void GetShapeParameters(vtkPointSet *shape, vtkFloatArray *b, int bsize); 00091 00094 int GetModesRequiredFor(double proportion); 00095 00096 protected: 00097 vtkPCAAnalysisFilter(); 00098 ~vtkPCAAnalysisFilter(); 00099 00101 virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00102 00103 private: 00104 vtkPCAAnalysisFilter(const vtkPCAAnalysisFilter&); // Not implemented. 00105 void operator=(const vtkPCAAnalysisFilter&); // Not implemented. 00106 00107 // Eigenvalues 00108 vtkFloatArray *Evals; 00109 00110 // Matrix where each column is an eigenvector 00111 double **evecMat2; 00112 00113 // The mean shape in a vector 00114 double *meanshape; 00115 }; 00116 00117 #endif 00118 00119