VTK
vtkStatisticsAlgorithm.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3 Program: Visualization Toolkit
4 Module: vtkStatisticsAlgorithm.h
5 
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 /*-------------------------------------------------------------------------
16  Copyright 2011 Sandia Corporation.
17  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
18  the U.S. Government retains certain rights in this software.
19  -------------------------------------------------------------------------*/
61 #ifndef __vtkStatisticsAlgorithm_h
62 #define __vtkStatisticsAlgorithm_h
63 
64 #include "vtkFiltersStatisticsModule.h" // For export macro
65 #include "vtkTableAlgorithm.h"
66 
69 class vtkStdString;
70 class vtkStringArray;
71 class vtkVariant;
72 class vtkVariantArray;
74 
76 {
77 public:
79  void PrintSelf(ostream& os, vtkIndent indent);
80 
81 //BTX
83 
85  {
86  INPUT_DATA = 0,
87  LEARN_PARAMETERS = 1,
88  INPUT_MODEL = 2
89  };
91 
93 
95  {
96  OUTPUT_DATA = 0,
97  OUTPUT_MODEL = 1,
98 #ifndef VTK_LEGACY_REMOVE
99  ASSESSMENT = 2,
100 #endif
101  OUTPUT_TEST = 2
102  };
103 //ETX
105 
107 
113 
115 
121 
123 
129 
131 
133  virtual void SetInputModel( vtkDataObject* model )
136 
138 
139  vtkSetMacro( LearnOption, bool );
140  vtkGetMacro( LearnOption, bool );
142 
144 
145  vtkSetMacro( DeriveOption, bool );
146  vtkGetMacro( DeriveOption, bool );
148 
150 
151  vtkSetMacro( AssessOption, bool );
152  vtkGetMacro( AssessOption, bool );
154 
156 
157  vtkSetMacro( TestOption, bool );
158  vtkGetMacro( TestOption, bool );
160 
162 
163  vtkSetMacro( NumberOfPrimaryTables, vtkIdType );
164  vtkGetMacro( NumberOfPrimaryTables, vtkIdType );
166 
168 
169  virtual void SetAssessNames( vtkStringArray* );
170  vtkGetObjectMacro(AssessNames,vtkStringArray);
172 
173 //BTX
175 
177  public:
178  virtual void operator() ( vtkVariantArray*,
179  vtkIdType ) = 0;
180  virtual ~AssessFunctor() { }
181  };
182 //ETX
184 
196  virtual void SetColumnStatus( const char* namCol, int status );
197 
200  virtual void ResetAllColumnStates();
201 
205  virtual int RequestSelectedColumns();
206 
208  virtual void ResetRequests();
209 
215  virtual vtkIdType GetNumberOfRequests();
216 
218  virtual vtkIdType GetNumberOfColumnsForRequest( vtkIdType request );
219 
221 
230  virtual const char* GetColumnForRequest( vtkIdType r, vtkIdType c );
231  //BTX
232  virtual int GetColumnForRequest( vtkIdType r, vtkIdType c, vtkStdString& columnName );
233  //ETX
235 
241  void AddColumn( const char* namCol );
242 
250  void AddColumnPair( const char* namColX, const char* namColY );
251 
253 
258  virtual bool SetParameter( const char* parameter,
259  int index,
260  vtkVariant value );
262 
264 
265  virtual void Aggregate( vtkDataObjectCollection*,
266  vtkMultiBlockDataSet* ) = 0;
268 
269 protected:
272 
273  virtual int FillInputPortInformation( int port, vtkInformation* info );
274  virtual int FillOutputPortInformation( int port, vtkInformation* info );
275 
276  virtual int RequestData(
280 
282 
284  virtual void Learn( vtkTable*,
285  vtkTable*,
286  vtkMultiBlockDataSet* ) = 0;
288 
290  virtual void Derive( vtkMultiBlockDataSet* ) = 0;
291 
293 
294  virtual void Assess( vtkTable*,
296  vtkTable* ) = 0;
298 
300 
302  void Assess( vtkTable*,
304  vtkTable*,
305  int );
307 
309 
310  virtual void Test( vtkTable*,
312  vtkTable* ) = 0;
314 
315  //BTX
317 
318  virtual void SelectAssessFunctor( vtkTable* outData,
319  vtkDataObject* inMeta,
320  vtkStringArray* rowNames,
321  AssessFunctor*& dfunc ) = 0;
322  //ETX
324 
332 
333 private:
334  vtkStatisticsAlgorithm(const vtkStatisticsAlgorithm&); // Not implemented
335  void operator=(const vtkStatisticsAlgorithm&); // Not implemented
336 };
337 
338 #endif
virtual int FillOutputPortInformation(int port, vtkInformation *info)
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:46
void PrintSelf(ostream &os, vtkIndent indent)
GLenum const GLfloat * params
Definition: vtkgl.h:11333
vtkStatisticsAlgorithmPrivate * Internals
An array holding vtkVariants.
GLuint index
Definition: vtkgl.h:11983
Store vtkAlgorithm input/output information.
maintain an unordered list of data objects
#define vtkGetMacro(name, type)
Definition: vtkSetGet.h:83
virtual void SetInputModelConnection(vtkAlgorithmOutput *model)
a vtkAbstractArray subclass for strings
GLsizei const GLfloat * value
Definition: vtkgl.h:12021
int vtkIdType
Definition: vtkType.h:268
GLdouble GLdouble GLdouble r
Definition: vtkgl.h:11610
Port 1 is for learn parameters (initial guesses, etc.)
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:619
A atomic type representing the union of many types.
Definition: vtkVariant.h:78
Proxy object to connect input/output ports.
Base class for statistics algorithms.
virtual void SetLearnOptionParameterConnection(vtkAlgorithmOutput *params)
a simple class to control print indentation
Definition: vtkIndent.h:38
const GLubyte * c
Definition: vtkgl.h:15720
virtual void SetInputConnection(int port, vtkAlgorithmOutput *input)
virtual int FillInputPortInformation(int port, vtkInformation *info)
#define vtkGetObjectMacro(name, type)
Definition: vtkSetGet.h:222
void SetInputData(vtkDataObject *obj)
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:67
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Composite dataset that organizes datasets into blocks.
Superclass for algorithms that produce only vtkTables as output.
Store zero or more vtkInformation instances.
virtual void SetInputModel(vtkDataObject *model)
#define VTKFILTERSSTATISTICS_EXPORT
virtual void SetLearnOptionParameters(vtkDataObject *params)
general representation of visualization data
Definition: vtkDataObject.h:64
Port 2 is for a priori models.
#define vtkSetMacro(name, type)
Definition: vtkSetGet.h:69