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----------------------------------------------------------------------------*/
41#ifndef vtkAppendSelection_h
42#define vtkAppendSelection_h
43
44#include "vtkFiltersCoreModule.h" // For export macro
46
47#include <memory> // For std::unique_ptr
48
49class vtkSelection;
50
51class VTKFILTERSCORE_EXPORT vtkAppendSelection : public vtkSelectionAlgorithm
52{
53public:
55
57 void PrintSelf(ostream& os, vtkIndent indent) override;
58
60
78
80
88 vtkSetMacro(Inverse, bool);
89 vtkBooleanMacro(Inverse, bool);
90 vtkGetMacro(Inverse, bool);
92
94
100 void SetInputName(int index, const char* name);
101 const char* GetInputName(int index) const;
103
108
110
118 vtkSetMacro(UserManagedInputs, vtkTypeBool);
119 vtkGetMacro(UserManagedInputs, vtkTypeBool);
120 vtkBooleanMacro(UserManagedInputs, vtkTypeBool);
122
128
134
136
140 vtkSelection* GetInput() { return this->GetInput(0); }
142
147 void SetNumberOfInputs(int num);
148
149 // Set Nth input, should only be used when UserManagedInputs is true.
151
153
162 vtkSetMacro(AppendByUnion, vtkTypeBool);
163 vtkGetMacro(AppendByUnion, vtkTypeBool);
164 vtkBooleanMacro(AppendByUnion, vtkTypeBool);
166
167protected:
170
171 // Usual data generation method
174
175private:
176 // hide the superclass' AddInput() from the user and the compiler
177 void AddInputData(vtkDataObject*)
178 {
179 vtkErrorMacro(<< "AddInput() must be called with a vtkSelection not a vtkDataObject.");
180 }
181
182 vtkTypeBool UserManagedInputs;
183 vtkTypeBool AppendByUnion;
184 std::string Expression;
185 bool Inverse;
186 class vtkInternals;
187 std::unique_ptr<vtkInternals> Internals;
188
189private:
190 vtkAppendSelection(const vtkAppendSelection&) = delete;
191 void operator=(const vtkAppendSelection&) = delete;
192};
193
194#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:34
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