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

A node in a selection tree. Used to store selection results. 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, NUM_CONTENT_TYPES
}
 Indicate the means by which data is selected. More...
 
enum  SelectionField {
  CELL, POINT, FIELD, VERTEX,
  EDGE, ROW, NUM_FIELD_TYPES
}
 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 SetSelectionList (vtkAbstractArray *)
 Sets the selection list. More...
 
virtual vtkAbstractArrayGetSelectionList ()
 
virtual void SetSelectionData (vtkDataSetAttributes *data)
 Sets the selection table. More...
 
virtual vtkDataSetAttributesGetSelectionData ()
 
virtual vtkInformationGetProperties ()
 Returns the property map. 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...
 
virtual void SetContentType (int type)
 Get or set the content type of the selection. More...
 
virtual int GetContentType ()
 
virtual void SetFieldType (int type)
 Get or set the field type of the selection. More...
 
virtual int GetFieldType ()
 
virtual void SetQueryString (const char *)
 Set/Get the query expression string. More...
 
virtual char * GetQueryString ()
 
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...
 
- 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...
 
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)
 
vtkCommandGetCommand (unsigned long tag)
 
void RemoveObserver (vtkCommand *)
 
void RemoveObservers (unsigned long event, vtkCommand *)
 
void RemoveObservers (const char *event, vtkCommand *)
 
vtkTypeBool HasObserver (unsigned long event, vtkCommand *)
 
vtkTypeBool HasObserver (const char *event, vtkCommand *)
 
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)
 
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)
 
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)
 
int InvokeEvent (unsigned long event)
 
int InvokeEvent (const char *event)
 
- Public Member Functions inherited from vtkObjectBase
const char * GetClassName () const
 Return the class name as a string. More...
 
virtual vtkIdType GetNumberOfGenerationsFromBase (const char *name)
 Given a the name of a base class of this class type, return the distance of inheritance between this class type and the named class (how many generations of inheritance are there between this class and the named class). 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 PrintHeader (ostream &os, vtkIndent indent)
 
virtual void PrintTrailer (ostream &os, vtkIndent indent)
 
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...
 

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 const char * GetContentTypeAsString (int type)
 Get the content type as a string. More...
 
static vtkInformationIntegerKeyFIELD_TYPE ()
 Controls whether cell, point, or field data determine what is inside and out. More...
 
static const char * GetFieldTypeAsString (int type)
 Get the field type as a string. More...
 
static int ConvertSelectionFieldToAttributeType (int val)
 Methods to convert vtkSelectionNode::SelectionField to vtkDataSetAttribute::AttributeTypes and vice-versa. More...
 
static int ConvertAttributeTypeToSelectionField (int val)
 
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 vtkInformationIntegerKeyCONNECTED_LAYERS ()
 When specified, this indicates how many layers of connected elements in addition to those chosen explicitly are being selected. 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 vtkInformationIntegerKeyHIERARCHICAL_LEVEL ()
 Used to identify a dataset in a hiererchical box dataset. More...
 
static vtkInformationIntegerKeyHIERARCHICAL_INDEX ()
 
static vtkInformationIntegerKeyINDEXED_VERTICES ()
 This key is used when making visible vertex selection. 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 ()
 
static void GlobalWarningDisplayOff ()
 
static int GetGlobalWarningDisplay ()
 
