VTK
dox/Infovis/vtkPCAStatistics.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003 Program:   Visualization Toolkit
00004 Module:    vtkPCAStatistics.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 =========================================================================*/
00015 /*-------------------------------------------------------------------------
00016   Copyright 2008 Sandia Corporation.
00017   Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
00018   the U.S. Government retains certain rights in this software.
00019   -------------------------------------------------------------------------*/
00050 #ifndef __vtkPCAStatistics_h
00051 #define __vtkPCAStatistics_h
00052 
00053 #include "vtkMultiCorrelativeStatistics.h"
00054 
00055 class VTK_INFOVIS_EXPORT vtkPCAStatistics : public vtkMultiCorrelativeStatistics
00056 {
00057 public:
00058   vtkTypeMacro(vtkPCAStatistics,vtkMultiCorrelativeStatistics);
00059   virtual void PrintSelf( ostream& os, vtkIndent indent );
00060   static vtkPCAStatistics* New();
00061 
00062   //BTX
00064 
00065   enum NormalizationType
00066     {
00067     NONE,               
00068     TRIANGLE_SPECIFIED, 
00069     DIAGONAL_SPECIFIED, 
00070     DIAGONAL_VARIANCE,  
00071     NUM_NORMALIZATION_SCHEMES 
00072     };
00074 
00076 
00078   enum ProjectionType
00079     {
00080     FULL_BASIS,         
00081     FIXED_BASIS_SIZE,   
00082     FIXED_BASIS_ENERGY, 
00083     NUM_BASIS_SCHEMES   
00084     };
00085   //ETX
00087 
00089 
00107   vtkSetMacro(NormalizationScheme,int);
00108   vtkGetMacro(NormalizationScheme,int);
00109   virtual void SetNormalizationSchemeByName( const char* sname );
00110   virtual const char* GetNormalizationSchemeName( int scheme );
00112 
00114 
00132   virtual vtkTable* GetSpecifiedNormalization();
00133   virtual void SetSpecifiedNormalization( vtkTable* );
00135 
00137 
00157   vtkSetMacro(BasisScheme,int);
00158   vtkGetMacro(BasisScheme,int);
00159   virtual const char* GetBasisSchemeName( int schemeIndex );
00160   virtual void SetBasisSchemeByName( const char* schemeName );
00162 
00164 
00167   vtkSetMacro(FixedBasisSize,int);
00168   vtkGetMacro(FixedBasisSize,int);
00170 
00172 
00176   vtkSetClampMacro(FixedBasisEnergy,double,0.,1.);
00177   vtkGetMacro(FixedBasisEnergy,double);
00179 
00180 //BTX
00182 
00185   virtual bool SetParameter( const char* parameter,
00186                              int index,
00187                              vtkVariant value );
00189 //ETX
00190 
00191 protected:
00192   vtkPCAStatistics();
00193   ~vtkPCAStatistics();
00194 
00198   virtual int FillInputPortInformation( int port, vtkInformation* info );
00199 
00201   virtual void Derive( vtkDataObject* inMeta );
00202 
00204 
00205   virtual void Assess( vtkTable*, 
00206                        vtkDataObject*, 
00207                        vtkTable* );
00209 
00210   //BTX  
00212 
00213   virtual void SelectAssessFunctor( vtkTable* inData, 
00214                                     vtkDataObject* inMeta,
00215                                     vtkStringArray* rowNames,
00216                                     AssessFunctor*& dfunc );
00217   //ETX
00219 
00220   int NormalizationScheme;
00221   int BasisScheme;
00222   int FixedBasisSize;
00223   double FixedBasisEnergy;
00224 
00225   //BTX
00226   static const char* BasisSchemeEnumNames[NUM_BASIS_SCHEMES + 1];
00227   static const char* NormalizationSchemeEnumNames[NUM_NORMALIZATION_SCHEMES + 1];
00228   //ETX
00229 
00230 private:
00231   vtkPCAStatistics( const vtkPCAStatistics& ); // Not implemented
00232   void operator = ( const vtkPCAStatistics& );  // Not implemented
00233 };
00234 
00235 #endif // __vtkPCAStatistics_h
00236