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  OUTPUT_TEST = 2
99  };
100 //ETX
102 
104 
110 
112 
115  virtual void SetLearnOptionParameters( vtkDataObject* params )
118 
120 
126 
128 
130  virtual void SetInputModel( vtkDataObject* model )
133 
135 
136  vtkSetMacro( LearnOption, bool );
137  vtkGetMacro( LearnOption, bool );
139 
141 
142  vtkSetMacro( DeriveOption, bool );
143  vtkGetMacro( DeriveOption, bool );
145 
147 
148  vtkSetMacro( AssessOption, bool );
149  vtkGetMacro( AssessOption, bool );
151 
153 
154  vtkSetMacro( TestOption, bool );
155  vtkGetMacro( TestOption, bool );
157 
159 
160  vtkSetMacro( NumberOfPrimaryTables, vtkIdType );
161  vtkGetMacro( NumberOfPrimaryTables, vtkIdType );
163 
165 
166  virtual void SetAssessNames( vtkStringArray* );
167  vtkGetObjectMacro(AssessNames,vtkStringArray);
169 
170 //BTX
172 
174  public:
175  virtual void operator() ( vtkVariantArray*,
176  vtkIdType ) = 0;
177  virtual ~AssessFunctor() { }
178  };
179 //ETX
181 
193  virtual void SetColumnStatus( const char* namCol, int status );
194 
197  virtual void ResetAllColumnStates();
198 
202  virtual int RequestSelectedColumns();
203 
205  virtual void ResetRequests();
206 
212  virtual vtkIdType GetNumberOfRequests();
213 
215  virtual vtkIdType GetNumberOfColumnsForRequest( vtkIdType request );
216 
218 
227  virtual const char* GetColumnForRequest( vtkIdType r, vtkIdType c );
228  //BTX
229  virtual int GetColumnForRequest( vtkIdType r, vtkIdType c, vtkStdString& columnName );
230  //ETX
232 
238  void AddColumn( const char* namCol );
239 
247  void AddColumnPair( const char* namColX, const char* namColY );
248 
250 
255  virtual bool SetParameter( const char* parameter,
256  int index,
257  vtkVariant value );
259 
261 
262  virtual void Aggregate( vtkDataObjectCollection*,
263  vtkMultiBlockDataSet* ) = 0;
265 
266 protected:
269 
270  virtual int FillInputPortInformation( int port, vtkInformation* info );
271  virtual int FillOutputPortInformation( int port, vtkInformation* info );
272 
273  virtual int RequestData(
277 
279 
281  virtual void Learn( vtkTable*,
282  vtkTable*,
283  vtkMultiBlockDataSet* ) = 0;
285 
287  virtual void Derive( vtkMultiBlockDataSet* ) = 0;
288 
290 
291  virtual void Assess( vtkTable*,
293  vtkTable* ) = 0;
295 
297 
299  void Assess( vtkTable*,
301  vtkTable*,
302  int );
304 
306 
307  virtual void Test( vtkTable*,
309  vtkTable* ) = 0;
311 
312  //BTX
314 
315  virtual void SelectAssessFunctor( vtkTable* outData,
316  vtkDataObject* inMeta,
317  vtkStringArray* rowNames,
318  AssessFunctor*& dfunc ) = 0;
319  //ETX
321 
329 
330 private:
331  vtkStatisticsAlgorithm(const vtkStatisticsAlgorithm&); // Not implemented
332  void operator=(const vtkStatisticsAlgorithm&); // Not implemented
333 };
334 
335 #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:275
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.
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.