#include <vtkSelection.h>
vtkSelection is a tree data structure used to store selection parameters. Each node in this tree stores a list of properties (in a vtkInformation) and a list of selection values (in a vtkAbstractArray). The properties provide information about what the selection values mean. For example the CONTENT_TYPE property gives information about what is stored by the node. If the CONTENT_TYPE is SELECTIONS, the vtkSelection is used as a parent node that contains other vtkSelections. If the CONTENT_TYPE is GLOBALIDS, the SelectionList array should contain a list of cell or point ids, which identify the particular cells or points that have matching values in the GLOBALID vtkDataSetAttribute array. If the CONTENT_TYPE is PEDIGREEIDS, the SelectionList array should contain a list of cell or point ids, which identify the particular cells or points that have matching valuse in the PEDIGREEID vtkDataSetAttribute array. The FIELD_TYPE property designates whether the selection refers to cells or points.
Usually, each node under the root is a selection from one data object. SOURCE or SOURCE_ID properties point to this object. If the selection was performed on a renderer, PROP or PROP_ID point to the prop the selection was made on. Selection nodes corresponding to composite datasets may contain child nodes. Each child node of a composite dataset should have COMPOSITE_INDEX set. This is the flat-index to identify a node with in the composite dataset to which the selection applies.
Definition at line 65 of file vtkSelection.h.
Definition at line 170 of file vtkSelection.h.
vtkSelection::vtkSelection | ( | ) | [protected] |
vtkSelection::~vtkSelection | ( | ) | [protected] |
virtual const char* vtkSelection::GetClassName | ( | ) | [virtual] |
Reimplemented from vtkDataObject.
static int vtkSelection::IsTypeOf | ( | const char * | name | ) | [static] |
Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h.
Reimplemented from vtkDataObject.
virtual int vtkSelection::IsA | ( | const char * | name | ) | [virtual] |
Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h.
Reimplemented from vtkDataObject.
static vtkSelection* vtkSelection::SafeDownCast | ( | vtkObject * | o | ) | [static] |
Reimplemented from vtkDataObject.
void vtkSelection::PrintSelf | ( | ostream & | os, | |
vtkIndent | indent | |||
) | [virtual] |
Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.
Reimplemented from vtkDataObject.
static vtkSelection* vtkSelection::New | ( | ) | [static] |
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
Reimplemented from vtkDataObject.
virtual void vtkSelection::Initialize | ( | ) | [virtual] |
Restore data object to initial state,
Reimplemented from vtkDataObject.
virtual int vtkSelection::GetDataObjectType | ( | ) | [inline, virtual] |
Returns VTK_SELECTION enumeration value.
Reimplemented from vtkDataObject.
Definition at line 76 of file vtkSelection.h.
virtual void vtkSelection::SetSelectionList | ( | vtkAbstractArray * | ) | [virtual] |
Sets the selection list.
virtual vtkAbstractArray* vtkSelection::GetSelectionList | ( | ) | [virtual] |
Returns the selection list.
virtual void vtkSelection::SetSelectionData | ( | vtkFieldData * | data | ) | [inline, virtual] |
Sets the selection table.
Definition at line 85 of file vtkSelection.h.
virtual vtkFieldData* vtkSelection::GetSelectionData | ( | ) | [inline, virtual] |
Returns the selection table.
Definition at line 88 of file vtkSelection.h.
virtual vtkInformation* vtkSelection::GetProperties | ( | ) | [virtual] |
Returns the property map.
unsigned int vtkSelection::GetNumberOfChildren | ( | ) |
Returns the number of children.
virtual vtkSelection* vtkSelection::GetChild | ( | unsigned int | idx | ) | [virtual] |
Returns a child given it's index. Performs bound checking and will return 0 if out-of-bounds.
virtual vtkSelection* vtkSelection::GetParentNode | ( | ) | [inline, virtual] |
Returns the parent of the selection node unless it is root. A child does not keep a reference to the parent to avoid reference loops.
Definition at line 105 of file vtkSelection.h.
virtual void vtkSelection::AddChild | ( | vtkSelection * | ) | [virtual] |
Adds a child node. If the node is already a child, it is not added a second time. Note that a node can be a child of only one node at a time. This method will also set the parent of the passed node to this.
virtual void vtkSelection::RemoveChild | ( | unsigned int | idx | ) | [virtual] |
Removes a child. It will also set the parent of the removed child to be 0.
virtual void vtkSelection::RemoveChild | ( | vtkSelection * | ) | [virtual] |
Removes a child. It will also set the parent of the removed child to be 0.
virtual void vtkSelection::RemoveAllChildren | ( | ) | [virtual] |
Removes a child. It will also set the parent of the removed child to be 0.
virtual void vtkSelection::Clear | ( | ) | [virtual] |
Removes all properties and children. Removes selection list array. Does not change parent node.
virtual void vtkSelection::DeepCopy | ( | vtkDataObject * | src | ) | [virtual] |
Copy properties, selection list and children of the input.
Reimplemented from vtkDataObject.
virtual void vtkSelection::ShallowCopy | ( | vtkDataObject * | src | ) | [virtual] |
Copy properties, selection list and children of the input. This is a shallow copy: selection lists and pointers in the properties are passed by reference.
Reimplemented from vtkDataObject.
virtual void vtkSelection::CopyChildren | ( | vtkSelection * | ) | [virtual] |
Add the children of the given selection to this one. This requires that both selection objects have a SELECTIONS CONTENT_TYPE. Note that this does not check if a child with exact same properties exists before adding. If any child node that contains other selections is found in the input, it's children are added to a selection node of the same SOURCE_ID or PROP_ID. This handles the case of assemblies and composite datasets.
virtual void vtkSelection::Union | ( | vtkSelection * | selection | ) | [virtual] |
Union this selection with the specified selection. The selection types must be identical.
unsigned long vtkSelection::GetMTime | ( | ) | [virtual] |
Return the MTime taking into account changes to the properties
Reimplemented from vtkDataObject.
static vtkInformationIntegerKey* vtkSelection::CONTENT_TYPE | ( | ) | [static] |
Get the (primary) property that describes the content of a selection node's data. Other auxiliary description properties follow. SELECTIONS means that a vtkSelection contains sub selections. GLOBALIDS means that the selection list contains values from the vtkDataSetAttribute array of the same name. PEDIGREEIDS means that the selection list contains values from the vtkDataSetAttribute array of the same name. VALUES means the the selection list contains values from an arbitrary attribute array (ignores any globalids attribute) INDICES means that the selection list contains indexes into the cell or point arrays. FRUSTUM means the set of points and cells inside a frustum LOCATIONS means the set of points and cells near a set of positions THRESHOLDS means the points and cells with values within a set of ranges GetContentType() returns -1 if the content type is not set.
virtual void vtkSelection::SetContentType | ( | int | type | ) | [virtual] |
Get or set the content type of the selection. This is the same as setting the CONTENT_TYPE() key on the property.
virtual int vtkSelection::GetContentType | ( | ) | [virtual] |
Get or set the content type of the selection. This is the same as setting the CONTENT_TYPE() key on the property.
static vtkInformationIntegerKey* vtkSelection::FIELD_TYPE | ( | ) | [static] |
Controls whether cell, point, or field data determine what is inside and out. The default is CELL. Vertex and edge types are also available for graph classes. GetFieldType() returns -1 if the field type is not set.
virtual void vtkSelection::SetFieldType | ( | int | type | ) | [virtual] |
Get or set the field type of the selection. This is the same as setting the FIELD_TYPE() key on the property.
virtual int vtkSelection::GetFieldType | ( | ) | [virtual] |
Get or set the field type of the selection. This is the same as setting the FIELD_TYPE() key on the property.
static vtkInformationDoubleKey* vtkSelection::EPSILON | ( | ) | [static] |
For location selection of points, if distance is greater than this reject.
static vtkInformationIntegerKey* vtkSelection::CONTAINING_CELLS | ( | ) | [static] |
This flag tells the extraction filter, when FIELD_TYPE==POINT, that it should also extract the cells that contain any of the extracted points.
static vtkInformationIntegerKey* vtkSelection::INVERSE | ( | ) | [static] |
This flag tells the extraction filter to exclude the selection.
static vtkInformationIntegerKey* vtkSelection::PIXEL_COUNT | ( | ) | [static] |
A helper for visible cell selector, this is the number of pixels covered by the actor whose cells are listed in the selection.
static vtkInformationObjectBaseKey* vtkSelection::SOURCE | ( | ) | [static] |
Pointer to the data or algorithm the selection belongs to.
static vtkInformationIntegerKey* vtkSelection::SOURCE_ID | ( | ) | [static] |
ID of the data or algorithm the selection belongs to. What ID means is application specific.
static vtkInformationObjectBaseKey* vtkSelection::PROP | ( | ) | [static] |
Pointer to the prop the selection belongs to.
static vtkInformationIntegerKey* vtkSelection::PROP_ID | ( | ) | [static] |
ID of the prop the selection belongs to. What ID means is application specific.
static vtkInformationIntegerKey* vtkSelection::PROCESS_ID | ( | ) | [static] |
Process id the selection is on.
static vtkInformationIntegerKey* vtkSelection::COMPOSITE_INDEX | ( | ) | [static] |
Used to identify a node in composite datasets.
static vtkInformationIntegerKey* vtkSelection::HIERARCHICAL_LEVEL | ( | ) | [static] |
Used to identify a dataset in a hiererchical box dataset.
static vtkInformationIntegerKey* vtkSelection::HIERARCHICAL_INDEX | ( | ) | [static] |
Used to identify a dataset in a hiererchical box dataset.
static vtkInformationIntegerKey* vtkSelection::INDEXED_VERTICES | ( | ) | [static] |
This key is used when making visible vertex selection. It means that the cell ID selection has data about which vertices for each cell are visible.
static vtkSelection* vtkSelection::GetData | ( | vtkInformation * | info | ) | [static] |
Retrieve a vtkSelection stored inside an invormation object.
Reimplemented from vtkDataObject.
static vtkSelection* vtkSelection::GetData | ( | vtkInformationVector * | v, | |
int | i = 0 | |||
) | [static] |
Retrieve a vtkSelection stored inside an invormation object.
Reimplemented from vtkDataObject.
void vtkSelection::UnionSelectionList | ( | vtkSelection * | other | ) | [protected] |
Merges the selection list between self and the other. Assumes that both has identical properties.
bool vtkSelection::EqualProperties | ( | vtkSelection * | other, | |
bool | fullcompare = true | |||
) | [protected] |
Compares Properties of self and other to ensure that they are exactly same.
vtkInformation* vtkSelection::Properties [protected] |
Definition at line 281 of file vtkSelection.h.
vtkSelection* vtkSelection::ParentNode [protected] |
Definition at line 282 of file vtkSelection.h.