VTK
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
vtkSelectionNode Class Reference

A node in a selection tree. More...

#include <vtkSelectionNode.h>

Inheritance diagram for vtkSelectionNode:
[legend]
Collaboration diagram for vtkSelectionNode:
[legend]

Public Types

enum  SelectionContent {
  SELECTIONS, GLOBALIDS, PEDIGREEIDS, VALUES,
  INDICES, FRUSTUM, LOCATIONS, THRESHOLDS,
  BLOCKS, QUERY, USER
}
 Indicate the means by which data is selected. More...
 
enum  SelectionField {
  CELL, POINT, FIELD, VERTEX,
  EDGE, ROW
}
 Indicate the types of entities to which the selection-data applies. More...
 
typedef vtkObject Superclass
 

Public Member Functions

virtual vtkTypeBool IsA (const char *type)
 Return 1 if this class is the same type of (or a subclass of) the named class. More...
 
vtkSelectionNodeNewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent) override
 Methods invoked by print to print information about the object including superclasses. More...
 
virtual void Initialize ()
 Restore data object to initial state,. More...
 
virtual void DeepCopy (vtkSelectionNode *src)
 Copy properties, selection list and children of the input. More...
 
virtual void ShallowCopy (vtkSelectionNode *src)
 Copy properties, selection list and children of the input. More...
 
vtkMTimeType GetMTime () override
 Return the MTime taking into account changes to the properties. More...
 
void UnionSelectionList (vtkSelectionNode *other)
 Merges the selection list between self and the other. More...
 
void SubtractSelectionList (vtkSelectionNode *other)
 Subtracts the items in the selection list, other, from this selection list. More...
 
bool EqualProperties (vtkSelectionNode *other, bool fullcompare=true)
 Compares Properties of self and other to ensure that they are exactly same. More...
 
virtual void SetSelectionList (vtkAbstractArray *)
 Sets the selection list. More...
 
virtual vtkAbstractArrayGetSelectionList ()
 Sets the selection list. More...
 
virtual void SetSelectionData (vtkDataSetAttributes *data)
 Sets the selection table. More...
 
virtual vtkDataSetAttributesGetSelectionData ()
 Sets the selection table. More...
 
virtual vtkInformationGetProperties ()
 Returns the property map. More...
 
virtual void SetContentType (int type)
 Get or set the content type of the selection. More...
 
virtual int GetContentType ()
 Get or set the content type of the selection. More...
 
virtual void SetFieldType (int type)
 Get or set the field type of the selection. More...
 
virtual int GetFieldType ()
 Get or set the field type of the selection. More...
 
virtual void SetQueryString (const char *)
 Set/Get the query expression string. More...
 
virtual char * GetQueryString ()
 Set/Get the query expression string. More...
 
- Public Member Functions inherited from vtkObject
 vtkBaseTypeMacro (vtkObject, vtkObjectBase)
 
virtual void DebugOn ()
 Turn debugging output on. More...
 
virtual void DebugOff ()
 Turn debugging output off. More...
 
bool GetDebug ()
 Get the value of the debug flag. More...
 
void SetDebug (bool debugFlag)
 Set the value of the debug flag. More...
 
virtual void Modified ()
 Update the modification time for this object. More...
 
void RemoveObserver (unsigned long tag)
 
void RemoveObservers (unsigned long event)
 
void RemoveObservers (const char *event)
 
void RemoveAllObservers ()
 
vtkTypeBool HasObserver (unsigned long event)
 
vtkTypeBool HasObserver (const char *event)
 
int InvokeEvent (unsigned long event)
 
int InvokeEvent (const char *event)
 
