VTK  9.2.6
vtkSelectionNode.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkSelectionNode.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
328 #ifndef vtkSelectionNode_h
329 #define vtkSelectionNode_h
330 
331 #include "vtkCommonDataModelModule.h" // For export macro
332 #include "vtkDeprecation.h" // for deprecation
333 #include "vtkObject.h"
334 
335 class vtkAbstractArray;
337 class vtkInformation;
343 class vtkProp;
344 class vtkTable;
345 
346 class VTKCOMMONDATAMODEL_EXPORT vtkSelectionNode : public vtkObject
347 {
348 public:
349  vtkTypeMacro(vtkSelectionNode, vtkObject);
350  void PrintSelf(ostream& os, vtkIndent indent) override;
352 
356  virtual void Initialize();
357 
359 
368 
370 
374  vtkGetObjectMacro(SelectionData, vtkDataSetAttributes);
376 
378 
381  vtkGetObjectMacro(Properties, vtkInformation);
383 
387  virtual void DeepCopy(vtkSelectionNode* src);
388 
394  virtual void ShallowCopy(vtkSelectionNode* src);
395 
399  vtkMTimeType GetMTime() override;
400 
401  // vtkSelectionNode specific keys follow:
410 
416  {
428  NUM_CONTENT_TYPES
429  };
430 
432 
436  virtual void SetContentType(int type);
437  virtual int GetContentType();
439 
443  static const char* GetContentTypeAsString(int type);
444 
452 
455  {
461  ROW,
462  NUM_FIELD_TYPES
463  };
464 
466 
470  virtual void SetFieldType(int type);
471  virtual int GetFieldType();
473 
477  static const char* GetFieldTypeAsString(int type);
478 
482  static int GetFieldTypeFromString(const char* type);
483 
485 
492 
494 
497  vtkSetStringMacro(QueryString);
498  vtkGetStringMacro(QueryString);
500 
505 
510 
516 
523 
532 
537 
543 
548 
554 
559 
565 
570 
572 
584 
589 
591 
597 
601  VTK_DEPRECATED_IN_9_1_0("no longer relevant")
602  static vtkInformationIntegerKey* INDEXED_VERTICES();
603 
608  void UnionSelectionList(vtkSelectionNode* other);
609 
615  void SubtractSelectionList(vtkSelectionNode* other);
616 
620  bool EqualProperties(vtkSelectionNode* other, bool fullcompare = true);
621 
622 protected:
624  ~vtkSelectionNode() override;
625 
626  vtkInformation* Properties;
627  vtkDataSetAttributes* SelectionData;
628  char* QueryString;
629 
630  // Map from content type to content type name
631  static const char ContentTypeNames[SelectionContent::NUM_CONTENT_TYPES][16];
632 
633  // Map from integer field type to field type name
634  static const char FieldTypeNames[SelectionField::NUM_FIELD_TYPES][8];
635 
636 private:
637  vtkSelectionNode(const vtkSelectionNode&) = delete;
638  void operator=(const vtkSelectionNode&) = delete;
639 };
640 
641 #endif
Abstract superclass for all arrays.
represent and manipulate attribute data in a dataset
a simple class to control print indentation
Definition: vtkIndent.h:119
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:82
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:76
a node in a vtkSelection the defines the selection criteria.
static int GetFieldTypeFromString(const char *type)
Get field type from string.
static vtkInformationObjectBaseKey * SOURCE()
Pointer to the data or algorithm the selection belongs to.
static vtkInformationIntegerKey * PIXEL_COUNT()
A helper for visible cell selector, this is the number of pixels covered by the actor whose cells are...
static vtkInformationObjectBaseKey * PROP()
Pointer to the prop the selection belongs to.
virtual void SetFieldType(int type)
Get or set the field type of the selection.
static const char * GetFieldTypeAsString(int type)
Get the field type as a string.
static vtkInformationIntegerKey * PROP_ID()
ID of the prop the selection belongs to.
virtual void SetSelectionList(vtkAbstractArray *)
Get/Set the selection list.
static vtkInformationIntegerKey * FIELD_TYPE()
Controls whether cell, point, or field data determine what is inside and out.
static vtkInformationIntegerKey * COMPOSITE_INDEX()
Used to identify a node in composite datasets.
virtual void Initialize()
Restore data object to initial state,.
static vtkInformationDoubleKey * ZBUFFER_VALUE()
If present, closest zbuffer value of this selection.
static vtkInformationIntegerKey * HIERARCHICAL_INDEX()
Used to identify a dataset in a hiererchical box dataset.
virtual vtkAbstractArray * GetSelectionList()
Get/Set the selection list.
static const char * GetContentTypeAsString(int type)
Get the content type as a string.
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 * COMPONENT_NUMBER()
When ContentType==THRESHOLDS or ContentType==VALUES i.e.
static vtkInformationIntegerKey * CONTAINING_CELLS()
This flag tells the extraction filter, when FIELD_TYPE==POINT, that it should also extract the cells ...
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.
static vtkInformationIntegerKey * INVERSE()
This flag tells the extraction filter to exclude the selection.
virtual int GetContentType()
Get or set the content type of the selection.
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...
virtual void SetContentType(int type)
Get or set the content type of the selection.
static vtkInformationStringKey * ASSEMBLY_NAME()
Keys for selector-based identification of blocks to choose from a composite dataset.
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 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.
virtual void DeepCopy(vtkSelectionNode *src)
Copy properties, selection list and children of the input.
static vtkInformationIntegerKey * HIERARCHICAL_LEVEL()
Used to identify a dataset in a hiererchical box dataset.
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 vtkSelectionNode * New()
static vtkInformationStringVectorKey * SELECTORS()
Keys for selector-based identification of blocks to choose from a composite dataset.
static vtkInformationIntegerKey * PROCESS_ID()
Process id the selection is on.
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:183
@ type
Definition: vtkX3D.h:522
@ data
Definition: vtkX3D.h:321
#define VTK_DEPRECATED_IN_9_1_0(reason)
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287