VTK  9.2.6
vtkAppendSelection.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkAppendSelection.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=========================================================================*/
15/*----------------------------------------------------------------------------
16 Copyright (c) Sandia Corporation
17 See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
18----------------------------------------------------------------------------*/
44#ifndef vtkAppendSelection_h
45#define vtkAppendSelection_h
46
47#include "vtkFiltersCoreModule.h" // For export macro
49
50#include <memory> // For std::unique_ptr
51
52class vtkSelection;
53
54class VTKFILTERSCORE_EXPORT vtkAppendSelection : public vtkSelectionAlgorithm
55{
56public:
58
60 void PrintSelf(ostream& os, vtkIndent indent) override;
61
63
81
83
91 vtkSetMacro(Inverse, bool);
92 vtkBooleanMacro(Inverse, bool);
93 vtkGetMacro(Inverse, bool);
95
97
103 void SetInputName(int index, const char* name);
104 const char* GetInputName(int index) const;
106
111
113
121 vtkSetMacro(UserManagedInputs, vtkTypeBool);
122 vtkGetMacro(UserManagedInputs, vtkTypeBool);
123 vtkBooleanMacro(UserManagedInputs, vtkTypeBool);
125
131
137
139
143 vtkSelection* GetInput() { return this->GetInput(0); }
145
150 void SetNumberOfInputs(int num);
151
152 // Set Nth input, should only be used when UserManagedInputs is true.
154
156
165 vtkSetMacro(AppendByUnion, vtkTypeBool);
166 vtkGetMacro(AppendByUnion, vtkTypeBool);
167 vtkBooleanMacro(AppendByUnion, vtkTypeBool);
169
170protected:
173
174 // Usual data generation method
177
178private:
179 // hide the superclass' AddInput() from the user and the compiler
180 void AddInputData(vtkDataObject*)
181 {
182 vtkErrorMacro(<< "AddInput() must be called with a vtkSelection not a vtkDataObject.");
183 }
184
185 vtkTypeBool UserManagedInputs;
186 vtkTypeBool AppendByUnion;
187 std::string Expression;
188 bool Inverse;
189 class vtkInternals;
190 std::unique_ptr<vtkInternals> Internals;
191
192private:
193 vtkAppendSelection(const vtkAppendSelection&) = delete;
194 void operator=(const vtkAppendSelection&) = delete;
195};
196
197#endif
Proxy object to connect input/output ports.
appends one or more selections together
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkSetStdStringFromCharMacro(Expression)
Set/Get the expression that defines the boolean expression to combine the selections.
vtkGetCharFromStdStringMacro(Expression)
Set/Get the expression that defines the boolean expression to combine the selections.
void SetInputName(int index, const char *name)
Set/Get names for inputs selections.
static vtkAppendSelection * New()
void SetNumberOfInputs(int num)
Directly set(allocate) number of inputs, should only be used when UserManagedInputs is true.
void SetInputConnectionByNumber(int num, vtkAlgorithmOutput *input)
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void RemoveAllInputNames()
Remove all assigned input selection names.
const char * GetInputName(int index) const
Set/Get names for inputs selections.
int FillInputPortInformation(int, vtkInformation *) override
Fill the input port information objects for this algorithm.
vtkSelection * GetInput()
Get any input of this filter.
void RemoveInputData(vtkSelection *)
Remove a dataset from the list of data to append.
vtkSelection * GetInput(int idx)
Get any input of this filter.
~vtkAppendSelection() override
void AddInputData(vtkSelection *)
Add a dataset to the list of data to append.
general representation of visualization data
a simple class to control print indentation
Definition vtkIndent.h:40
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Superclass for algorithms that produce only Selection as output.
data object that represents a "selection" in VTK.
int vtkTypeBool
Definition vtkABI.h:69