VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkStatisticsAlgorithm.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 =========================================================================*/ 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 -------------------------------------------------------------------------*/ 00047 #ifndef __vtkStatisticsAlgorithm_h 00048 #define __vtkStatisticsAlgorithm_h 00049 00050 #include "vtkTableAlgorithm.h" 00051 00052 class vtkStdString; 00053 class vtkStringArray; 00054 class vtkVariantArray; 00055 class vtkStatisticsAlgorithmPrivate; 00056 00057 class VTK_INFOVIS_EXPORT vtkStatisticsAlgorithm : public vtkTableAlgorithm 00058 { 00059 public: 00060 vtkTypeRevisionMacro(vtkStatisticsAlgorithm, vtkTableAlgorithm); 00061 void PrintSelf(ostream& os, vtkIndent indent); 00062 00067 virtual void SetInputStatisticsConnection( vtkAlgorithmOutput* ); 00068 00070 00071 vtkSetMacro( NumberOfVariables, vtkIdType ); 00073 00075 00076 vtkGetMacro( NumberOfVariables, vtkIdType ); 00078 00080 00081 vtkSetMacro( SampleSize, vtkIdType ); 00083 00085 00086 vtkGetMacro( SampleSize, vtkIdType ); 00088 00090 00091 vtkSetMacro( Learn, bool ); 00093 00095 00096 vtkGetMacro( Learn, bool ); 00098 00100 00101 vtkSetMacro( Derive, bool ); 00103 00105 00106 vtkGetMacro( Derive, bool ); 00108 00110 00111 vtkSetMacro( Assess, bool ); 00113 00115 00116 vtkGetMacro( Assess, bool ); 00118 00128 virtual int IsFullModelDerived() {return this->FullWasDerived;} 00129 00130 //BTX 00132 void SetAssessParameter( vtkIdType id, vtkStdString name ); 00133 00135 vtkStdString GetAssessParameter( vtkIdType id ); 00136 00138 00139 class AssessFunctor { 00140 public: 00141 virtual void operator() ( vtkVariantArray*, 00142 vtkIdType ) = 0; 00143 virtual ~AssessFunctor() { } 00144 }; 00146 00148 00149 virtual void SelectAssessFunctor( vtkTable* outData, 00150 vtkDataObject* inMeta, 00151 vtkStringArray* rowNames, 00152 AssessFunctor*& dfunc ) = 0; 00154 //ETX 00155 00167 virtual void SetColumnStatus( const char* namCol, int status ); 00168 00171 virtual void ResetAllColumnStates(); 00172 00176 virtual int RequestSelectedColumns(); 00177 00179 virtual void ResetRequests(); 00180 00181 protected: 00182 vtkStatisticsAlgorithm(); 00183 ~vtkStatisticsAlgorithm(); 00184 00185 virtual int FillInputPortInformation( int port, vtkInformation* info ); 00186 virtual int FillOutputPortInformation( int port, vtkInformation* info ); 00187 00188 virtual int RequestData( 00189 vtkInformation*, 00190 vtkInformationVector**, 00191 vtkInformationVector* ); 00192 00194 00195 virtual void ExecuteLearn( vtkTable*, 00196 vtkDataObject* ) = 0; 00197 virtual void ExecuteDerive( vtkDataObject* ) = 0; 00198 virtual void ExecuteAssess( vtkTable*, 00199 vtkDataObject*, 00200 vtkTable*, 00201 vtkDataObject* ) = 0; 00203 00204 vtkIdType NumberOfVariables; 00205 vtkIdType SampleSize; 00206 bool Learn; 00207 bool Derive; 00208 bool Assess; 00209 bool FullWasDerived; 00210 vtkStringArray* AssessParameters; 00211 vtkStringArray* AssessNames; 00212 vtkStatisticsAlgorithmPrivate* Internals; 00213 00214 private: 00215 vtkStatisticsAlgorithm(const vtkStatisticsAlgorithm&); // Not implemented 00216 void operator=(const vtkStatisticsAlgorithm&); // Not implemented 00217 }; 00218 00219 #endif 00220