VTK  9.0.1
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 
44 #ifndef vtkGradientFilter_h
45 #define vtkGradientFilter_h
46 
47 #include "vtkDataSetAlgorithm.h"
48 #include "vtkFiltersGeneralModule.h" // For export macro
49 
50 class VTKFILTERSGENERAL_EXPORT vtkGradientFilter : public vtkDataSetAlgorithm
51 {
52 public:
54  void PrintSelf(ostream& os, vtkIndent indent) override;
55 
58  {
59  All = 0,
60  Patch = 1,
61  DataSetMax = 2
62  };
63 
67  {
68  Zero = 0,
69  NaN = 1,
70  DataTypeMin = 2,
71  DataTypeMax = 3
72  };
73 
74  static vtkGradientFilter* New();
75 
77 
83  virtual void SetInputScalars(int fieldAssociation, const char* name);
84  virtual void SetInputScalars(int fieldAssociation, int fieldAttributeType);
86 
88 
93  vtkGetStringMacro(ResultArrayName);
94  vtkSetStringMacro(ResultArrayName);
96 
98 
103  vtkGetStringMacro(DivergenceArrayName);
104  vtkSetStringMacro(DivergenceArrayName);
106 
108 
113  vtkGetStringMacro(VorticityArrayName);
114  vtkSetStringMacro(VorticityArrayName);
116 
118 
123  vtkGetStringMacro(QCriterionArrayName);
124  vtkSetStringMacro(QCriterionArrayName);
126 
128 
137  vtkGetMacro(FasterApproximation, vtkTypeBool);
138  vtkSetMacro(FasterApproximation, vtkTypeBool);
139  vtkBooleanMacro(FasterApproximation, vtkTypeBool);
141 
143 
148  vtkSetMacro(ComputeGradient, vtkTypeBool);
149  vtkGetMacro(ComputeGradient, vtkTypeBool);
150  vtkBooleanMacro(ComputeGradient, vtkTypeBool);
152 
154 
160  vtkSetMacro(ComputeDivergence, vtkTypeBool);
161  vtkGetMacro(ComputeDivergence, vtkTypeBool);
162  vtkBooleanMacro(ComputeDivergence, vtkTypeBool);
164 
166 
172  vtkSetMacro(ComputeVorticity, vtkTypeBool);
173  vtkGetMacro(ComputeVorticity, vtkTypeBool);
174  vtkBooleanMacro(ComputeVorticity, vtkTypeBool);
176 
178 
185  vtkSetMacro(ComputeQCriterion, vtkTypeBool);
186  vtkGetMacro(ComputeQCriterion, vtkTypeBool);
187  vtkBooleanMacro(ComputeQCriterion, vtkTypeBool);
189 
191 
195  vtkSetClampMacro(ContributingCellOption, int, 0, 2);
196  vtkGetMacro(ContributingCellOption, int);
198 
200 
205  vtkSetClampMacro(ReplacementValueOption, int, 0, 3);
206  vtkGetMacro(ReplacementValueOption, int);
208 
209 protected:
211  ~vtkGradientFilter() override;
212 
215 
221  virtual int ComputeUnstructuredGridGradient(vtkDataArray* Array, int fieldAssociation,
222  vtkDataSet* input, bool computeVorticity, bool computeQCriterion, bool computeDivergence,
223  vtkDataSet* output);
224 
230  virtual int ComputeRegularGridGradient(vtkDataArray* Array, int fieldAssociation,
231  bool computeVorticity, bool computeQCriterion, bool computeDivergence, vtkDataSet* output);
232 
239  int GetOutputArrayType(vtkDataArray* inputArray);
240 
246 
252 
258 
264 
275 
281 
288 
295 
302 
308 
315 
316 private:
317  vtkGradientFilter(const vtkGradientFilter&) = delete;
318  void operator=(const vtkGradientFilter&) = delete;
319 };
320 
321 #endif //_vtkGradientFilter_h
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkGradientFilter::ComputeVorticity
vtkTypeBool ComputeVorticity
Flag to indicate that vorticity/curl of the input vector is to be computed.
Definition: vtkGradientFilter.h:301
vtkGradientFilter::FasterApproximation
vtkTypeBool FasterApproximation
When this flag is on (default is off), the gradient filter will provide a less accurate (but close) a...
Definition: vtkGradientFilter.h:274
vtkDataSetAlgorithm::RequestData
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called within ProcessRequest when a request asks the algorithm to do its work.
Definition: vtkDataSetAlgorithm.h:176
vtkDataArray
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:49
vtkGradientFilter::ResultArrayName
char * ResultArrayName
If non-null then it contains the name of the outputted gradient array.
Definition: vtkGradientFilter.h:245
vtkGradientFilter::ReplacementValueOption
int ReplacementValueOption
Option to specify what replacement value or entities that don't have any gradient computed over them ...
Definition: vtkGradientFilter.h:314
vtkDataSetAlgorithm
Superclass for algorithms that produce output of the same type as input.
Definition: vtkDataSetAlgorithm.h:48
vtkGradientFilter::ReplacementValueEnum
ReplacementValueEnum
The replacement value or entities that don't have any gradient computed over them based on the Contri...
Definition: vtkGradientFilter.h:66
vtkGradientFilter::QCriterionArrayName
char * QCriterionArrayName
If non-null then it contains the name of the outputted Q criterion array.
Definition: vtkGradientFilter.h:263
vtkGradientFilter::ContributingCellEnum
ContributingCellEnum
Options to choose what cells contribute to the gradient calculation.
Definition: vtkGradientFilter.h:57
vtkGradientFilter::ContributingCellOption
int ContributingCellOption
Option to specify what cells to include in the gradient computation.
Definition: vtkGradientFilter.h:307
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkDataSetAlgorithm::New
static vtkDataSetAlgorithm * New()
vtkGradientFilter::ComputeGradient
vtkTypeBool ComputeGradient
Flag to indicate that the gradient of the input vector is to be computed.
Definition: vtkGradientFilter.h:280
vtkGradientFilter::VorticityArrayName
char * VorticityArrayName
If non-null then it contains the name of the outputted vorticity array.
Definition: vtkGradientFilter.h:257
vtkX3D::name
@ name
Definition: vtkX3D.h:225
vtkGradientFilter
A general filter for gradient estimation.
Definition: vtkGradientFilter.h:50
vtkDataSet
abstract class to specify dataset behavior
Definition: vtkDataSet.h:56
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:73
vtkGradientFilter::ComputeDivergence
vtkTypeBool ComputeDivergence
Flag to indicate that the divergence of the input vector is to be computed.
Definition: vtkGradientFilter.h:287
vtkDataSetAlgorithm.h
vtkDataSetAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkDataSetAlgorithm::RequestUpdateExtent
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called within ProcessRequest when each filter in the pipeline decides what portion of its inp...
Definition: vtkDataSetAlgorithm.h:152
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkGradientFilter::ComputeQCriterion
vtkTypeBool ComputeQCriterion
Flag to indicate that the Q-criterion of the input vector is to be computed.
Definition: vtkGradientFilter.h:294
vtkGradientFilter::DivergenceArrayName
char * DivergenceArrayName
If non-null then it contains the name of the outputted divergence array.
Definition: vtkGradientFilter.h:251