unsigned long AddObserver (unsigned long event, vtkCommand *, float priority=0.0f)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
unsigned long AddObserver (const char *event, vtkCommand *, float priority=0.0f)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
vtkCommandGetCommand (unsigned long tag)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
void RemoveObserver (vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
void RemoveObservers (unsigned long event, vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
void RemoveObservers (const char *event, vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
vtkTypeBool HasObserver (unsigned long event, vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
vtkTypeBool HasObserver (const char *event, vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f)
 Overloads to AddObserver that allow developers to add class member functions as callbacks for events. More...
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 Overloads to AddObserver that allow developers to add class member functions as callbacks for events. More...
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 Allow user to set the AbortFlagOn() with the return value of the callback method. More...
 
int InvokeEvent (unsigned long event, void *callData)
 This method invokes an event and return whether the event was aborted or not. More...
 
int InvokeEvent (const char *event, void *callData)
 This method invokes an event and return whether the event was aborted or not. More...
 
- Public Member Functions inherited from vtkObjectBase
const char * GetClassName () const
 Return the class name as a string. More...
 
virtual void Delete ()
 Delete a VTK object. More...
 
virtual void FastDelete ()
 Delete a reference to this object. More...
 
void InitializeObjectBase ()
 
void Print (ostream &os)
 Print an object to an ostream. More...
 
virtual void Register (vtkObjectBase *o)
 Increase the reference count (mark as used by another object). More...
 
virtual void UnRegister (vtkObjectBase *o)
 Decrease the reference count (release by another object). More...
 
int GetReferenceCount ()
 Return the current reference count of this object. More...
 
void SetReferenceCount (int)
 Sets the reference count. More...
 
void PrintRevisions (ostream &)
 Legacy. More...
 
virtual void PrintHeader (ostream &os, vtkIndent indent)
 Methods invoked by print to print information about the object including superclasses. More...
 
virtual void PrintTrailer (ostream &os, vtkIndent indent)
 Methods invoked by print to print information about the object including superclasses. More...
 

Static Public Member Functions

static vtkTypeBool IsTypeOf (const char *type)
 
static vtkSelectionNodeSafeDownCast (vtkObjectBase *o)
 
static vtkSelectionNodeNew ()
 
static vtkInformationIntegerKeyCONTENT_TYPE ()
 Get the (primary) property that describes the content of a selection node's data. More...
 
static vtkInformationIntegerKeyFIELD_TYPE ()
 Controls whether cell, point, or field data determine what is inside and out. More...
 
static vtkInformationDoubleKeyEPSILON ()
 For location selection of points, if distance is greater than this reject. More...
 
static vtkInformationDoubleKeyZBUFFER_VALUE ()
 If present, closest zbuffer value of this selection. More...
 
static vtkInformationIntegerKeyCONTAINING_CELLS ()
 This flag tells the extraction filter, when FIELD_TYPE==POINT, that it should also extract the cells that contain any of the extracted points. More...
 
static vtkInformationIntegerKeyCOMPONENT_NUMBER ()
 When ContentType==THRESHOLDS or ContentType==VALUES i.e. More...
 
static vtkInformationIntegerKeyINVERSE ()
 This flag tells the extraction filter to exclude the selection. More...
 
static vtkInformationIntegerKeyPIXEL_COUNT ()
 A helper for visible cell selector, this is the number of pixels covered by the actor whose cells are listed in the selection. More...
 
static vtkInformationObjectBaseKeySOURCE ()
 Pointer to the data or algorithm the selection belongs to. More...
 
static vtkInformationIntegerKeySOURCE_ID ()
 ID of the data or algorithm the selection belongs to. More...
 
static vtkInformationObjectBaseKeyPROP ()
 Pointer to the prop the selection belongs to. More...
 
static vtkInformationIntegerKeyPROP_ID ()
 ID of the prop the selection belongs to. More...
 
static vtkInformationIntegerKeyPROCESS_ID ()
 Process id the selection is on. More...
 
static vtkInformationIntegerKeyCOMPOSITE_INDEX ()
 Used to identify a node in composite datasets. More...
 
static vtkInformationIntegerKeyINDEXED_VERTICES ()
 This key is used when making visible vertex selection. More...
 
static int ConvertSelectionFieldToAttributeType (int val)
 Methods to convert vtkSelectionNode::SelectionField to vtkDataSetAttribute::AttributeTypes and vice-versa. More...
 
static int ConvertAttributeTypeToSelectionField (int val)
 Methods to convert vtkSelectionNode::SelectionField to vtkDataSetAttribute::AttributeTypes and vice-versa. More...
 
static vtkInformationIntegerKeyHIERARCHICAL_LEVEL ()
 Used to identify a dataset in a hiererchical box dataset. More...
 
static vtkInformationIntegerKeyHIERARCHICAL_INDEX ()
 Used to identify a dataset in a hiererchical box dataset. More...
 
- Static Public Member Functions inherited from vtkObject
static vtkObjectNew ()
 Create an object with Debug turned off, modified time initialized to zero, and reference counting on. More...
 
static void BreakOnError ()
 This method is called when vtkErrorMacro executes. More...
 
static void SetGlobalWarningDisplay (int val)
 This is a global flag that controls whether any debug, warning or error messages are displayed. More...
 
static void GlobalWarningDisplayOn ()
 This is a global flag that controls whether any debug, warning or error messages are displayed. More...
 
static void GlobalWarningDisplayOff ()
 This is a global flag that controls whether any debug, warning or error messages are displayed. More...
 
static int GetGlobalWarningDisplay ()
 This is a global flag that controls whether any debug, warning or error messages are displayed. More...
 
- Static Public Member Functions inherited from vtkObjectBase
static vtkTypeBool IsTypeOf (const char *name)
 Return 1 if this class type is the same type of (or a subclass of) the named class. More...
 
static vtkObjectBaseNew ()
 Create an object with Debug turned off, modified time initialized to zero, and reference counting on. More...
 

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 
 vtkSelectionNode ()
 
 ~vtkSelectionNode () override
 
- Protected Member Functions inherited from vtkObject
 vtkObject ()
 
 ~vtkObject () override
 
void RegisterInternal (vtkObjectBase *, vtkTypeBool check) override
 
void UnRegisterInternal (vtkObjectBase *, vtkTypeBool check) override
 
void InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=nullptr)
 These methods allow a command to exclusively grab all events. More...
 
void InternalReleaseFocus ()
 These methods allow a command to exclusively grab all events. More...
 
- Protected Member Functions inherited from vtkObjectBase
 vtkObjectBase ()
 
virtual ~vtkObjectBase ()
 
virtual void CollectRevisions (ostream &)
 
virtual void ReportReferences (vtkGarbageCollector *)
 
 vtkObjectBase (const vtkObjectBase &)
 
void operator= (const vtkObjectBase &)
 

Protected Attributes

vtkInformationProperties
 
vtkDataSetAttributesSelectionData
 
char * QueryString
 
- Protected Attributes inherited from vtkObject
bool Debug
 
vtkTimeStamp MTime
 
vtkSubjectHelper * SubjectHelper
 
- Protected Attributes inherited from vtkObjectBase
vtkAtomicInt32 ReferenceCount
 
vtkWeakPointerBase ** WeakPointers
 

Detailed Description

A node in a selection tree.

Used to store selection results.

vtkSelectionNode stores selection parameters for a selection (or part of a selection). It 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 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 values 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.

Warning
No SelectionList is created by default. It should be assigned.
Examples:
vtkSelectionNode (Examples)
Tests:
vtkSelectionNode (Tests)

Definition at line 67 of file vtkSelectionNode.h.

Member Typedef Documentation

Definition at line 70 of file vtkSelectionNode.h.

Member Enumeration Documentation

Indicate the means by which data is selected.

In some cases this implies the type of data selected.

Enumerator
SELECTIONS 

Deprecated.

GLOBALIDS 

Select entities called out by their globally-unique IDs.

PEDIGREEIDS 

Select entities that have some identifiable pedigree.

VALUES 

Select entities that take on specific array values.

INDICES 

Select entities by their offsets into the dataset.

FRUSTUM 

Select entities contained within a viewing frustum.

LOCATIONS 

Select entities near the supplied world coordinates.

THRESHOLDS 

Select entities whose array values fall within a given threshold.

BLOCKS 

Select blocks within a composite dataset by their flat index.

QUERY 

Select entities with a text query.

USER 

Select entities with user-supplied, application-specific logic.

Definition at line 133 of file vtkSelectionNode.h.

Indicate the types of entities to which the selection-data applies.

Enumerator
CELL 

The selection data provided is cell-data.

POINT 

The selection data provided is point-data.

FIELD 

The selection data provided is field-data.

VERTEX 

The selection data provided is graph vertex-data.

EDGE 

The selection data provided is graph edge-data.

ROW 

The selection data provided is table row-data.

Definition at line 166 of file vtkSelectionNode.h.

Constructor & Destructor Documentation

vtkSelectionNode::vtkSelectionNode ( )
protected
vtkSelectionNode::~vtkSelectionNode ( )
overrideprotected

Member Function Documentation

static vtkTypeBool vtkSelectionNode::IsTypeOf ( const char *  type)
static
virtual vtkTypeBool vtkSelectionNode::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 vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkObjectBase.

static vtkSelectionNode* vtkSelectionNode::SafeDownCast ( vtkObjectBase o)
static
virtual vtkObjectBase* vtkSelectionNode::NewInstanceInternal ( ) const
protectedvirtual
vtkSelectionNode* vtkSelectionNode::NewInstance ( ) const
void vtkSelectionNode::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
overridevirtual

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 vtkObject.

static vtkSelectionNode* vtkSelectionNode::New ( )
static
virtual void vtkSelectionNode::Initialize ( )
virtual

Restore data object to initial state,.

virtual void vtkSelectionNode::SetSelectionList ( vtkAbstractArray )
virtual

Sets the selection list.

virtual vtkAbstractArray* vtkSelectionNode::GetSelectionList ( )
virtual

Sets the selection list.

virtual void vtkSelectionNode::SetSelectionData ( vtkDataSetAttributes data)
virtual

Sets the selection table.

virtual vtkDataSetAttributes* vtkSelectionNode::GetSelectionData ( )
virtual

Sets the selection table.

virtual vtkInformation* vtkSelectionNode::GetProperties ( )
virtual

Returns the property map.

virtual void vtkSelectionNode::DeepCopy ( vtkSelectionNode src)
virtual

Copy properties, selection list and children of the input.

virtual void vtkSelectionNode::ShallowCopy ( vtkSelectionNode 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.

vtkMTimeType vtkSelectionNode::GetMTime ( )
overridevirtual

Return the MTime taking into account changes to the properties.

Reimplemented from vtkObject.

static vtkInformationIntegerKey* vtkSelectionNode::CONTENT_TYPE ( )
static

Get the (primary) property that describes the content of a selection node's data.

This key takes on values from the SelectionContent enum. GetContentType() returns -1 if the content type is not set.

See also
vtkSelectionNode::SelectionContent
virtual void vtkSelectionNode::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 vtkSelectionNode::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* vtkSelectionNode::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 vtkSelectionNode::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 vtkSelectionNode::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 int vtkSelectionNode::ConvertSelectionFieldToAttributeType ( int  val)
static

Methods to convert vtkSelectionNode::SelectionField to vtkDataSetAttribute::AttributeTypes and vice-versa.

static int vtkSelectionNode::ConvertAttributeTypeToSelectionField ( int  val)
static

Methods to convert vtkSelectionNode::SelectionField to vtkDataSetAttribute::AttributeTypes and vice-versa.

virtual void vtkSelectionNode::SetQueryString ( const char *  )
virtual

Set/Get the query expression string.

virtual char* vtkSelectionNode::GetQueryString ( )
virtual

Set/Get the query expression string.

static vtkInformationDoubleKey* vtkSelectionNode::EPSILON ( )
static

For location selection of points, if distance is greater than this reject.

static vtkInformationDoubleKey* vtkSelectionNode::ZBUFFER_VALUE ( )
static

If present, closest zbuffer value of this selection.

static vtkInformationIntegerKey* vtkSelectionNode::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* vtkSelectionNode::COMPONENT_NUMBER ( )
static

When ContentType==THRESHOLDS or ContentType==VALUES i.e.

threshold and value based selections, it is possible pick the component number using this key. If none is specified, the 0th component is used. If any number less than 0 is specified, then the magnitude is used.

static vtkInformationIntegerKey* vtkSelectionNode::INVERSE ( )
static

This flag tells the extraction filter to exclude the selection.

static vtkInformationIntegerKey* vtkSelectionNode::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* vtkSelectionNode::SOURCE ( )
static

Pointer to the data or algorithm the selection belongs to.

static vtkInformationIntegerKey* vtkSelectionNode::SOURCE_ID ( )
static

ID of the data or algorithm the selection belongs to.

What ID means is application specific.

static vtkInformationObjectBaseKey* vtkSelectionNode::PROP ( )
static

Pointer to the prop the selection belongs to.

static vtkInformationIntegerKey* vtkSelectionNode::PROP_ID ( )
static

ID of the prop the selection belongs to.

What ID means is application specific.

static vtkInformationIntegerKey* vtkSelectionNode::PROCESS_ID ( )
static

Process id the selection is on.

static vtkInformationIntegerKey* vtkSelectionNode::COMPOSITE_INDEX ( )
static

Used to identify a node in composite datasets.

static vtkInformationIntegerKey* vtkSelectionNode::HIERARCHICAL_LEVEL ( )
static

Used to identify a dataset in a hiererchical box dataset.

static vtkInformationIntegerKey* vtkSelectionNode::HIERARCHICAL_INDEX ( )
static

Used to identify a dataset in a hiererchical box dataset.

static vtkInformationIntegerKey* vtkSelectionNode::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.

void vtkSelectionNode::UnionSelectionList ( vtkSelectionNode other)

Merges the selection list between self and the other.

Assumes that both has identical properties.

void vtkSelectionNode::SubtractSelectionList ( vtkSelectionNode other)

Subtracts the items in the selection list, other, from this selection list.

Assumes that both selections have identical properties (i.e., test with EqualProperties before using).

bool vtkSelectionNode::EqualProperties ( vtkSelectionNode other,
bool  fullcompare = true 
)

Compares Properties of self and other to ensure that they are exactly same.

Member Data Documentation

vtkInformation* vtkSelectionNode::Properties
protected

Definition at line 307 of file vtkSelectionNode.h.

vtkDataSetAttributes* vtkSelectionNode::SelectionData
protected

Definition at line 308 of file vtkSelectionNode.h.

char* vtkSelectionNode::QueryString
protected

Definition at line 309 of file vtkSelectionNode.h.


The documentation for this class was generated from the following file: