1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108
|
Usage
Estimates the gradient of a field in a data set. The
gradient calculation is dependent on the input dataset type.
The created gradient array is of the same type as the array
it is calculated from (e.g. point data or cell data) as well
as data type (e.g. float, double). At the boundary the
gradient is not central differencing. The output array has
3*number of components of the input data array. The ordering
for the output tuple will be {du/dx, du/dy, du/dz, dv/dx,
dv/dy, dv/dz, dw/dx, dw/dy, dw/dz} for an input array {u, v,
w}.
To create an instance of class vtkGradientFilter, simply
invoke its constructor as follows
obj = vtkGradientFilter
Methods
The class vtkGradientFilter has several methods that can be
used. They are listed below. Note that the documentation is
translated automatically from the VTK sources, and may not
be completely intelligible. When in doubt, consult the VTK
website. In the methods listed below, obj is an instance of
the vtkGradientFilter class.
* string = obj.GetClassName ()
* int = obj.IsA (string name)
* vtkGradientFilter = obj.NewInstance ()
* vtkGradientFilter = obj.SafeDownCast (vtkObject o)
* obj.SetInputScalars (int fieldAssociation, string name) -
These are basically a convenience method that calls
SetInputArrayToProcess to set the array used as the input
scalars. The fieldAssociation comes from the
vtkDataObject::FieldAssocations enum. The
fieldAttributeType comes from the vtkDataSetAttributes::
AttributeTypes enum.
* obj.SetInputScalars (int fieldAssociation, int
fieldAttributeType) - These are basically a convenience
method that calls SetInputArrayToProcess to set the array
used as the input scalars. The fieldAssociation comes from
the vtkDataObject::FieldAssocations enum. The
fieldAttributeType comes from the vtkDataSetAttributes::
AttributeTypes enum.
* string = obj.GetResultArrayName () - Get/Set the name of
the resulting array to create. If NULL (the default) then
the output array will be named "Gradients".
* obj.SetResultArrayName (string ) - Get/Set the name of the
resulting array to create. If NULL (the default) then the
output array will be named "Gradients".
* int = obj.GetFasterApproximation () - When this flag is on
(default is off), the gradient filter will provide a less
accurate (but close) algorithm that performs fewer
derivative calculations (and is therefore faster). The
error contains some smoothing of the output data and some
possible errors on the boundary. This parameter has no
effect when performing the gradient of cell data. This
only applies if the input grid is a vtkUnstructuredGrid or
a vtkPolyData.
* obj.SetFasterApproximation (int ) - When this flag is on
(default is off), the gradient filter will provide a less
accurate (but close) algorithm that performs fewer
derivative calculations (and is therefore faster). The
error contains some smoothing of the output data and some
possible errors on the boundary. This parameter has no
effect when performing the gradient of cell data. This
only applies if the input grid is a vtkUnstructuredGrid or
a vtkPolyData.
* obj.FasterApproximationOn () - When this flag is on
(default is off), the gradient filter will provide a less
accurate (but close) algorithm that performs fewer
derivative calculations (and is therefore faster). The
error contains some smoothing of the output data and some
possible errors on the boundary. This parameter has no
effect when performing the gradient of cell data. This
only applies if the input grid is a vtkUnstructuredGrid or
a vtkPolyData.
* obj.FasterApproximationOff () - When this flag is on
(default is off), the gradient filter will provide a less
accurate (but close) algorithm that performs fewer
derivative calculations (and is therefore faster). The
error contains some smoothing of the output data and some
possible errors on the boundary. This parameter has no
effect when performing the gradient of cell data. This
only applies if the input grid is a vtkUnstructuredGrid or
a vtkPolyData.
* obj.SetComputeVorticity (int ) - Set the resultant array
to be vorticity/curl of the input array. The input array
must have 3 components.
* int = obj.GetComputeVorticity () - Set the resultant array
to be vorticity/curl of the input array. The input array
must have 3 components.
* obj.ComputeVorticityOn () - Set the resultant array to be
vorticity/curl of the input array. The input array must
have 3 components.
* obj.ComputeVorticityOff () - Set the resultant array to be
vorticity/curl of the input array. The input array must
have 3 components.
* FreeMat_Documentation
* Visualization_Toolkit_Graphics_Classes
* Generated on Thu Jul 25 2013 17:18:32 for FreeMat by
doxygen_ 1.8.1.1
|