- 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 vtkIdType GetNumberOfGenerationsFromBaseType (const char *name)
 Given a the name of a base class of this class type, return the distance of inheritance between this class type and the named class (how many generations of inheritance are there between this class and 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 ()
 
- 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
std::atomic< int32_t > ReferenceCount
 
vtkWeakPointerBase ** WeakPointers
 

Static Protected Attributes

static const char ContentTypeNames [SelectionContent::NUM_CONTENT_TYPES][14]
 
static const char FieldTypeNames [SelectionField::NUM_FIELD_TYPES][8]
 

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.

Definition at line 61 of file vtkSelectionNode.h.

Member Typedef Documentation

◆ Superclass

Definition at line 64 of file vtkSelectionNode.h.

Member Enumeration Documentation

◆ SelectionContent

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.

NUM_CONTENT_TYPES 

Definition at line 127 of file vtkSelectionNode.h.

◆ SelectionField

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.

NUM_FIELD_TYPES 

Definition at line 166 of file vtkSelectionNode.h.

Constructor & Destructor Documentation

◆ vtkSelectionNode()

vtkSelectionNode::vtkSelectionNode ( )
protected

◆ ~vtkSelectionNode()

vtkSelectionNode::~vtkSelectionNode ( )
overrideprotected

Member Function Documentation

◆ IsTypeOf()

static vtkTypeBool vtkSelectionNode::IsTypeOf ( const char *  type)
static

◆ IsA()

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.

◆ SafeDownCast()

static vtkSelectionNode* vtkSelectionNode::SafeDownCast ( vtkObjectBase o)
static

◆ NewInstanceInternal()

virtual vtkObjectBase* vtkSelectionNode::NewInstanceInternal ( ) const
protectedvirtual

◆ NewInstance()

vtkSelectionNode* vtkSelectionNode::NewInstance ( ) const

◆ PrintSelf()

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.

◆ New()

static vtkSelectionNode* vtkSelectionNode::New ( )
static

◆ Initialize()

virtual void vtkSelectionNode::Initialize ( )
virtual

Restore data object to initial state,.

◆ SetSelectionList()

virtual void vtkSelectionNode::SetSelectionList ( vtkAbstractArray )
virtual

Sets the selection list.

◆ GetSelectionList()

virtual vtkAbstractArray* vtkSelectionNode::GetSelectionList ( )
virtual

◆ SetSelectionData()

virtual void vtkSelectionNode::SetSelectionData ( vtkDataSetAttributes data)
virtual

Sets the selection table.

◆ GetSelectionData()

virtual vtkDataSetAttributes* vtkSelectionNode::GetSelectionData ( )
virtual

◆ GetProperties()

virtual vtkInformation* vtkSelectionNode::GetProperties ( )
virtual

Returns the property map.

◆ DeepCopy()

virtual void vtkSelectionNode::DeepCopy ( vtkSelectionNode src)
virtual

Copy properties, selection list and children of the input.

◆ ShallowCopy()

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.

◆ GetMTime()

vtkMTimeType vtkSelectionNode::GetMTime ( )
overridevirtual

Return the MTime taking into account changes to the properties.

Reimplemented from vtkObject.

◆ CONTENT_TYPE()

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

◆ SetContentType()

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.

◆ GetContentType()

virtual int vtkSelectionNode::GetContentType ( )
virtual

◆ GetContentTypeAsString()

static const char* vtkSelectionNode::GetContentTypeAsString ( int  type)
static

Get the content type as a string.

◆ FIELD_TYPE()

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.

◆ SetFieldType()

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.

◆ GetFieldType()

virtual int vtkSelectionNode::GetFieldType ( )
virtual

◆ GetFieldTypeAsString()

static const char* vtkSelectionNode::GetFieldTypeAsString ( int  type)
static

Get the field type as a string.

◆ ConvertSelectionFieldToAttributeType()

static int vtkSelectionNode::ConvertSelectionFieldToAttributeType ( int  val)
static

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

◆ ConvertAttributeTypeToSelectionField()

static int vtkSelectionNode::ConvertAttributeTypeToSelectionField ( int  val)
static

◆ SetQueryString()

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

Set/Get the query expression string.

◆ GetQueryString()

virtual char* vtkSelectionNode::GetQueryString ( )
virtual

◆ EPSILON()

static vtkInformationDoubleKey* vtkSelectionNode::EPSILON ( )
static

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

◆ ZBUFFER_VALUE()

static vtkInformationDoubleKey* vtkSelectionNode::ZBUFFER_VALUE ( )
static

If present, closest zbuffer value of this selection.

◆ CONTAINING_CELLS()

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.

◆ CONNECTED_LAYERS()

static vtkInformationIntegerKey* vtkSelectionNode::CONNECTED_LAYERS ( )
static

When specified, this indicates how many layers of connected elements in addition to those chosen explicitly are being selected.

Currently, this is only supported for cells and points.

◆ COMPONENT_NUMBER()

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.

◆ INVERSE()

static vtkInformationIntegerKey* vtkSelectionNode::INVERSE ( )
static

This flag tells the extraction filter to exclude the selection.

◆ PIXEL_COUNT()

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.

◆ SOURCE()

static vtkInformationObjectBaseKey* vtkSelectionNode::SOURCE ( )
static

Pointer to the data or algorithm the selection belongs to.

◆ SOURCE_ID()

static vtkInformationIntegerKey* vtkSelectionNode::SOURCE_ID ( )
static

ID of the data or algorithm the selection belongs to.

What ID means is application specific.

◆ PROP()

static vtkInformationObjectBaseKey* vtkSelectionNode::PROP ( )
static

Pointer to the prop the selection belongs to.

◆ PROP_ID()

static vtkInformationIntegerKey* vtkSelectionNode::PROP_ID ( )
static

ID of the prop the selection belongs to.

What ID means is application specific.

◆ PROCESS_ID()

static vtkInformationIntegerKey* vtkSelectionNode::PROCESS_ID ( )
static

Process id the selection is on.

◆ COMPOSITE_INDEX()

static vtkInformationIntegerKey* vtkSelectionNode::COMPOSITE_INDEX ( )
static

Used to identify a node in composite datasets.

◆ HIERARCHICAL_LEVEL()

static vtkInformationIntegerKey* vtkSelectionNode::HIERARCHICAL_LEVEL ( )
static

Used to identify a dataset in a hiererchical box dataset.

◆ HIERARCHICAL_INDEX()

static vtkInformationIntegerKey* vtkSelectionNode::HIERARCHICAL_INDEX ( )
static

◆ INDEXED_VERTICES()

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.

◆ UnionSelectionList()

void vtkSelectionNode::UnionSelectionList ( vtkSelectionNode other)

Merges the selection list between self and the other.

Assumes that both has identical properties.

◆ SubtractSelectionList()

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

◆ EqualProperties()

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

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

Member Data Documentation

◆ Properties

vtkInformation* vtkSelectionNode::Properties
protected

Definition at line 320 of file vtkSelectionNode.h.

◆ SelectionData

vtkDataSetAttributes* vtkSelectionNode::SelectionData
protected

Definition at line 321 of file vtkSelectionNode.h.

◆ QueryString

char* vtkSelectionNode::QueryString
protected

Definition at line 322 of file vtkSelectionNode.h.

◆ ContentTypeNames

const char vtkSelectionNode::ContentTypeNames[SelectionContent::NUM_CONTENT_TYPES][14]
staticprotected

Definition at line 325 of file vtkSelectionNode.h.

◆ FieldTypeNames

const char vtkSelectionNode::FieldTypeNames[SelectionField::NUM_FIELD_TYPES][8]
staticprotected

Definition at line 328 of file vtkSelectionNode.h.


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