The Calculator filter computes a new data array or new point coordinates as a function of existing scalar or vector arrays. If point-centered arrays are used in the computation of a new data array, the resulting array will also be point-centered. Similarly, computations using cell-centered arrays will produce a new cell-centered array. If the function is computing point coordinates, the result of the function must be a three-component vector.
The Calculator interface operates similarly to a scientific calculator. In creating the function to evaluate, the standard order of operations applies. Each of the calculator functions is described below. Unless otherwise noted, enclose the operand in parentheses using the ( and ) buttons.
The operands are described below. The digits 0 - 9 and the decimal point are used to enter constant scalar values. iHat, jHat, and kHat are vector constants representing unit vectors in the X, Y, and Z directions, respectively. The scalars menu lists the names of the scalar arrays and the components of the vector arrays of either the point-centered or cell-centered data. The vectors menu lists the names of the point-centered or cell-centered vector arrays. The function will be computed for each point (or cell) using the scalar or vector value of the array at that point (or cell). The filter operates on any type of data set, but the input data set must have at least one scalar or vector array. The arrays can be either point-centered or cell-centered. The Calculator filter’s output is of the same data set type as the input.
The output array type can be specified as an advanced option with the default being of a vtkDoubleArray.
- This property determines on which types of field data the computation is to be performed on.
- The value of this property determines whether the results of this computation should be used as point coordinates or as a new array.
- This property contains the equation for computing the new array.
- This property specifies the input dataset (vtkDataSet, vtkTable or vtkGraph) to the Calculator filter. The scalar and vector variables may be chosen from this dataset’s arrays.
- This property determines whether invalid values in the computation will be replaced with a specific value. (See the ReplacementValue property.)
- If invalid values in the computation are to be replaced with another value, this property contains that value.
- This property contains the name for the output array containing the result of this computation.
- This property determines what array type to output. The default is a vtkDoubleArray.
- Set whether to output results as point/cell normals. Outputting as normals is only valid with vector results. Point or cell normals are selected using AttributeMode.
- Set whether to output results as point/cell texture coordinates. Point or cell texture coordinates are selected using AttributeMode. 2-component texture coordinates cannot be generated at this time.
- Returns cell data information
- Returns field data information
- Returns point data information
- dictionary for instance variables (if defined)
- list of weak references to the object (if defined)
Initialize = aInitialize(self, connection=None, update=True)
- Called when the filename of a source proxy is changed.
- Returns the associated cell data information.
- GetDataInformation(self, idx=None)
- This method returns a DataInformation wrapper around a vtkPVDataInformation
- Returns the associated cell data information.
- Returns the associated point data information.
- UpdatePipeline(self, time=None)
- This method updates the server-side VTK pipeline and the associated data information. Make sure to update a source to validate the output meta-data.
- This method updates the meta-data of the server-side VTK pipeline and the associated information properties
- __getitem__(self, idx)
- Given a slice, int or string, returns the corresponding output port
- GetProperty(self, name)
- Given a property name, returns the property object.
- GetPropertyValue(self, name)
- Returns a scalar for properties with 1 elements, the property itself for vectors.
- InitializeFromProxy(self, aProxy, update=True)
- Constructor. Assigns proxy to self.SMProxy, updates the server object as well as register the proxy in _pyproxies dictionary.
- Returns a list of all property names on this proxy.
- SetPropertyWithName(self, pname, arg)
- Generic method for setting the value of a property.
- Destructor. Cleans up all observers as well as remove the proxy from the _pyproxies dictionary
- __eq__(self, other)
- Returns true if the underlying SMProxies are the same.
- __getattr__(self, name)
- With the exception of a few overloaded methods, returns the SMProxy method
- Return hash(self).
- __init__(self, **args)
- Default constructor. It can be used to initialize properties by passing keyword arguments where the key is the name of the property. In addition registrationGroup and registrationName (optional) can be specified (as keyword arguments) to automatically register the proxy with the proxy manager.
- Creates an iterator for the properties.
- __ne__(self, other)
- Returns false if the underlying SMProxies are the same.
- __setattr__(self, name, value)
- Implement setattr(self, name, value).
add_attribute(self, name, value)
For the full list of servermanager proxies, please refer to Available readers, sources, writers, filters and animation cues