VTK  9.2.6
vtkGradientFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkGradientFilter.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 (c) Sandia Corporation
17  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
18 ----------------------------------------------------------------------------*/
19 
49 #ifndef vtkGradientFilter_h
50 #define vtkGradientFilter_h
51 
52 #include "vtkDataSetAlgorithm.h"
53 #include "vtkFiltersGeneralModule.h" // For export macro
54 
56 
57 class VTKFILTERSGENERAL_EXPORT vtkGradientFilter : public vtkDataSetAlgorithm
58 {
59 public:
61 
64  static vtkGradientFilter* New();
66  void PrintSelf(ostream& os, vtkIndent indent) override;
68 
71  {
72  All = 0,
73  Patch = 1,
74  DataSetMax = 2
75  };
76 
80  {
81  Zero = 0,
82  NaN = 1,
83  DataTypeMin = 2,
84  DataTypeMax = 3
85  };
86 
88 
94  virtual void SetInputScalars(int fieldAssociation, const char* name);
95  virtual void SetInputScalars(int fieldAssociation, int fieldAttributeType);
97 
99 
104  vtkGetStringMacro(ResultArrayName);
105  vtkSetStringMacro(ResultArrayName);
107 
109 
114  vtkGetStringMacro(DivergenceArrayName);
115  vtkSetStringMacro(DivergenceArrayName);
117 
119 
124  vtkGetStringMacro(VorticityArrayName);
125  vtkSetStringMacro(VorticityArrayName);
127 
129 
134  vtkGetStringMacro(QCriterionArrayName);
135  vtkSetStringMacro(QCriterionArrayName);
137 
139 
148  vtkGetMacro(FasterApproximation, vtkTypeBool);
149  vtkSetMacro(FasterApproximation, vtkTypeBool);
150  vtkBooleanMacro(FasterApproximation, vtkTypeBool);
152 
154 
159  vtkSetMacro(ComputeGradient, vtkTypeBool);
160  vtkGetMacro(ComputeGradient, vtkTypeBool);
161  vtkBooleanMacro(ComputeGradient, vtkTypeBool);
163 
165 
171  vtkSetMacro(ComputeDivergence, vtkTypeBool);
172  vtkGetMacro(ComputeDivergence, vtkTypeBool);
173  vtkBooleanMacro(ComputeDivergence, vtkTypeBool);
175 
177 
183  vtkSetMacro(ComputeVorticity, vtkTypeBool);
184  vtkGetMacro(ComputeVorticity, vtkTypeBool);
185  vtkBooleanMacro(ComputeVorticity, vtkTypeBool);
187 
189 
196  vtkSetMacro(ComputeQCriterion, vtkTypeBool);
197  vtkGetMacro(ComputeQCriterion, vtkTypeBool);
198  vtkBooleanMacro(ComputeQCriterion, vtkTypeBool);
200 
202 
206  vtkSetClampMacro(ContributingCellOption, int, 0, 2);
207  vtkGetMacro(ContributingCellOption, int);
209 
211 
216  vtkSetClampMacro(ReplacementValueOption, int, 0, 3);
217  vtkGetMacro(ReplacementValueOption, int);
219 
220 protected:
222  ~vtkGradientFilter() override;
223 
226 
232  virtual int ComputeUnstructuredGridGradient(vtkDataArray* Array, int fieldAssociation,
233  vtkDataSet* input, bool computeVorticity, bool computeQCriterion, bool computeDivergence,
234  vtkDataSet* output);
235 
241  virtual int ComputeRegularGridGradient(vtkDataArray* Array, int* dims, int fieldAssociation,
242  bool computeVorticity, bool computeQCriterion, bool computeDivergence, vtkDataSet* output,
243  vtkUnsignedCharArray* ghosts, unsigned char hiddenGhost);
244 
251  int GetOutputArrayType(vtkDataArray* inputArray);
252 
258 
264 
270 
276 
287 
293 
300 
307 
314 
320 
327 
328 private:
329  vtkGradientFilter(const vtkGradientFilter&) = delete;
330  void operator=(const vtkGradientFilter&) = delete;
331 };
332 
333 #endif //_vtkGradientFilter_h
int ReplacementValueOption
Option to specify what replacement value or entities that don't have any gradient computed over them ...
char * ResultArrayName
If non-null then it contains the name of the outputted gradient array.
Store vtkAlgorithm input/output information.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
char * DivergenceArrayName
If non-null then it contains the name of the outputted divergence array.
char * QCriterionArrayName
If non-null then it contains the name of the outputted Q criterion array.
vtkTypeBool ComputeGradient
Flag to indicate that the gradient of the input vector is to be computed.
vtkTypeBool ComputeVorticity
Flag to indicate that vorticity/curl of the input vector is to be computed.
int vtkTypeBool
Definition: vtkABI.h:69
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkTypeBool FasterApproximation
When this flag is on (default is off), the gradient filter will provide a less accurate (but close) a...
vtkTypeBool ComputeDivergence
Flag to indicate that the divergence of the input vector is to be computed.
a simple class to control print indentation
Definition: vtkIndent.h:39
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:55
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called within ProcessRequest when a request asks the algorithm to do its work.
A general filter for gradient estimation.
ReplacementValueEnum
The replacement value or entities that don't have any gradient computed over them based on the Contri...
dynamic, self-adjusting array of unsigned char
ContributingCellEnum
Options to choose what cells contribute to the gradient calculation.
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called within ProcessRequest when each filter in the pipeline decides what portion of its inp...
int ContributingCellOption
Option to specify what cells to include in the gradient computation.
vtkTypeBool ComputeQCriterion
Flag to indicate that the Q-criterion of the input vector is to be computed.
Store zero or more vtkInformation instances.
Superclass for algorithms that produce output of the same type as input.
char * VorticityArrayName
If non-null then it contains the name of the outputted vorticity array.
static vtkDataSetAlgorithm * New()