VTK
vtkTemporalStatistics.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 /*=========================================================================
3 
4  Program: Visualization Toolkit
5  Module: vtkTemporalStatistics.h
6 
7  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
8  All rights reserved.
9  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
10 
11  This software is distributed WITHOUT ANY WARRANTY; without even
12  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
13  PURPOSE. See the above copyright notice for more information.
14 
15 =========================================================================*/
16 
17 /*
18  * Copyright 2008 Sandia Corporation.
19  * Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive
20  * license for use of this work by or on behalf of the
21  * U.S. Government. Redistribution and use in source and binary forms, with
22  * or without modification, are permitted provided that this Notice and any
23  * statement of authorship are reproduced on all copies.
24  */
25 
55 #ifndef vtkTemporalStatistics_h
56 #define vtkTemporalStatistics_h
57 
58 #include "vtkFiltersGeneralModule.h" // For export macro
60 
62 class vtkDataSet;
63 class vtkFieldData;
64 class vtkGraph;
65 
66 class VTKFILTERSGENERAL_EXPORT vtkTemporalStatistics : public vtkPassInputTypeAlgorithm
67 {
68 public:
70 
74  static vtkTemporalStatistics *New();
75  void PrintSelf(ostream &os, vtkIndent indent) override;
77 
79 
83  vtkGetMacro(ComputeAverage, vtkTypeBool);
84  vtkSetMacro(ComputeAverage, vtkTypeBool);
85  vtkBooleanMacro(ComputeAverage, vtkTypeBool);
87 
89 
93  vtkGetMacro(ComputeMinimum, vtkTypeBool);
94  vtkSetMacro(ComputeMinimum, vtkTypeBool);
95  vtkBooleanMacro(ComputeMinimum, vtkTypeBool);
97 
99 
103  vtkGetMacro(ComputeMaximum, vtkTypeBool);
104  vtkSetMacro(ComputeMaximum, vtkTypeBool);
105  vtkBooleanMacro(ComputeMaximum, vtkTypeBool);
107 
108  // Definition:
109  // Turn on/off the computation of the standard deviation of the values over
110  // time. On by default. The resulting array names have "_stddev" appended to
111  // them.
112  vtkGetMacro(ComputeStandardDeviation, vtkTypeBool);
113  vtkSetMacro(ComputeStandardDeviation, vtkTypeBool);
114  vtkBooleanMacro(ComputeStandardDeviation, vtkTypeBool);
115 
116 protected:
118  ~vtkTemporalStatistics() override;
119 
124 
125  // Used when iterating the pipeline to keep track of which timestep we are on.
127 
128  int FillInputPortInformation(int port, vtkInformation *info) override;
129 
130  int RequestDataObject(vtkInformation *request,
131  vtkInformationVector **inputVector,
132  vtkInformationVector *outputVector) override;
133  int RequestInformation(vtkInformation *request,
134  vtkInformationVector **inputVector,
135  vtkInformationVector *outputVector) override;
136  int RequestUpdateExtent(vtkInformation *request,
137  vtkInformationVector **inputVector,
138  vtkInformationVector *outputVector) override;
139  int RequestData(vtkInformation *request,
140  vtkInformationVector **inputVector,
141  vtkInformationVector *outputVector) override;
142 
143  virtual void InitializeStatistics(vtkDataObject *input,
144  vtkDataObject *output);
145  virtual void InitializeStatistics(vtkDataSet *input, vtkDataSet *output);
146  virtual void InitializeStatistics(vtkGraph *input, vtkGraph *output);
147  virtual void InitializeStatistics(vtkCompositeDataSet *input,
148  vtkCompositeDataSet *output);
149  virtual void InitializeArrays(vtkFieldData *inFd, vtkFieldData *outFd);
150  virtual void InitializeArray(vtkDataArray *array, vtkFieldData *outFd);
151 
152  virtual void AccumulateStatistics(vtkDataObject *input,
153  vtkDataObject *output);
154  virtual void AccumulateStatistics(vtkDataSet *input, vtkDataSet *output);
155  virtual void AccumulateStatistics(vtkGraph *input, vtkGraph *output);
156  virtual void AccumulateStatistics(vtkCompositeDataSet *input,
157  vtkCompositeDataSet *output);
158  virtual void AccumulateArrays(vtkFieldData *inFd, vtkFieldData *outFd);
159 
160  virtual void PostExecute(vtkDataObject *input, vtkDataObject *output);
161  virtual void PostExecute(vtkDataSet *input, vtkDataSet *output);
162  virtual void PostExecute(vtkGraph *input, vtkGraph *output);
163  virtual void PostExecute(vtkCompositeDataSet *input,
164  vtkCompositeDataSet *output);
165  virtual void FinishArrays(vtkFieldData *inFd, vtkFieldData *outFd);
166 
167  virtual vtkDataArray *GetArray(vtkFieldData *fieldData,
168  vtkDataArray *inArray,
169  const char *nameSuffix);
170 
171 private:
173  void operator=(const vtkTemporalStatistics &) = delete;
174 
176 
181  bool GeneratedChangingTopologyWarning;
182 };
184 
185 #endif //_vtkTemporalStatistics_h
virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called within ProcessRequest when a request asks for Information.
Superclass for algorithms that produce output of the same type as input.
Store vtkAlgorithm input/output information.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
int vtkTypeBool
Definition: vtkABI.h:69
Base class for graph data types.
Definition: vtkGraph.h:287
abstract superclass for composite (multi-block or AMR) datasets
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called within ProcessRequest when each filter in the pipeline decides what portion of its inp...
a simple class to control print indentation
Definition: vtkIndent.h:39
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
virtual int RequestDataObject(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called within ProcessRequest to when a request asks the algorithm to create empty output data...
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Store zero or more vtkInformation instances.
Compute statistics of point or cell data as it changes over time.
general representation of visualization data
Definition: vtkDataObject.h:64
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called within ProcessRequest when a request asks the algorithm to do its work.
static vtkPassInputTypeAlgorithm * New()
represent and manipulate fields of data
Definition: vtkFieldData.h:56