FreeMat: vtkMergeColumns

FreeMat

- Main Page
- Related Pages

vtkMergeColumns

Section: Visualization Toolkit Infovis Classes

# Usage

vtkMergeColumns replaces two columns in a table with a single column containing data in both columns. The columns are set using

SetInputArrayToProcess(0, 0, 0, vtkDataObject::FIELD_ASSOCIATION_ROWS, "col1")

and

SetInputArrayToProcess(1, 0, 0, vtkDataObject::FIELD_ASSOCIATION_ROWS, "col2")

where "col1" and "col2" are the names of the columns to merge. The user may also specify the name of the merged column. The arrays must be of the same type. If the arrays are numeric, the values are summed in the merged column. If the arrays are strings, the values are concatenated. The strings are separated by a space if they are both nonempty.

To create an instance of class vtkMergeColumns, simply invoke its constructor as follows

      obj = vtkMergeColumns

# Methods

The class vtkMergeColumns 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 vtkMergeColumns class.

- `string = obj.GetClassName ()`
- `int = obj.IsA (string name)`
- `vtkMergeColumns = obj.NewInstance ()`
- `vtkMergeColumns = obj.SafeDownCast (vtkObject o)`
- `obj.SetMergedColumnName (string )` - The name to give the merged column created by this filter.
- `string = obj.GetMergedColumnName ()` - The name to give the merged column created by this filter.