VTK: Filters/General/vtkPassSelectedArrays.h Source File

| VTK 9.3.1

vtkPassSelectedArrays.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
23 #ifndef vtkPassSelectedArrays_h
24 #define vtkPassSelectedArrays_h
25
26 #include "vtkDataObject.h" // for vtkDataObject::FieldAssociations
27 #include "vtkFiltersGeneralModule.h" // For export macro
28 #include "vtkPassInputTypeAlgorithm.h"
29 #include "vtkSmartPointer.h" // for ivar
30
31 VTK_ABI_NAMESPACE_BEGIN
32 class vtkDataArraySelection;
33
34 class VTKFILTERSGENERAL_EXPORT vtkPassSelectedArrays : public vtkPassInputTypeAlgorithm
35 {
36 public:
37 static vtkPassSelectedArrays* New();
38 vtkTypeMacro(vtkPassSelectedArrays, vtkPassInputTypeAlgorithm);
39 void PrintSelf(ostream& os, vtkIndent indent) override;
40
42
46 vtkSetMacro(Enabled, bool);
47 vtkGetMacro(Enabled, bool);
48 vtkBooleanMacro(Enabled, bool);
50
57 vtkDataArraySelection* GetArraySelection(int association);
58
60
64 vtkDataArraySelection* GetPointDataArraySelection()
65 {
66 return this->GetArraySelection(vtkDataObject::FIELD_ASSOCIATION_POINTS);
67 }
68 vtkDataArraySelection* GetCellDataArraySelection()
69 {
70 return this->GetArraySelection(vtkDataObject::FIELD_ASSOCIATION_CELLS);
71 }
72 vtkDataArraySelection* GetFieldDataArraySelection()
73 {
74 return this->GetArraySelection(vtkDataObject::FIELD_ASSOCIATION_NONE);
75 }
76 vtkDataArraySelection* GetVertexDataArraySelection()
77 {
78 return this->GetArraySelection(vtkDataObject::FIELD_ASSOCIATION_VERTICES);
79 }
80 vtkDataArraySelection* GetEdgeDataArraySelection()
81 {
82 return this->GetArraySelection(vtkDataObject::FIELD_ASSOCIATION_EDGES);
83 }
84 vtkDataArraySelection* GetRowDataArraySelection()
85 {
86 return this->GetArraySelection(vtkDataObject::FIELD_ASSOCIATION_ROWS);
87 }
89
90 protected:
91 vtkPassSelectedArrays();
92 ~vtkPassSelectedArrays() override;
93
94 int FillInputPortInformation(int port, vtkInformation* info) override;
95 int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override;
96
97 private:
98 vtkPassSelectedArrays(const vtkPassSelectedArrays&) = delete;
99 void operator=(const vtkPassSelectedArrays&) = delete;
100
101 bool Enabled;
102 vtkSmartPointer<vtkDataArraySelection> ArraySelections[vtkDataObject::NUMBER_OF_ASSOCIATIONS];
103 };
104
105 VTK_ABI_NAMESPACE_END
106 #endif
vtkDataArraySelection
Store on/off settings for data arrays, etc.
Definition: vtkDataArraySelection.h:37
vtkDataObject::FIELD_ASSOCIATION_EDGES
@ FIELD_ASSOCIATION_EDGES
Definition: vtkDataObject.h:267
vtkDataObject::FIELD_ASSOCIATION_POINTS
@ FIELD_ASSOCIATION_POINTS
Definition: vtkDataObject.h:262
vtkDataObject::FIELD_ASSOCIATION_VERTICES
@ FIELD_ASSOCIATION_VERTICES
Definition: vtkDataObject.h:266
vtkDataObject::FIELD_ASSOCIATION_NONE
@ FIELD_ASSOCIATION_NONE
Definition: vtkDataObject.h:264
vtkDataObject::FIELD_ASSOCIATION_ROWS
@ FIELD_ASSOCIATION_ROWS
Definition: vtkDataObject.h:268
vtkDataObject::FIELD_ASSOCIATION_CELLS
@ FIELD_ASSOCIATION_CELLS
Definition: vtkDataObject.h:263
vtkDataObject::NUMBER_OF_ASSOCIATIONS
@ NUMBER_OF_ASSOCIATIONS
Definition: vtkDataObject.h:269
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:40
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:72
vtkPassInputTypeAlgorithm
Superclass for algorithms that produce output of the same type as input.
Definition: vtkPassInputTypeAlgorithm.h:45
vtkPassSelectedArrays
pass through chosen arrays
Definition: vtkPassSelectedArrays.h:35
vtkPassSelectedArrays::New
static vtkPassSelectedArrays * New()
vtkPassSelectedArrays::vtkPassSelectedArrays
vtkPassSelectedArrays()
vtkPassSelectedArrays::GetPointDataArraySelection
vtkDataArraySelection * GetPointDataArraySelection()
Convenience methods that call GetArraySelection with corresponding association type.
Definition: vtkPassSelectedArrays.h:64
vtkPassSelectedArrays::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called within ProcessRequest when a request asks the algorithm to do its work.
vtkPassSelectedArrays::GetEdgeDataArraySelection
vtkDataArraySelection * GetEdgeDataArraySelection()
Convenience methods that call GetArraySelection with corresponding association type.
Definition: vtkPassSelectedArrays.h:80
vtkPassSelectedArrays::~vtkPassSelectedArrays
~vtkPassSelectedArrays() override
vtkPassSelectedArrays::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkPassSelectedArrays::GetRowDataArraySelection
vtkDataArraySelection * GetRowDataArraySelection()
Convenience methods that call GetArraySelection with corresponding association type.
Definition: vtkPassSelectedArrays.h:84
vtkPassSelectedArrays::GetFieldDataArraySelection
vtkDataArraySelection * GetFieldDataArraySelection()
Convenience methods that call GetArraySelection with corresponding association type.
Definition: vtkPassSelectedArrays.h:72
vtkPassSelectedArrays::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkPassSelectedArrays::GetCellDataArraySelection
vtkDataArraySelection * GetCellDataArraySelection()
Convenience methods that call GetArraySelection with corresponding association type.
Definition: vtkPassSelectedArrays.h:68
vtkPassSelectedArrays::GetArraySelection
vtkDataArraySelection * GetArraySelection(int association)
Returns the vtkDataArraySelection instance associated with a particular array association type (vtkDa...
vtkPassSelectedArrays::GetVertexDataArraySelection
vtkDataArraySelection * GetVertexDataArraySelection()
Convenience methods that call GetArraySelection with corresponding association type.
Definition: vtkPassSelectedArrays.h:76
vtkSmartPointer< vtkDataArraySelection >
vtkX3D::info
@ info
Definition: vtkX3D.h:376
vtkX3D::port
@ port
Definition: vtkX3D.h:447
vtkDataObject.h
vtkPassInputTypeAlgorithm.h
vtkSmartPointer.h