Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

Hybrid/vtkPCAAnalysisFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003 Program:   Visualization Toolkit
00004 Module:    $RCSfile: vtkPCAAnalysisFilter.h,v $
00005 Language:  C++
00006 
00007 Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 
00008 All rights reserved.
00009 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00010 
00011 This software is distributed WITHOUT ANY WARRANTY; without even 
00012 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00013 PURPOSE.  See the above copyright notice for more information.
00014 
00015 =========================================================================*/
00068 #ifndef __vtkPCAAnalysisFilter_h
00069 #define __vtkPCAAnalysisFilter_h
00070 
00071 #include "vtkSource.h"
00072 
00073 class vtkFloatArray;
00074 class vtkPointSet;
00075 
00076 class VTK_HYBRID_EXPORT vtkPCAAnalysisFilter : public vtkSource
00077 {
00078  public:
00079   vtkTypeRevisionMacro(vtkPCAAnalysisFilter,vtkSource);
00080   
00082   void PrintSelf(ostream& os, vtkIndent indent);
00083   
00085   static vtkPCAAnalysisFilter *New();
00086 
00088 
00089   vtkGetObjectMacro(Evals, vtkFloatArray);
00091   
00093   void SetNumberOfInputs(int n);
00094   
00097   void SetInput(int idx,vtkPointSet* p);
00098   
00101   vtkPointSet* GetOutput(int idx);
00102 
00109   void GetParameterisedShape(vtkFloatArray *b, vtkPointSet* shape);
00110 
00116   void GetShapeParameters(vtkPointSet *shape, vtkFloatArray *b, int bsize);
00117 
00120   vtkPointSet* GetInput(int idx);
00121 
00124   int GetModesRequiredFor(float proportion);
00125 
00126 protected:
00127   vtkPCAAnalysisFilter();
00128   ~vtkPCAAnalysisFilter();
00129 
00131   void Execute();
00132 
00133 private:
00134   vtkPCAAnalysisFilter(const vtkPCAAnalysisFilter&);  // Not implemented.
00135   void operator=(const vtkPCAAnalysisFilter&);  // Not implemented.
00136 
00137   // Eigenvalues
00138   vtkFloatArray *Evals;
00139 
00140   // Matrix where each column is an eigenvector
00141   double **evecMat2;
00142 
00143   // The mean shape in a vector
00144   double *meanshape;
00145 };
00146 
00147 #endif
00148 
00149