ParaView
vtkSciVizStatistics.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkSciVizStatistics.h
5 
6  Copyright (c) Kitware, Inc.
7  All rights reserved.
8  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html 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  -------------------------------------------------------------------------*/
37 #ifndef vtkSciVizStatistics_h
38 #define vtkSciVizStatistics_h
39 
40 #include "vtkPVVTKExtensionsDefaultModule.h" //needed for exports
41 #include "vtkTableAlgorithm.h"
42 
43 class vtkCompositeDataSet;
44 class vtkDataObjectToTable;
45 class vtkFieldData;
46 class vtkInformationIntegerKey;
47 class vtkMultiBlockDataSet;
49 class vtkStatisticsAlgorithm;
50 
51 class VTKPVVTKEXTENSIONSDEFAULT_EXPORT vtkSciVizStatistics : public vtkTableAlgorithm
52 {
53 public:
54  vtkTypeMacro(vtkSciVizStatistics, vtkTableAlgorithm);
55  virtual void PrintSelf(ostream& os, vtkIndent indent);
56 
58 
61  vtkGetMacro(AttributeMode, int);
62  vtkSetMacro(AttributeMode, int);
64 
68  int GetNumberOfAttributeArrays();
69 
73  const char* GetAttributeArrayName(int n);
74 
78  int GetAttributeArrayStatus(const char* arrName);
79 
81 
84  void EnableAttributeArray(const char* arrName);
85  void ClearAttributeArrays();
87 
89 
103  vtkSetClampMacro(TrainingFraction, double, 0.0, 1.0);
104  vtkGetMacro(TrainingFraction, double);
106 
116  enum Tasks
117  {
118  MODEL_INPUT,
119  CREATE_MODEL,
122  MODEL_AND_ASSESS
123  };
125 
127 
132  vtkSetMacro(Task, int);
133  vtkGetMacro(Task, int);
135 
141  vtkInformationIntegerKey* MULTIPLE_MODELS();
142 
143 protected:
145  virtual ~vtkSciVizStatistics();
146 
147  virtual int FillInputPortInformation(int port, vtkInformation* info);
148  virtual int FillOutputPortInformation(int port, vtkInformation* info);
149 
150  virtual int ProcessRequest(
151  vtkInformation* request, vtkInformationVector** input, vtkInformationVector* output);
152  virtual int RequestDataObject(
153  vtkInformation* request, vtkInformationVector** input, vtkInformationVector* output);
154  virtual int RequestData(
155  vtkInformation* request, vtkInformationVector** input, vtkInformationVector* output);
156  virtual int RequestData(vtkCompositeDataSet* compDataOu, vtkCompositeDataSet* compModelOu,
157  vtkCompositeDataSet* compDataIn, vtkCompositeDataSet* compModelIn, vtkDataObject* singleModel);
158  virtual int RequestData(vtkDataObject* observationsOut, vtkDataObject* modelOut,
159  vtkDataObject* observationsIn, vtkDataObject* modelIn);
160 
161  virtual int PrepareFullDataTable(vtkTable* table, vtkFieldData* dataAttrIn);
162  virtual int PrepareTrainingTable(
163  vtkTable* trainingTable, vtkTable* fullDataTable, vtkIdType numObservations);
164 
170  virtual int LearnAndDerive(vtkMultiBlockDataSet* model, vtkTable* inData) = 0;
171 
186  virtual int AssessData(
187  vtkTable* observations, vtkDataObject* dataset, vtkMultiBlockDataSet* model) = 0;
188 
200  virtual vtkIdType GetNumberOfObservationsForTraining(vtkTable* observations);
201 
203  int Task;
206 
207 private:
208  vtkSciVizStatistics(const vtkSciVizStatistics&) VTK_DELETE_FUNCTION;
209  void operator=(const vtkSciVizStatistics&) VTK_DELETE_FUNCTION;
210 };
211 
212 #endif // vtkSciVizStatistics_h
Assess the input dataset using a statistical model from input port 1.
Abstract base class for computing statistics with vtkStatistics.
vtkSciVizStatisticsP * P
Tasks
Possible tasks the filter can perform.