FreeMat: vtkApplyIcons

FreeMat

- Main Page
- Related Pages

vtkApplyIcons

Section: Visualization Toolkit Infovis Classes

# Usage

vtkApplyIcons performs a iconing of the dataset using default icons, lookup tables, annotations, and/or a selection. The output is a vtkIntArray containing the icon index for each element in the dataset. The first input is the dataset to be iconed, which may be a vtkTable, vtkGraph subclass, or vtkDataSet subclass.

The second (optional) input is a vtkAnnotationLayers object, which stores a list of annotation layers, with each layer holding a list of vtkAnnotation objects. The annotation specifies a subset of data along with other properties, including icon. For annotations with icon properties, this algorithm will use the icon index of annotated elements, using a "top one wins" strategy.

The third (optional) input is a vtkSelection object, meant for specifying the current selection. You can control the icon of the selection, or whether there is a set of selected icons at a particular offset in the icon sheet.

The algorithm takes an input array, specified with SetInputArrayToProcess(0, 0, 0, vtkDataObject::FIELD_ASSOCIATION_POINTS, name) This sets data arrays to use to icon the data with the associated lookup table. For vtkGraph and vtkTable inputs, you would use FIELD_ASSOCIATION_VERTICES, FIELD_ASSOCIATION_EDGES, or FIELD_ASSOCIATION_ROWS as appropriate. The icon array will be added to the same set of attributes that the input array came from. If there is no input array, the icon array will be applied to the attributes associated with the AttributeType parameter.

Icons are assigned with the following priorities:

1. If an item is part of the selection, it is glyphed with that icon.
2. Otherwise, if the item is part of an annotation, it is glyphed with the icon of the final (top) annotation in the set of layers.
3. Otherwise, if a lookup table is used, it is glyphed using the lookup table icon for the data value of the element.
4. Otherwise it will be glyphed with the default icon.

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

      obj = vtkApplyIcons

# Methods

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

- `string = obj.GetClassName ()`
- `int = obj.IsA (string name)`
- `vtkApplyIcons = obj.NewInstance ()`
- `vtkApplyIcons = obj.SafeDownCast (vtkObject o)`
- `obj.SetIconType (double v, int icon)` - Edits the lookup table to use for point icons. This is only used if input array 0 is set and UsePointLookupTable is on.
- `obj.SetIconType (string v, int icon)` - Edits the lookup table to use for point icons. This is only used if input array 0 is set and UsePointLookupTable is on.
- `obj.ClearAllIconTypes ()` - Edits the lookup table to use for point icons. This is only used if input array 0 is set and UsePointLookupTable is on.
- `obj.SetUseLookupTable (bool )` - If on, uses the point lookup table to set the colors of unannotated, unselected elements of the data.
- `bool = obj.GetUseLookupTable ()` - If on, uses the point lookup table to set the colors of unannotated, unselected elements of the data.
- `obj.UseLookupTableOn ()` - If on, uses the point lookup table to set the colors of unannotated, unselected elements of the data.
- `obj.UseLookupTableOff ()` - If on, uses the point lookup table to set the colors of unannotated, unselected elements of the data.
- `obj.SetDefaultIcon (int )` - The default point icon for all unannotated, unselected elements of the data. This is used if UsePointLookupTable is off.
- `int = obj.GetDefaultIcon ()` - The default point icon for all unannotated, unselected elements of the data. This is used if UsePointLookupTable is off.
- `obj.SetSelectedIcon (int )` - The point icon for all selected elements of the data. This is used if the annotation input has a current selection.
- `int = obj.GetSelectedIcon ()` - The point icon for all selected elements of the data. This is used if the annotation input has a current selection.
- `obj.SetIconOutputArrayName (string )` - The output array name for the point icon index array. Default is "vtkApplyIcons icon".
- `string = obj.GetIconOutputArrayName ()` - The output array name for the point icon index array. Default is "vtkApplyIcons icon".
- `obj.SetSelectionMode (int )` - Changes the behavior of the icon to use for selected items.
  - SELECTED_ICON uses SelectedIcon as the icon for all selected elements.
  - SELECTED_OFFSET uses SelectedIcon as an offset to add to all selected elements.
  - ANNOTATION_ICON uses the ICON_INDEX() property of the current annotation.
  - IGNORE_SELECTION does not change the icon based on the current selection.
  The default is IGNORE_SELECTION.
- `int = obj.GetSelectionMode ()` - Changes the behavior of the icon to use for selected items.
  - SELECTED_ICON uses SelectedIcon as the icon for all selected elements.
  - SELECTED_OFFSET uses SelectedIcon as an offset to add to all selected elements.
  - ANNOTATION_ICON uses the ICON_INDEX() property of the current annotation.
  - IGNORE_SELECTION does not change the icon based on the current selection.
  The default is IGNORE_SELECTION.
- `obj.SetSelectionModeToSelectedIcon ()` - Changes the behavior of the icon to use for selected items.
  - SELECTED_ICON uses SelectedIcon as the icon for all selected elements.
  - SELECTED_OFFSET uses SelectedIcon as an offset to add to all selected elements.
  - ANNOTATION_ICON uses the ICON_INDEX() property of the current annotation.
  - IGNORE_SELECTION does not change the icon based on the current selection.
  The default is IGNORE_SELECTION.
- `obj.SetSelectionModeToSelectedOffset ()` - Changes the behavior of the icon to use for selected items.
  - SELECTED_ICON uses SelectedIcon as the icon for all selected elements.
  - SELECTED_OFFSET uses SelectedIcon as an offset to add to all selected elements.
  - ANNOTATION_ICON uses the ICON_INDEX() property of the current annotation.
  - IGNORE_SELECTION does not change the icon based on the current selection.
  The default is IGNORE_SELECTION.
- `obj.SetSelectionModeToAnnotationIcon ()` - Changes the behavior of the icon to use for selected items.
  - SELECTED_ICON uses SelectedIcon as the icon for all selected elements.
  - SELECTED_OFFSET uses SelectedIcon as an offset to add to all selected elements.
  - ANNOTATION_ICON uses the ICON_INDEX() property of the current annotation.
  - IGNORE_SELECTION does not change the icon based on the current selection.
  The default is IGNORE_SELECTION.
- `obj.SetSelectionModeToIgnoreSelection ()` - The attribute type to append the icon array to, used only if the input array is not specified or does not exist. This is set to one of the AttributeTypes enum in vtkDataObject (e.g. POINT, CELL, VERTEX EDGE, FIELD).
- `obj.SetAttributeType (int )` - The attribute type to append the icon array to, used only if the input array is not specified or does not exist. This is set to one of the AttributeTypes enum in vtkDataObject (e.g. POINT, CELL, VERTEX EDGE, FIELD).
- `int = obj.GetAttributeType ()` - The attribute type to append the icon array to, used only if the input array is not specified or does not exist. This is set to one of the AttributeTypes enum in vtkDataObject (e.g. POINT, CELL, VERTEX EDGE, FIELD).