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 "vtkPVVTKExtensionsFiltersStatisticsModule.h" //needed for exports
41 #include "vtkTableAlgorithm.h"
42 
45 class vtkFieldData;
50 
52 {
53 public:
55  void PrintSelf(ostream& os, vtkIndent indent) override;
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  ~vtkSciVizStatistics() override;
146 
147  int FillInputPortInformation(int port, vtkInformation* info) override;
148  int FillOutputPortInformation(int port, vtkInformation* info) override;
149 
150  int ProcessRequest(
151  vtkInformation* request, vtkInformationVector** input, vtkInformationVector* output) override;
152  virtual int RequestDataObject(
153  vtkInformation* request, vtkInformationVector** input, vtkInformationVector* output);
154  int RequestData(
155  vtkInformation* request, vtkInformationVector** input, vtkInformationVector* output) override;
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 
207  void ShallowCopy(vtkDataObject* out, vtkDataObject* in);
208 
210  int Task;
213 
214 private:
215  vtkSciVizStatistics(const vtkSciVizStatistics&) = delete;
216  void operator=(const vtkSciVizStatistics&) = delete;
217 };
218 
219 #endif // vtkSciVizStatistics_h
virtual int FillOutputPortInformation(int port, vtkInformation *info)
#define VTKPVVTKEXTENSIONSFILTERSSTATISTICS_EXPORT
Assess the input dataset using a statistical model from input port 1.
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
int vtkIdType
Abstract base class for computing statistics with vtkStatistics.
vtkSciVizStatisticsP * P
virtual int FillInputPortInformation(int port, vtkInformation *info)
Tasks
Possible tasks the filter can perform.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
virtual int ProcessRequest(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
void operator=(const vtkObjectBase &)