Main Page | Directories | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

vtkPCAAnalysisFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkPCAAnalysisFilter.h,v $
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 =========================================================================*/
00064 #ifndef __vtkPCAAnalysisFilter_h
00065 #define __vtkPCAAnalysisFilter_h
00066 
00067 #include "vtkSource.h"
00068 
00069 class vtkFloatArray;
00070 class vtkPointSet;
00071 
00072 class VTK_HYBRID_EXPORT vtkPCAAnalysisFilter : public vtkSource
00073 {
00074  public:
00075   vtkTypeRevisionMacro(vtkPCAAnalysisFilter,vtkSource);
00076   
00078   void PrintSelf(ostream& os, vtkIndent indent);
00079   
00081   static vtkPCAAnalysisFilter *New();
00082 
00084 
00085   vtkGetObjectMacro(Evals, vtkFloatArray);
00087   
00089   void SetNumberOfInputs(int n);
00090   
00093   void SetInput(int idx,vtkPointSet* p);
00094   
00097   vtkPointSet* GetOutput(int idx);
00098 
00105   void GetParameterisedShape(vtkFloatArray *b, vtkPointSet* shape);
00106 
00112   void GetShapeParameters(vtkPointSet *shape, vtkFloatArray *b, int bsize);
00113 
00116   vtkPointSet* GetInput(int idx);
00117 
00120   int GetModesRequiredFor(double proportion);
00121 
00122 protected:
00123   vtkPCAAnalysisFilter();
00124   ~vtkPCAAnalysisFilter();
00125 
00127   void Execute();
00128 
00129 private:
00130   vtkPCAAnalysisFilter(const vtkPCAAnalysisFilter&);  // Not implemented.
00131   void operator=(const vtkPCAAnalysisFilter&);  // Not implemented.
00132 
00133   // Eigenvalues
00134   vtkFloatArray *Evals;
00135 
00136   // Matrix where each column is an eigenvector
00137   double **evecMat2;
00138 
00139   // The mean shape in a vector
00140   double *meanshape;
00141 };
00142 
00143 #endif
00144 
00145