FreeMat
|
Section: Visualization Toolkit Graphics Classes
vtkMergeFields is used to merge mutliple field into one. The new field is put in the same field data as the original field. For example
mf->SetOutputField("foo", vtkMergeFields::POINT_DATA); mf->SetNumberOfComponents(2); mf->Merge(0, "array1", 1); mf->Merge(1, "array2", 0);
will tell vtkMergeFields to use the 2nd component of array1 and the 1st component of array2 to create a 2 component field called foo. The same can be done using Tcl:
mf SetOutputField foo POINT_DATA mf Merge 0 array1 1 mf Merge 1 array2 0 Field locations: DATA_OBJECT, POINT_DATA, CELL_DATA
To create an instance of class vtkMergeFields, simply invoke its constructor as follows
obj = vtkMergeFields
The class vtkMergeFields 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 vtkMergeFields class.
string = obj.GetClassName ()
int = obj.IsA (string name)
vtkMergeFields = obj.NewInstance ()
vtkMergeFields = obj.SafeDownCast (vtkObject o)
obj.SetOutputField (string name, int fieldLoc)
- The output field will have the given name and it will be in fieldLoc (the input fields also have to be in fieldLoc). obj.SetOutputField (string name, string fieldLoc)
- Helper method used by the other language bindings. Allows the caller to specify arguments as strings instead of enums.Returns an operation id which can later be used to remove the operation. obj.Merge (int component, string arrayName, int sourceComp)
- Add a component (arrayName,sourceComp) to the output field. obj.SetNumberOfComponents (int )
- Set the number of the components in the output field. This has to be set before execution. Default value is 0. int = obj.GetNumberOfComponents ()
- Set the number of the components in the output field. This has to be set before execution. Default value is 0.