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;
73 class vtkDoubleArray;
75 
77 {
78 public:
80  void PrintSelf(ostream& os, vtkIndent indent);
81 
82 //BTX
84 
86  {
87  INPUT_DATA = 0,
88  LEARN_PARAMETERS = 1,
89  INPUT_MODEL = 2
90  };
92 
94 
96  {
97  OUTPUT_DATA = 0,
98  OUTPUT_MODEL = 1,
99  OUTPUT_TEST = 2
100  };
101 //ETX
103 
105 
111 
113 
116  virtual void SetLearnOptionParameters( vtkDataObject* params )
119 
121 
127 
129 
131  virtual void SetInputModel( vtkDataObject* model )
134 
136 
137  vtkSetMacro( LearnOption, bool );
138  vtkGetMacro( LearnOption, bool );
140 
142 
143  vtkSetMacro( DeriveOption, bool );
144  vtkGetMacro( DeriveOption, bool );
146 
148 
149  vtkSetMacro( AssessOption, bool );
150  vtkGetMacro( AssessOption, bool );
152 
154 
155  vtkSetMacro( TestOption, bool );
156  vtkGetMacro( TestOption, bool );
158 
160 
161  vtkSetMacro( NumberOfPrimaryTables, vtkIdType );
162  vtkGetMacro( NumberOfPrimaryTables, vtkIdType );
164 
166 
167  virtual void SetAssessNames( vtkStringArray* );
168  vtkGetObjectMacro(AssessNames,vtkStringArray);
170 
171 //BTX
173 
175  public:
176  virtual void operator() ( vtkDoubleArray*,
177  vtkIdType ) = 0;
178  virtual ~AssessFunctor() { }
179  };
180 //ETX
182 
194  virtual void SetColumnStatus( const char* namCol, int status );
195 
198  virtual void ResetAllColumnStates();
199 
203  virtual int RequestSelectedColumns();
204 
206  virtual void ResetRequests();
207 
213  virtual vtkIdType GetNumberOfRequests();
214 
216  virtual vtkIdType GetNumberOfColumnsForRequest( vtkIdType request );
217 
219 
228  virtual const char* GetColumnForRequest( vtkIdType r, vtkIdType c );
229  //BTX
230  virtual int GetColumnForRequest( vtkIdType r, vtkIdType c, vtkStdString& columnName );
231  //ETX
233 
239  void AddColumn( const char* namCol );
240 
248  void AddColumnPair( const char* namColX, const char* namColY );
249 
251 
256  virtual bool SetParameter( const char* parameter,
257  int index,
258  vtkVariant value );
260 
262 
263  virtual void Aggregate( vtkDataObjectCollection*,
264  vtkMultiBlockDataSet* ) = 0;
266 
267 protected:
270 
271  virtual int FillInputPortInformation( int port, vtkInformation* info );
272  virtual int FillOutputPortInformation( int port, vtkInformation* info );
273 
274  virtual int RequestData(
278 
280 
282  virtual void Learn( vtkTable*,
283  vtkTable*,
284  vtkMultiBlockDataSet* ) = 0;
286 
288  virtual void Derive( vtkMultiBlockDataSet* ) = 0;
289 
291 
292  virtual void Assess( vtkTable*,
294  vtkTable* ) = 0;
296 
298 
300  void Assess( vtkTable*,
302  vtkTable*,
303  int );
305 
307 
308  virtual void Test( vtkTable*,
310  vtkTable* ) = 0;
312 
313  //BTX
315 
316  virtual void SelectAssessFunctor( vtkTable* outData,
317  vtkDataObject* inMeta,
318  vtkStringArray* rowNames,
319  AssessFunctor*& dfunc ) = 0;
320  //ETX
322 
330 
331 private:
332  vtkStatisticsAlgorithm(const vtkStatisticsAlgorithm&); // Not implemented
333  void operator=(const vtkStatisticsAlgorithm&); // Not implemented
334 };
335 
336 #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)
vtkStatisticsAlgorithmPrivate * Internals
An array holding vtkVariants.
Store vtkAlgorithm input/output information.
maintain an unordered list of data objects
virtual void SetInputModelConnection(vtkAlgorithmOutput *model)
a vtkAbstractArray subclass for strings
int vtkIdType
Definition: vtkType.h:247
Port 1 is for learn parameters (initial guesses, etc.)
A atomic type representing the union of many types.
Definition: vtkVariant.h:78
Proxy object to connect input/output ports.
dynamic, self-adjusting array of double
Base class for statistics algorithms.
virtual void SetLearnOptionParameterConnection(vtkAlgorithmOutput *params)
a simple class to control print indentation
Definition: vtkIndent.h:38
virtual void SetInputConnection(int port, vtkAlgorithmOutput *input)
virtual int FillInputPortInformation(int port, vtkInformation *info)
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.