VTK  9.6.1
vtkAppendSelection.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-FileCopyrightText: Copyright (c) Sandia Corporation
3// SPDX-License-Identifier: BSD-3-Clause
28
29#ifndef vtkAppendSelection_h
30#define vtkAppendSelection_h
31
32#include "vtkFiltersCoreModule.h" // For export macro
34#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
35
36#include <memory> // For std::unique_ptr
37
38VTK_ABI_NAMESPACE_BEGIN
39class vtkSelection;
40
41class VTKFILTERSCORE_EXPORT VTK_MARSHALAUTO vtkAppendSelection : public vtkSelectionAlgorithm
42{
43public:
45
47 void PrintSelf(ostream& os, vtkIndent indent) override;
48
50
65 vtkSetStdStringFromCharMacro(Expression);
66 vtkGetCharFromStdStringMacro(Expression);
68
70
78 vtkSetMacro(Inverse, bool);
79 vtkBooleanMacro(Inverse, bool);
80 vtkGetMacro(Inverse, bool);
82
84
90 void SetInputName(int index, const char* name);
91 const char* GetInputName(int index) const;
93
98
100
106 void SetInputColor(int index, double r, double g, double b);
107 double* GetInputColor(int index) const;
109
114
116
124 vtkSetMacro(UserManagedInputs, vtkTypeBool);
125 vtkGetMacro(UserManagedInputs, vtkTypeBool);
126 vtkBooleanMacro(UserManagedInputs, vtkTypeBool);
128
134
140
142
145 vtkSelection* GetInput(int idx);
146 vtkSelection* GetInput() { return this->GetInput(0); }
148
153 void SetNumberOfInputs(int num);
154
155 // Set Nth input, should only be used when UserManagedInputs is true.
157
159
168 vtkSetMacro(AppendByUnion, vtkTypeBool);
169 vtkGetMacro(AppendByUnion, vtkTypeBool);
170 vtkBooleanMacro(AppendByUnion, vtkTypeBool);
172
176 static const char* GetColorArrayName() { return "vtkSelectionColor"; }
177
178protected:
181
182 // Usual data generation method
185
186private:
187 // hide the superclass' AddInput() from the user and the compiler
189 {
190 vtkErrorMacro(<< "AddInput() must be called with a vtkSelection not a vtkDataObject.");
191 }
192
196 void SetColorArray(vtkSelectionNode* node, double* color);
197
198 vtkTypeBool UserManagedInputs;
199 vtkTypeBool AppendByUnion;
200 std::string Expression;
201 bool Inverse;
202 class vtkInternals;
203 std::unique_ptr<vtkInternals> Internals;
204
205 vtkAppendSelection(const vtkAppendSelection&) = delete;
206 void operator=(const vtkAppendSelection&) = delete;
207};
208
209VTK_ABI_NAMESPACE_END
210#endif
Proxy object to connect input/output ports.
appends one or more selections together
static vtkAppendSelection * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
general representation of visualization data
a simple class to control print indentation
Definition vtkIndent.h:29
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
int FillInputPortInformation(int port, vtkInformation *info) override
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
data object that represents a "selection" in VTK.
int vtkTypeBool
Definition vtkABI.h:64
vtkAppendSelection()
*vtkSelection * GetInput()
*static const char * GetColorArrayName()
Return the specific name used for the selection color array.
*void AddInputData(vtkSelection *)
Add a dataset to the list of data to append.
**const char * GetInputName(int index) const
*void RemoveAllInputColors()
Remove all assigned input selection colors.
void RemoveInputData(vtkSelection *)
Remove a dataset from the list of data to append.
void SetInputConnectionByNumber(int num, vtkAlgorithmOutput *input)
~vtkAppendSelection() override
*void RemoveAllInputNames()
Remove all assigned input selection names.
*double * GetInputColor(int index) const
*void SetNumberOfInputs(int num)
Directly set(allocate) number of inputs, should only be used when UserManagedInputs is true.
vtkSelectionNode()
std::string Expression
#define VTK_MARSHALAUTO