vtkSciVizStatistics.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-FileCopyrightText: Copyright 2011 Sandia Corporation
3 // SPDX-License-Identifier: LicenseRef-BSD-3-Clause-Sandia-USGov
21 #ifndef vtkSciVizStatistics_h
22 #define vtkSciVizStatistics_h
23 
24 #include "vtkPVVTKExtensionsFiltersStatisticsModule.h" //needed for exports
25 #include "vtkTableAlgorithm.h"
26 
29 class vtkFieldData;
35 
37 {
38 public:
40  void PrintSelf(ostream& os, vtkIndent indent) override;
41 
43 
46  vtkGetMacro(AttributeMode, int);
47  vtkSetMacro(AttributeMode, int);
49 
53  int GetNumberOfAttributeArrays();
54 
58  const char* GetAttributeArrayName(int n);
59 
63  int GetAttributeArrayStatus(const char* arrName);
64 
66 
69  void EnableAttributeArray(const char* arrName);
70  void ClearAttributeArrays();
72 
74 
88  vtkSetClampMacro(TrainingFraction, double, 0.0, 1.0);
89  vtkGetMacro(TrainingFraction, double);
91 
93 
96  virtual void SetController(vtkMultiProcessController*);
97  vtkGetObjectMacro(Controller, vtkMultiProcessController);
99 
109  enum Tasks
110  {
111  MODEL_INPUT,
112  CREATE_MODEL,
115  MODEL_AND_ASSESS
116  };
118 
120 
125  vtkSetMacro(Task, int);
126  vtkGetMacro(Task, int);
128 
134  vtkInformationIntegerKey* MULTIPLE_MODELS();
135 
136 protected:
138  ~vtkSciVizStatistics() override;
139 
140  int FillInputPortInformation(int port, vtkInformation* info) override;
141  int FillOutputPortInformation(int port, vtkInformation* info) override;
142 
143  int ProcessRequest(
144  vtkInformation* request, vtkInformationVector** input, vtkInformationVector* output) override;
145  virtual int RequestDataObject(
146  vtkInformation* request, vtkInformationVector** input, vtkInformationVector* output);
147  int RequestData(
148  vtkInformation* request, vtkInformationVector** input, vtkInformationVector* output) override;
149  virtual int RequestData(vtkCompositeDataSet* compDataOu, vtkCompositeDataSet* compModelOu,
150  vtkCompositeDataSet* compDataIn, vtkCompositeDataSet* compModelIn, vtkDataObject* singleModel);
151  virtual int RequestData(vtkDataObject* observationsOut, vtkDataObject* modelOut,
152  vtkDataObject* observationsIn, vtkDataObject* modelIn);
153 
154  virtual int PrepareFullDataTable(vtkTable* table, vtkFieldData* dataAttrIn);
155  virtual int PrepareTrainingTable(
156  vtkTable* trainingTable, vtkTable* fullDataTable, vtkIdType numObservations);
157 
163  virtual int LearnAndDerive(vtkMultiBlockDataSet* model, vtkTable* inData) = 0;
164 
179  virtual int AssessData(
180  vtkTable* observations, vtkDataObject* dataset, vtkMultiBlockDataSet* model) = 0;
181 
191  virtual vtkIdType GetNumberOfObservationsForTraining(vtkIdType N);
192 
198  void ShallowCopy(vtkDataObject* out, vtkDataObject* in);
199 
201  int Task;
205 
206 private:
207  vtkSciVizStatistics(const vtkSciVizStatistics&) = delete;
208  void operator=(const vtkSciVizStatistics&) = delete;
209 };
210 
211 #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
vtkMultiProcessController * Controller
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 &)