VTK  9.0.1
vtkSelectionNode.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkSelectionNode.h
5 
6  Copyright (c) Kitware, Inc.
7  All rights reserved.
8  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html 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 =========================================================================*/
46 #ifndef vtkSelectionNode_h
47 #define vtkSelectionNode_h
48 
49 #include "vtkCommonDataModelModule.h" // For export macro
50 #include "vtkObject.h"
51 
52 class vtkAbstractArray;
54 class vtkInformation;
58 class vtkProp;
59 class vtkTable;
60 
61 class VTKCOMMONDATAMODEL_EXPORT vtkSelectionNode : public vtkObject
62 {
63 public:
64  vtkTypeMacro(vtkSelectionNode, vtkObject);
65  void PrintSelf(ostream& os, vtkIndent indent) override;
66  static vtkSelectionNode* New();
67 
71  virtual void Initialize();
72 
74 
80 
82 
86  vtkGetObjectMacro(SelectionData, vtkDataSetAttributes);
88 
90 
93  vtkGetObjectMacro(Properties, vtkInformation);
95 
99  virtual void DeepCopy(vtkSelectionNode* src);
100 
106  virtual void ShallowCopy(vtkSelectionNode* src);
107 
111  vtkMTimeType GetMTime() override;
112 
113  // vtkSelectionNode specific keys follow:
122 
128  {
140  NUM_CONTENT_TYPES
141  };
142 
144 
148  virtual void SetContentType(int type);
149  virtual int GetContentType();
151 
155  static const char* GetContentTypeAsString(int type);
156 
164 
167  {
173  ROW,
174  NUM_FIELD_TYPES
175  };
176 
178 
182  virtual void SetFieldType(int type);
183  virtual int GetFieldType();
185 
189  static const char* GetFieldTypeAsString(int type);
190 
192 
199 
201 
204  vtkSetStringMacro(QueryString);
205  vtkGetStringMacro(QueryString);
207 
212 
217 
223 
230 
239 
244 
250 
255 
261 
266 
272 
277 
282 
284 
290 
297 
303 
310 
314  bool EqualProperties(vtkSelectionNode* other, bool fullcompare = true);
315 
316 protected:
318  ~vtkSelectionNode() override;
319 
322  char* QueryString;
323 
324  // Map from content type to content type name
325  static const char ContentTypeNames[SelectionContent::NUM_CONTENT_TYPES][14];
326 
327  // Map from integer field type to field type name
328  static const char FieldTypeNames[SelectionField::NUM_FIELD_TYPES][8];
329 
330 private:
331  vtkSelectionNode(const vtkSelectionNode&) = delete;
332  void operator=(const vtkSelectionNode&) = delete;
333 };
334 
335 #endif
vtkSelectionNode::SOURCE_ID
static vtkInformationIntegerKey * SOURCE_ID()
ID of the data or algorithm the selection belongs to.
vtkSelectionNode::ShallowCopy
virtual void ShallowCopy(vtkSelectionNode *src)
Copy properties, selection list and children of the input.
vtkSelectionNode::FIELD_TYPE
static vtkInformationIntegerKey * FIELD_TYPE()
Controls whether cell, point, or field data determine what is inside and out.
vtkSelectionNode::ConvertAttributeTypeToSelectionField
static int ConvertAttributeTypeToSelectionField(int val)
vtkSelectionNode
A node in a selection tree.
Definition: vtkSelectionNode.h:62
vtkSelectionNode::Properties
vtkInformation * Properties
Definition: vtkSelectionNode.h:320
vtkSelectionNode::LOCATIONS
@ LOCATIONS
Select entities near the supplied world coordinates.
Definition: vtkSelectionNode.h:135
vtkSelectionNode::PROCESS_ID
static vtkInformationIntegerKey * PROCESS_ID()
Process id the selection is on.
vtkSelectionNode::USER
@ USER
Select entities with user-supplied, application-specific logic.
Definition: vtkSelectionNode.h:139
vtkX3D::type
@ type
Definition: vtkX3D.h:522
vtkSelectionNode::CONTAINING_CELLS
static vtkInformationIntegerKey * CONTAINING_CELLS()
This flag tells the extraction filter, when FIELD_TYPE==POINT, that it should also extract the cells ...
vtkSelectionNode::PROP
static vtkInformationObjectBaseKey * PROP()
Pointer to the prop the selection belongs to.
vtkDataSetAttributes
represent and manipulate attribute data in a dataset
Definition: vtkDataSetAttributes.h:54
vtkX3D::data
@ data
Definition: vtkX3D.h:321
vtkSelectionNode::SelectionData
vtkDataSetAttributes * SelectionData
Definition: vtkSelectionNode.h:321
vtkTable
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:63
vtkSelectionNode::PEDIGREEIDS
@ PEDIGREEIDS
Select entities that have some identifiable pedigree.
Definition: vtkSelectionNode.h:131
vtkSelectionNode::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkSelectionNode::QueryString
char * QueryString
Definition: vtkSelectionNode.h:322
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:54
vtkSelectionNode::EPSILON
static vtkInformationDoubleKey * EPSILON()
For location selection of points, if distance is greater than this reject.
vtkSelectionNode::QUERY
@ QUERY
Select entities with a text query.
Definition: vtkSelectionNode.h:138
vtkSelectionNode::SubtractSelectionList
void SubtractSelectionList(vtkSelectionNode *other)
Subtracts the items in the selection list, other, from this selection list.
vtkSelectionNode::ROW
@ ROW
The selection data provided is table row-data.
Definition: vtkSelectionNode.h:173
vtkSelectionNode::FRUSTUM
@ FRUSTUM
Select entities contained within a viewing frustum.
Definition: vtkSelectionNode.h:134
vtkSelectionNode::SelectionContent
SelectionContent
Indicate the means by which data is selected.
Definition: vtkSelectionNode.h:128
vtkInformationDoubleKey
Key for double values in vtkInformation.
Definition: vtkInformationDoubleKey.h:32
vtkSelectionNode::ZBUFFER_VALUE
static vtkInformationDoubleKey * ZBUFFER_VALUE()
If present, closest zbuffer value of this selection.
vtkSelectionNode::VALUES
@ VALUES
Select entities that take on specific array values.
Definition: vtkSelectionNode.h:132
vtkSelectionNode::CONTENT_TYPE
static vtkInformationIntegerKey * CONTENT_TYPE()
Get the (primary) property that describes the content of a selection node's data.
vtkSelectionNode::GetSelectionList
virtual vtkAbstractArray * GetSelectionList()
vtkSelectionNode::POINT
@ POINT
The selection data provided is point-data.
Definition: vtkSelectionNode.h:169
vtkSelectionNode::VERTEX
@ VERTEX
The selection data provided is graph vertex-data.
Definition: vtkSelectionNode.h:171
vtkSelectionNode::GetFieldTypeAsString
static const char * GetFieldTypeAsString(int type)
Get the field type as a string.
vtkSelectionNode::SetSelectionData
virtual void SetSelectionData(vtkDataSetAttributes *data)
Sets the selection table.
vtkSelectionNode::INDEXED_VERTICES
static vtkInformationIntegerKey * INDEXED_VERTICES()
This key is used when making visible vertex selection.
vtkSelectionNode::COMPOSITE_INDEX
static vtkInformationIntegerKey * COMPOSITE_INDEX()
Used to identify a node in composite datasets.
vtkSelectionNode::SetContentType
virtual void SetContentType(int type)
Get or set the content type of the selection.
vtkSelectionNode::SOURCE
static vtkInformationObjectBaseKey * SOURCE()
Pointer to the data or algorithm the selection belongs to.
vtkSelectionNode::BLOCKS
@ BLOCKS
Select blocks within a composite dataset by their flat index.
Definition: vtkSelectionNode.h:137
vtkInformationObjectBaseKey
Key for vtkObjectBase values.
Definition: vtkInformationObjectBaseKey.h:34
vtkInformationIntegerKey
Key for integer values in vtkInformation.
Definition: vtkInformationIntegerKey.h:32
vtkSelectionNode::GLOBALIDS
@ GLOBALIDS
Select entities called out by their globally-unique IDs.
Definition: vtkSelectionNode.h:130
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:34
vtkSelectionNode::GetMTime
vtkMTimeType GetMTime() override
Return the MTime taking into account changes to the properties.
vtkSelectionNode::GetFieldType
virtual int GetFieldType()
vtkSelectionNode::ConvertSelectionFieldToAttributeType
static int ConvertSelectionFieldToAttributeType(int val)
Methods to convert vtkSelectionNode::SelectionField to vtkDataSetAttribute::AttributeTypes and vice-v...
vtkSelectionNode::Initialize
virtual void Initialize()
Restore data object to initial state,.
vtkSelectionNode::DeepCopy
virtual void DeepCopy(vtkSelectionNode *src)
Copy properties, selection list and children of the input.
vtkSelectionNode::FIELD
@ FIELD
The selection data provided is field-data.
Definition: vtkSelectionNode.h:170
vtkSelectionNode::SetSelectionList
virtual void SetSelectionList(vtkAbstractArray *)
Sets the selection list.
vtkObject.h
vtkSelectionNode::GetContentType
virtual int GetContentType()
vtkAbstractArray
Abstract superclass for all arrays.
Definition: vtkAbstractArray.h:76
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:65
vtkProp
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:48
vtkSelectionNode::INVERSE
static vtkInformationIntegerKey * INVERSE()
This flag tells the extraction filter to exclude the selection.
vtkSelectionNode::SelectionField
SelectionField
Indicate the types of entities to which the selection-data applies.
Definition: vtkSelectionNode.h:167
vtkSelectionNode::New
static vtkSelectionNode * New()
vtkSelectionNode::PROP_ID
static vtkInformationIntegerKey * PROP_ID()
ID of the prop the selection belongs to.
vtkSelectionNode::vtkSelectionNode
vtkSelectionNode()
vtkSelectionNode::CONNECTED_LAYERS
static vtkInformationIntegerKey * CONNECTED_LAYERS()
When specified, this indicates how many layers of connected elements in addition to those chosen expl...
vtkSelectionNode::GetContentTypeAsString
static const char * GetContentTypeAsString(int type)
Get the content type as a string.
vtkSelectionNode::THRESHOLDS
@ THRESHOLDS
Select entities whose array values fall within a given threshold.
Definition: vtkSelectionNode.h:136
vtkSelectionNode::SELECTIONS
@ SELECTIONS
Deprecated.
Definition: vtkSelectionNode.h:129
vtkSelectionNode::EDGE
@ EDGE
The selection data provided is graph edge-data.
Definition: vtkSelectionNode.h:172
vtkSelectionNode::COMPONENT_NUMBER
static vtkInformationIntegerKey * COMPONENT_NUMBER()
When ContentType==THRESHOLDS or ContentType==VALUES i.e.
vtkSelectionNode::INDICES
@ INDICES
Select entities by their offsets into the dataset.
Definition: vtkSelectionNode.h:133
vtkSelectionNode::HIERARCHICAL_LEVEL
static vtkInformationIntegerKey * HIERARCHICAL_LEVEL()
Used to identify a dataset in a hiererchical box dataset.
vtkSelectionNode::SetFieldType
virtual void SetFieldType(int type)
Get or set the field type of the selection.
vtkSelectionNode::~vtkSelectionNode
~vtkSelectionNode() override
vtkSelectionNode::PIXEL_COUNT
static vtkInformationIntegerKey * PIXEL_COUNT()
A helper for visible cell selector, this is the number of pixels covered by the actor whose cells are...
vtkSelectionNode::CELL
@ CELL
The selection data provided is cell-data.
Definition: vtkSelectionNode.h:168
vtkSelectionNode::HIERARCHICAL_INDEX
static vtkInformationIntegerKey * HIERARCHICAL_INDEX()
vtkSelectionNode::EqualProperties
bool EqualProperties(vtkSelectionNode *other, bool fullcompare=true)
Compares Properties of self and other to ensure that they are exactly same.
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:293
vtkSelectionNode::UnionSelectionList
void UnionSelectionList(vtkSelectionNode *other)
Merges the selection list between self and the other.