VTK  9.4.20241114
vtkSelectionNode.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
323#ifndef vtkSelectionNode_h
324#define vtkSelectionNode_h
325
326#include "vtkCommonDataModelModule.h" // For export macro
327#include "vtkObject.h"
328
329VTK_ABI_NAMESPACE_BEGIN
330class vtkAbstractArray;
332class vtkInformation;
338class vtkProp;
339class vtkTable;
340
341class VTKCOMMONDATAMODEL_EXPORT vtkSelectionNode : public vtkObject
342{
343public:
345 void PrintSelf(ostream& os, vtkIndent indent) override;
347
351 virtual void Initialize();
352
354
363
365
369 vtkGetObjectMacro(SelectionData, vtkDataSetAttributes);
371
373
376 vtkGetObjectMacro(Properties, vtkInformation);
378
382 virtual void DeepCopy(vtkSelectionNode* src);
383
389 virtual void ShallowCopy(vtkSelectionNode* src);
390
395
396 // vtkSelectionNode specific keys follow:
406
412 {
424 NUM_CONTENT_TYPES
425 };
426
428
432 virtual void SetContentType(int type);
433 virtual int GetContentType();
435
439 static const char* GetContentTypeAsString(int type);
440
449
452 {
459 NUM_FIELD_TYPES
460 };
461
463
467 virtual void SetFieldType(int type);
468 virtual int GetFieldType();
470
474 static const char* GetFieldTypeAsString(int type);
475
479 static int GetFieldTypeFromString(const char* type);
480
482
489
491
494 vtkSetStringMacro(QueryString);
495 vtkGetStringMacro(QueryString);
497
503
509
516
524
531
538
548
554
561
567
574
580
587
593
595
608
614
616
623
625
636
642
649
653 bool EqualProperties(vtkSelectionNode* other, bool fullcompare = true);
654
655protected:
658
662
663 // Map from content type to content type name
664 static const char ContentTypeNames[SelectionContent::NUM_CONTENT_TYPES][16];
665
666 // Map from integer field type to field type name
667 static const char FieldTypeNames[SelectionField::NUM_FIELD_TYPES][8];
668
669private:
670 vtkSelectionNode(const vtkSelectionNode&) = delete;
671 void operator=(const vtkSelectionNode&) = delete;
672};
673
674VTK_ABI_NAMESPACE_END
675#endif
Abstract superclass for all arrays.
represent and manipulate attribute data in a dataset
a simple class to control print indentation
Definition vtkIndent.h:108
Key for double values in vtkInformation.
Key for integer values in vtkInformation.
Key for vtkObjectBase values.
Key for string values in vtkInformation.
Store vtkAlgorithm input/output information.
abstract base class for most VTK objects
Definition vtkObject.h:162
abstract superclass for all actors, volumes and annotations
Definition vtkProp.h:66
a node in a vtkSelection the defines the selection criteria.
static int GetFieldTypeFromString(const char *type)
Get field type from string.
void SubtractSelectionList(vtkSelectionNode *other)
Subtracts the items in the selection list, other, from this selection list.
virtual void SetFieldType(int type)
Get or set the field type of the selection.
virtual void SetSelectionList(vtkAbstractArray *)
Get/Set the selection list.
virtual void Initialize()
Restore data object to initial state,.
~vtkSelectionNode() override
void UnionSelectionList(vtkSelectionNode *other)
Merges the selection list between self and the other.
SelectionField
Indicate the types of entities to which the selection-data applies.
@ POINT
The selection data provided is point-data.
@ EDGE
The selection data provided is graph edge-data.
@ CELL
The selection data provided is cell-data.
@ FIELD
The selection data provided is field-data.
@ ROW
The selection data provided is table row-data.
@ VERTEX
The selection data provided is graph vertex-data.
static vtkInformationIntegerKey * CELLGRID_CELL_TYPE_INDEX()
Used to identify a cell type and whether picked entity is a side in a vtkCellGrid.
virtual int GetContentType()
Get or set the content type of the selection.
virtual void SetContentType(int type)
Get or set the content type of the selection.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void SetSelectionData(vtkDataSetAttributes *data)
Sets the selection table.
static const char * GetFieldTypeAsString(int type)
Get the field type as a string.
static int ConvertAttributeTypeToSelectionField(int val)
Methods to convert vtkSelectionNode::SelectionField to vtkDataSetAttribute::AttributeTypes and vice-v...
SelectionContent
Indicate the means by which data is selected.
@ VALUES
Select entities that take on specific array values.
@ PEDIGREEIDS
Select entities that have some identifiable pedigree.
@ GLOBALIDS
Select entities called out by their globally-unique IDs.
@ LOCATIONS
Select entities near the supplied world coordinates.
@ BLOCK_SELECTORS
Select datasets within a composite dataset using selector expressions.
@ INDICES
Select entities by their offsets into the dataset.
@ THRESHOLDS
Select entities whose array values fall within a given threshold.
@ QUERY
Select entities with a text query.
@ BLOCKS
Select blocks within a composite dataset by their flat index.
@ USER
Select entities with user-supplied, application-specific logic.
@ FRUSTUM
Select entities contained within a viewing frustum.
bool EqualProperties(vtkSelectionNode *other, bool fullcompare=true)
Compares Properties of self and other to ensure that they are exactly same.
virtual void DeepCopy(vtkSelectionNode *src)
Copy properties, selection list and children of the input.
static vtkSelectionNode * New()
vtkMTimeType GetMTime() override
Return the MTime taking into account changes to the properties.
virtual int GetFieldType()
Get or set the field type of the selection.
static vtkInformationIntegerKey * CELLGRID_SOURCE_SPECIFICATION_INDEX()
Used to identify a cell type and whether picked entity is a side in a vtkCellGrid.
static const char * GetContentTypeAsString(int type)
Get the content type as a string.
vtkDataSetAttributes * SelectionData
virtual vtkAbstractArray * GetSelectionList()
Get/Set the selection list.
vtkInformation * Properties
virtual void ShallowCopy(vtkSelectionNode *src)
Copy properties, selection list and children of the input.
static int ConvertSelectionFieldToAttributeType(int val)
Methods to convert vtkSelectionNode::SelectionField to vtkDataSetAttribute::AttributeTypes and vice-v...
A table, which contains similar-typed columns of data.
Definition vtkTable.h:169
static vtkInformationIntegerKey * HIERARCHICAL_INDEX()
Used to identify a dataset in a hiererchical box dataset.
static vtkInformationDoubleKey * ZBUFFER_VALUE()
If present, closest zbuffer value of this selection.
static vtkInformationIntegerKey * COMPONENT_NUMBER()
When ContentType==THRESHOLDS or ContentType==VALUES i.e.
static vtkInformationIntegerKey * PROP_ID()
ID of the prop the selection belongs to.
static vtkInformationIntegerKey * CONTENT_TYPE()
Get the (primary) property that describes the content of a selection node's data.
static vtkInformationIntegerKey * CONNECTED_LAYERS()
When specified, this indicates how many layers of connected elements in addition to those chosen expl...
static vtkInformationIntegerKey * FIELD_TYPE()
Controls whether cell, point, or field data determine what is inside and out.
static vtkInformationStringVectorKey * SELECTORS()
Keys for selector-based identification of blocks to choose from a composite dataset.
static vtkInformationObjectBaseKey * PROP()
Pointer to the prop the selection belongs to.
static vtkInformationIntegerKey * PROCESS_ID()
Process id the selection is on.
static vtkInformationIntegerKey * HIERARCHICAL_LEVEL()
Used to identify a dataset in a hiererchical box dataset.
static vtkInformationIntegerKey * COMPOSITE_INDEX()
Used to identify a node in composite datasets.
static vtkInformationIntegerKey * INVERSE()
This flag tells the extraction filter to exclude the selection.
static vtkInformationIntegerKey * CONNECTED_LAYERS_REMOVE_SEED()
When specified and also using CONNECTED_LAYERS(), this indicates if the initial selection should be k...
static vtkInformationIntegerKey * CONNECTED_LAYERS_REMOVE_INTERMEDIATE_LAYERS()
When specified and also using CONNECTED_LAYERS(), this indicates if the intermediate layers should be...
static vtkInformationIntegerKey * CONTAINING_CELLS()
This flag tells the extraction filter, when FIELD_TYPE==POINT, that it should also extract the cells ...
static vtkInformationIntegerKey * PIXEL_COUNT()
A helper for visible cell selector, this is the number of pixels covered by the actor whose cells are...
static vtkInformationStringKey * ASSEMBLY_NAME()
Keys for selector-based identification of blocks to choose from a composite dataset.
static vtkInformationObjectBaseKey * SOURCE()
Pointer to the data or algorithm the selection belongs to.
static vtkInformationDoubleKey * EPSILON()
For location selection of points, if distance is greater than this reject.
static vtkInformationIntegerKey * SOURCE_ID()
ID of the data or algorithm the selection belongs to.
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:270