Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class 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 =========================================================================*/
00057 #ifndef __vtkPCAAnalysisFilter_h
00058 #define __vtkPCAAnalysisFilter_h
00059 
00060 #include "vtkSource.h"
00061 
00062 class vtkFloatArray;
00063 class vtkPointSet;
00064 
00065 class VTK_HYBRID_EXPORT vtkPCAAnalysisFilter : public vtkSource
00066 {
00067  public:
00068   vtkTypeRevisionMacro(vtkPCAAnalysisFilter,vtkSource);
00069   
00071   void PrintSelf(ostream& os, vtkIndent indent);
00072   
00074   static vtkPCAAnalysisFilter *New();
00075 
00077 
00078   vtkGetObjectMacro(Evals, vtkFloatArray);
00080   
00082   void SetNumberOfInputs(int n);
00083   
00086   void SetInput(int idx,vtkPointSet* p);
00087   
00090   vtkPointSet* GetOutput(int idx);
00091 
00098   void GetParameterisedShape(vtkFloatArray *b, vtkPointSet* shape);
00099 
00105   void GetShapeParameters(vtkPointSet *shape, vtkFloatArray *b, int bsize);
00106 
00109   vtkPointSet* GetInput(int idx);
00110 
00113   int GetModesRequiredFor(float proportion);
00114 
00115 protected:
00116   vtkPCAAnalysisFilter();
00117   ~vtkPCAAnalysisFilter();
00118 
00120   void Execute();
00121 
00122 private:
00123   vtkPCAAnalysisFilter(const vtkPCAAnalysisFilter&);  // Not implemented.
00124   void operator=(const vtkPCAAnalysisFilter&);  // Not implemented.
00125 
00126   // Eigenvalues
00127   vtkFloatArray *Evals;
00128 
00129   // Matrix where each column is an eigenvector
00130   double **evecMat2;
00131 
00132   // The mean shape in a vector
00133   double *meanshape;
00134 };
00135 
00136 #endif
00137 
00138