VTK: Common/DataModel/vtkSelectionNode.h Source File

| VTK 9.3.1

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
223 #ifndef vtkSelectionNode_h
224 #define vtkSelectionNode_h
225
226 #include "vtkCommonDataModelModule.h" // For export macro
227 #include "vtkObject.h"
228
229 VTK_ABI_NAMESPACE_BEGIN
230 class vtkAbstractArray;
231 class vtkDataSetAttributes;
232 class vtkInformation;
233 class vtkInformationDoubleKey;
234 class vtkInformationIntegerKey;
235 class vtkInformationObjectBaseKey;
236 class vtkInformationStringKey;
237 class vtkInformationStringVectorKey;
238 class vtkProp;
239 class vtkTable;
240
241 class VTKCOMMONDATAMODEL_EXPORT vtkSelectionNode : public vtkObject
242 {
243 public:
244 vtkTypeMacro(vtkSelectionNode, vtkObject);
245 void PrintSelf(ostream& os, vtkIndent indent) override;
246 static vtkSelectionNode* New();
247
251 virtual void Initialize();
252
254
260 virtual void SetSelectionList(vtkAbstractArray*);
261 virtual vtkAbstractArray* GetSelectionList();
263
265
268 virtual void SetSelectionData(vtkDataSetAttributes* data);
269 vtkGetObjectMacro(SelectionData, vtkDataSetAttributes);
271
273
276 vtkGetObjectMacro(Properties, vtkInformation);
278
282 virtual void DeepCopy(vtkSelectionNode* src);
283
289 virtual void ShallowCopy(vtkSelectionNode* src);
290
294 vtkMTimeType GetMTime() override;
295
296 // vtkSelectionNode specific keys follow:
304 static vtkInformationIntegerKey* CONTENT_TYPE();
305
310 enum SelectionContent
311 {
312 GLOBALIDS,
313 PEDIGREEIDS,
314 VALUES,
315 INDICES,
316 FRUSTUM,
317 LOCATIONS,
318 THRESHOLDS,
319 BLOCKS,
320 BLOCK_SELECTORS,
321 QUERY,
322 USER,
323 NUM_CONTENT_TYPES
324 };
325
327
331 virtual void SetContentType(int type);
332 virtual int GetContentType();
334
338 static const char* GetContentTypeAsString(int type);
339
346 static vtkInformationIntegerKey* FIELD_TYPE();
347
349 enum SelectionField
350 {
351 CELL,
352 POINT,
353 FIELD,
354 VERTEX,
355 EDGE,
356 ROW,
357 NUM_FIELD_TYPES
358 };
359
361
365 virtual void SetFieldType(int type);
366 virtual int GetFieldType();
368
372 static const char* GetFieldTypeAsString(int type);
373
377 static int GetFieldTypeFromString(const char* type);
378
380
384 static int ConvertSelectionFieldToAttributeType(int val);
385 static int ConvertAttributeTypeToSelectionField(int val);
387
389
392 vtkSetStringMacro(QueryString);
393 vtkGetStringMacro(QueryString);
395
399 static vtkInformationDoubleKey* EPSILON();
400
404 static vtkInformationDoubleKey* ZBUFFER_VALUE();
405
410 static vtkInformationIntegerKey* CONTAINING_CELLS();
411
417 static vtkInformationIntegerKey* CONNECTED_LAYERS();
418
423 static vtkInformationIntegerKey* CONNECTED_LAYERS_REMOVE_SEED();
424
429 static vtkInformationIntegerKey* CONNECTED_LAYERS_REMOVE_INTERMEDIATE_LAYERS();
430
438 static vtkInformationIntegerKey* COMPONENT_NUMBER();
439
443 static vtkInformationIntegerKey* INVERSE();
444
449 static vtkInformationIntegerKey* PIXEL_COUNT();
450
454 static vtkInformationObjectBaseKey* SOURCE();
455
460 static vtkInformationIntegerKey* SOURCE_ID();
461
465 static vtkInformationObjectBaseKey* PROP();
466
471 static vtkInformationIntegerKey* PROP_ID();
472
476 static vtkInformationIntegerKey* PROCESS_ID();
477
479
488 static vtkInformationStringKey* ASSEMBLY_NAME();
489 static vtkInformationStringVectorKey* SELECTORS();
491
495 static vtkInformationIntegerKey* COMPOSITE_INDEX();
496
498
501 static vtkInformationIntegerKey* HIERARCHICAL_LEVEL();
502 static vtkInformationIntegerKey* HIERARCHICAL_INDEX();
504
509 void UnionSelectionList(vtkSelectionNode* other);
510
516 void SubtractSelectionList(vtkSelectionNode* other);
517
521 bool EqualProperties(vtkSelectionNode* other, bool fullcompare = true);
522
523 protected:
524 vtkSelectionNode();
525 ~vtkSelectionNode() override;
526
527 vtkInformation* Properties;
528 vtkDataSetAttributes* SelectionData;
529 char* QueryString;
530
531 // Map from content type to content type name
532 static const char ContentTypeNames[SelectionContent::NUM_CONTENT_TYPES][16];
533
534 // Map from integer field type to field type name
535 static const char FieldTypeNames[SelectionField::NUM_FIELD_TYPES][8];
536
537 private:
538 vtkSelectionNode(const vtkSelectionNode&) = delete;
539 void operator=(const vtkSelectionNode&) = delete;
540 };
541
542 VTK_ABI_NAMESPACE_END
543 #endif
vtkAbstractArray
Abstract superclass for all arrays.
Definition: vtkAbstractArray.h:76
vtkDataSetAttributes
represent and manipulate attribute data in a dataset
Definition: vtkDataSetAttributes.h:65
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkInformationDoubleKey
Key for double values in vtkInformation.
Definition: vtkInformationDoubleKey.h:24
vtkInformationIntegerKey
Key for integer values in vtkInformation.
Definition: vtkInformationIntegerKey.h:24
vtkInformationObjectBaseKey
Key for vtkObjectBase values.
Definition: vtkInformationObjectBaseKey.h:26
vtkInformationStringKey
Key for string values in vtkInformation.
Definition: vtkInformationStringKey.h:26
vtkInformationStringVectorKey
Key for String vector values.
Definition: vtkInformationStringVectorKey.h:26
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:72
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:61
vtkProp
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:55
vtkSelectionNode
a node in a vtkSelection the defines the selection criteria.
Definition: vtkSelectionNode.h:242
vtkSelectionNode::GetFieldTypeFromString
static int GetFieldTypeFromString(const char *type)
Get field type from string.
vtkSelectionNode::SubtractSelectionList
void SubtractSelectionList(vtkSelectionNode *other)
Subtracts the items in the selection list, other, from this selection list.
vtkSelectionNode::CONNECTED_LAYERS_REMOVE_INTERMEDIATE_LAYERS
static vtkInformationIntegerKey * CONNECTED_LAYERS_REMOVE_INTERMEDIATE_LAYERS()
When specified and also using CONNECTED_LAYERS(), this indicates if the intermediate layers should be...
vtkSelectionNode::SOURCE
static vtkInformationObjectBaseKey * SOURCE()
Pointer to the data or algorithm the selection belongs to.
vtkSelectionNode::CONNECTED_LAYERS_REMOVE_SEED
static vtkInformationIntegerKey * CONNECTED_LAYERS_REMOVE_SEED()
When specified and also using CONNECTED_LAYERS(), this indicates if the initial selection should be k...
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::PROP
static vtkInformationObjectBaseKey * PROP()
Pointer to the prop the selection belongs to.
vtkSelectionNode::SetFieldType
virtual void SetFieldType(int type)
Get or set the field type of the selection.
vtkSelectionNode::GetFieldTypeAsString
static const char * GetFieldTypeAsString(int type)
Get the field type as a string.
vtkSelectionNode::PROP_ID
static vtkInformationIntegerKey * PROP_ID()
ID of the prop the selection belongs to.
vtkSelectionNode::SetSelectionList
virtual void SetSelectionList(vtkAbstractArray *)
Get/Set the selection list.
vtkSelectionNode::FIELD_TYPE
static vtkInformationIntegerKey * FIELD_TYPE()
Controls whether cell, point, or field data determine what is inside and out.
vtkSelectionNode::COMPOSITE_INDEX
static vtkInformationIntegerKey * COMPOSITE_INDEX()
Used to identify a node in composite datasets.
vtkSelectionNode::Initialize
virtual void Initialize()
Restore data object to initial state,.
vtkSelectionNode::~vtkSelectionNode
~vtkSelectionNode() override
vtkSelectionNode::ZBUFFER_VALUE
static vtkInformationDoubleKey * ZBUFFER_VALUE()
If present, closest zbuffer value of this selection.
vtkSelectionNode::HIERARCHICAL_INDEX
static vtkInformationIntegerKey * HIERARCHICAL_INDEX()
Used to identify a dataset in a hiererchical box dataset.
vtkSelectionNode::GetSelectionList
virtual vtkAbstractArray * GetSelectionList()
Get/Set the selection list.
vtkSelectionNode::UnionSelectionList
void UnionSelectionList(vtkSelectionNode *other)
Merges the selection list between self and the other.
vtkSelectionNode::GetContentTypeAsString
static const char * GetContentTypeAsString(int type)
Get the content type as a string.
vtkSelectionNode::SelectionField
SelectionField
Indicate the types of entities to which the selection-data applies.
Definition: vtkSelectionNode.h:350
vtkSelectionNode::POINT
@ POINT
The selection data provided is point-data.
Definition: vtkSelectionNode.h:352
vtkSelectionNode::EDGE
@ EDGE
The selection data provided is graph edge-data.
Definition: vtkSelectionNode.h:355
vtkSelectionNode::CELL
@ CELL
The selection data provided is cell-data.
Definition: vtkSelectionNode.h:351
vtkSelectionNode::FIELD
@ FIELD
The selection data provided is field-data.
Definition: vtkSelectionNode.h:353
vtkSelectionNode::ROW
@ ROW
The selection data provided is table row-data.
Definition: vtkSelectionNode.h:356
vtkSelectionNode::VERTEX
@ VERTEX
The selection data provided is graph vertex-data.
Definition: vtkSelectionNode.h:354
vtkSelectionNode::COMPONENT_NUMBER
static vtkInformationIntegerKey * COMPONENT_NUMBER()
When ContentType==THRESHOLDS or ContentType==VALUES i.e.
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::QueryString
char * QueryString
Definition: vtkSelectionNode.h:529
vtkSelectionNode::EPSILON
static vtkInformationDoubleKey * EPSILON()
For location selection of points, if distance is greater than this reject.
vtkSelectionNode::SOURCE_ID
static vtkInformationIntegerKey * SOURCE_ID()
ID of the data or algorithm the selection belongs to.
vtkSelectionNode::INVERSE
static vtkInformationIntegerKey * INVERSE()
This flag tells the extraction filter to exclude the selection.
vtkSelectionNode::GetContentType
virtual int GetContentType()
Get or set the content type of the selection.
vtkSelectionNode::CONTENT_TYPE
static vtkInformationIntegerKey * CONTENT_TYPE()
Get the (primary) property that describes the content of a selection node's data.
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::SetContentType
virtual void SetContentType(int type)
Get or set the content type of the selection.
vtkSelectionNode::ASSEMBLY_NAME
static vtkInformationStringKey * ASSEMBLY_NAME()
Keys for selector-based identification of blocks to choose from a composite dataset.
vtkSelectionNode::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkSelectionNode::SetSelectionData
virtual void SetSelectionData(vtkDataSetAttributes *data)
Sets the selection table.
vtkSelectionNode::ConvertAttributeTypeToSelectionField
static int ConvertAttributeTypeToSelectionField(int val)
Methods to convert vtkSelectionNode::SelectionField to vtkDataSetAttribute::AttributeTypes and vice-v...
vtkSelectionNode::SelectionContent
SelectionContent
Indicate the means by which data is selected.
Definition: vtkSelectionNode.h:311
vtkSelectionNode::VALUES
@ VALUES
Select entities that take on specific array values.
Definition: vtkSelectionNode.h:314
vtkSelectionNode::PEDIGREEIDS
@ PEDIGREEIDS
Select entities that have some identifiable pedigree.
Definition: vtkSelectionNode.h:313
vtkSelectionNode::GLOBALIDS
@ GLOBALIDS
Select entities called out by their globally-unique IDs.
Definition: vtkSelectionNode.h:312
vtkSelectionNode::LOCATIONS
@ LOCATIONS
Select entities near the supplied world coordinates.
Definition: vtkSelectionNode.h:317
vtkSelectionNode::BLOCK_SELECTORS
@ BLOCK_SELECTORS
Select datasets within a composite dataset using selector expressions.
Definition: vtkSelectionNode.h:320
vtkSelectionNode::INDICES
@ INDICES
Select entities by their offsets into the dataset.
Definition: vtkSelectionNode.h:315
vtkSelectionNode::THRESHOLDS
@ THRESHOLDS
Select entities whose array values fall within a given threshold.
Definition: vtkSelectionNode.h:318
vtkSelectionNode::QUERY
@ QUERY
Select entities with a text query.
Definition: vtkSelectionNode.h:321
vtkSelectionNode::BLOCKS
@ BLOCKS
Select blocks within a composite dataset by their flat index.
Definition: vtkSelectionNode.h:319
vtkSelectionNode::USER
@ USER
Select entities with user-supplied, application-specific logic.
Definition: vtkSelectionNode.h:322
vtkSelectionNode::FRUSTUM
@ FRUSTUM
Select entities contained within a viewing frustum.
Definition: vtkSelectionNode.h:316
vtkSelectionNode::EqualProperties
bool EqualProperties(vtkSelectionNode *other, bool fullcompare=true)
Compares Properties of self and other to ensure that they are exactly same.
vtkSelectionNode::DeepCopy
virtual void DeepCopy(vtkSelectionNode *src)
Copy properties, selection list and children of the input.
vtkSelectionNode::HIERARCHICAL_LEVEL
static vtkInformationIntegerKey * HIERARCHICAL_LEVEL()
Used to identify a dataset in a hiererchical box dataset.
vtkSelectionNode::GetMTime
vtkMTimeType GetMTime() override
Return the MTime taking into account changes to the properties.
vtkSelectionNode::GetFieldType
virtual int GetFieldType()
Get or set the field type of the selection.
vtkSelectionNode::New
static vtkSelectionNode * New()
vtkSelectionNode::SELECTORS
static vtkInformationStringVectorKey * SELECTORS()
Keys for selector-based identification of blocks to choose from a composite dataset.
vtkSelectionNode::SelectionData
vtkDataSetAttributes * SelectionData
Definition: vtkSelectionNode.h:528
vtkSelectionNode::Properties
vtkInformation * Properties
Definition: vtkSelectionNode.h:527
vtkSelectionNode::PROCESS_ID
static vtkInformationIntegerKey * PROCESS_ID()
Process id the selection is on.
vtkSelectionNode::ShallowCopy
virtual void ShallowCopy(vtkSelectionNode *src)
Copy properties, selection list and children of the input.
vtkSelectionNode::ConvertSelectionFieldToAttributeType
static int ConvertSelectionFieldToAttributeType(int val)
Methods to convert vtkSelectionNode::SelectionField to vtkDataSetAttribute::AttributeTypes and vice-v...
vtkTable
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:68
vtkX3D::type
@ type
Definition: vtkX3D.h:516
vtkX3D::data
@ data
Definition: vtkX3D.h:315
vtkObject.h
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270