VTK
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 
47 #ifndef vtkGradientFilter_h
48 #define vtkGradientFilter_h
49 
50 #include "vtkFiltersGeneralModule.h" // For export macro
51 #include "vtkDataSetAlgorithm.h"
52 
53 class VTKFILTERSGENERAL_EXPORT vtkGradientFilter : public vtkDataSetAlgorithm
54 {
55 public:
57  void PrintSelf(ostream &os, vtkIndent indent) override;
58 
61  All=0,
62  Patch=1,
63  DataSetMax=2
64  };
65 
69  Zero=0,
70  NaN=1,
71  DataTypeMin=2,
72  DataTypeMax=3
73  };
74 
75  static vtkGradientFilter *New();
76 
78 
84  virtual void SetInputScalars(int fieldAssociation, const char *name);
85  virtual void SetInputScalars(int fieldAssociation, int fieldAttributeType);
87 
89 
94  vtkGetStringMacro(ResultArrayName);
95  vtkSetStringMacro(ResultArrayName);
97 
99 
104  vtkGetStringMacro(DivergenceArrayName);
105  vtkSetStringMacro(DivergenceArrayName);
107 
109 
114  vtkGetStringMacro(VorticityArrayName);
115  vtkSetStringMacro(VorticityArrayName);
117 
119 
124  vtkGetStringMacro(QCriterionArrayName);
125  vtkSetStringMacro(QCriterionArrayName);
127 
129 
138  vtkGetMacro(FasterApproximation, vtkTypeBool);
139  vtkSetMacro(FasterApproximation, vtkTypeBool);
140  vtkBooleanMacro(FasterApproximation, vtkTypeBool);
142 
144 
149  vtkSetMacro(ComputeGradient, vtkTypeBool);
150  vtkGetMacro(ComputeGradient, vtkTypeBool);
151  vtkBooleanMacro(ComputeGradient, vtkTypeBool);
153 
155 
161  vtkSetMacro(ComputeDivergence, vtkTypeBool);
162  vtkGetMacro(ComputeDivergence, vtkTypeBool);
163  vtkBooleanMacro(ComputeDivergence, vtkTypeBool);
165 
167 
173  vtkSetMacro(ComputeVorticity, vtkTypeBool);
174  vtkGetMacro(ComputeVorticity, vtkTypeBool);
175  vtkBooleanMacro(ComputeVorticity, vtkTypeBool);
177 
179 
186  vtkSetMacro(ComputeQCriterion, vtkTypeBool);
187  vtkGetMacro(ComputeQCriterion, vtkTypeBool);
188  vtkBooleanMacro(ComputeQCriterion, vtkTypeBool);
190 
192 
196  vtkSetClampMacro(ContributingCellOption, int, 0, 2);
197  vtkGetMacro(ContributingCellOption, int);
199 
201 
206  vtkSetClampMacro(ReplacementValueOption, int, 0, 3);
207  vtkGetMacro(ReplacementValueOption, int);
209 
210 protected:
212  ~vtkGradientFilter() override;
213 
216  vtkInformationVector *) override;
218  vtkInformationVector *) override;
219 
225  virtual int ComputeUnstructuredGridGradient(
226  vtkDataArray* Array, int fieldAssociation, vtkDataSet* input,
227  bool computeVorticity, bool computeQCriterion, bool computeDivergence,
228  vtkDataSet* output);
229 
235  virtual int ComputeRegularGridGradient(
236  vtkDataArray* Array, int fieldAssociation, bool computeVorticity,
237  bool computeQCriterion, bool computeDivergence, vtkDataSet* output);
238 
245  int GetOutputArrayType(vtkDataArray* inputArray);
246 
252 
258 
264 
270 
281 
287 
294 
301 
308 
314 
321 
322 private:
323  vtkGradientFilter(const vtkGradientFilter &) = delete;
324  void operator=(const vtkGradientFilter &) = delete;
325 };
326 
327 #endif //_vtkGradientFilter_h
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:41
vtkGradientFilter::ComputeVorticity
vtkTypeBool ComputeVorticity
Flag to indicate that vorticity/curl of the input vector is to be computed.
Definition: vtkGradientFilter.h:307
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:280
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:180
vtkDataArray
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
vtkGradientFilter::ResultArrayName
char * ResultArrayName
If non-null then it contains the name of the outputted gradient array.
Definition: vtkGradientFilter.h:251
vtkGradientFilter::ReplacementValueOption
int ReplacementValueOption
Option to specify what replacement value or entities that don't have any gradient computed over them ...
Definition: vtkGradientFilter.h:320
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:68
vtkGradientFilter::QCriterionArrayName
char * QCriterionArrayName
If non-null then it contains the name of the outputted Q criterion array.
Definition: vtkGradientFilter.h:269
vtkGradientFilter::ContributingCellEnum
ContributingCellEnum
Options to choose what cells contribute to the gradient calculation.
Definition: vtkGradientFilter.h:60
vtkGradientFilter::ContributingCellOption
int ContributingCellOption
Option to specify what cells to include in the gradient computation.
Definition: vtkGradientFilter.h:313
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
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:286
vtkGradientFilter::VorticityArrayName
char * VorticityArrayName
If non-null then it contains the name of the outputted vorticity array.
Definition: vtkGradientFilter.h:263
vtkX3D::name
Definition: vtkX3D.h:219
vtkGradientFilter
A general filter for gradient estimation.
Definition: vtkGradientFilter.h:53
vtkDataSet
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkGradientFilter::ComputeDivergence
vtkTypeBool ComputeDivergence
Flag to indicate that the divergence of the input vector is to be computed.
Definition: vtkGradientFilter.h:293
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:300
vtkGradientFilter::DivergenceArrayName
char * DivergenceArrayName
If non-null then it contains the name of the outputted divergence array.
Definition: vtkGradientFilter.h:257