VTK  9.0.1
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 ----------------------------------------------------------------------------*/
29 #ifndef vtkAppendSelection_h
30 #define vtkAppendSelection_h
31 
32 #include "vtkFiltersCoreModule.h" // For export macro
33 #include "vtkSelectionAlgorithm.h"
34 
35 class vtkSelection;
36 
37 class VTKFILTERSCORE_EXPORT vtkAppendSelection : public vtkSelectionAlgorithm
38 {
39 public:
40  static vtkAppendSelection* New();
41 
43  void PrintSelf(ostream& os, vtkIndent indent) override;
44 
46 
52  vtkSetMacro(UserManagedInputs, vtkTypeBool);
53  vtkGetMacro(UserManagedInputs, vtkTypeBool);
54  vtkBooleanMacro(UserManagedInputs, vtkTypeBool);
56 
61  void AddInputData(vtkSelection*);
62 
67  void RemoveInputData(vtkSelection*);
68 
70 
73  vtkSelection* GetInput(int idx);
74  vtkSelection* GetInput() { return this->GetInput(0); }
76 
81  void SetNumberOfInputs(int num);
82 
83  // Set Nth input, should only be used when UserManagedInputs is true.
84  void SetInputConnectionByNumber(int num, vtkAlgorithmOutput* input);
85 
87 
95  vtkSetMacro(AppendByUnion, vtkTypeBool);
96  vtkGetMacro(AppendByUnion, vtkTypeBool);
97  vtkBooleanMacro(AppendByUnion, vtkTypeBool);
99 
100 protected:
102  ~vtkAppendSelection() override;
103 
104  // Usual data generation method
106  int FillInputPortInformation(int, vtkInformation*) override;
107 
108 private:
109  // hide the superclass' AddInput() from the user and the compiler
110  void AddInputData(vtkDataObject*)
111  {
112  vtkErrorMacro(<< "AddInput() must be called with a vtkSelection not a vtkDataObject.");
113  }
114 
115  vtkTypeBool UserManagedInputs;
116  vtkTypeBool AppendByUnion;
117 
118 private:
119  vtkAppendSelection(const vtkAppendSelection&) = delete;
120  void operator=(const vtkAppendSelection&) = delete;
121 };
122 
123 #endif
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
Store vtkAlgorithm input/output information.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
data object that represents a "selection" in VTK.
Definition: vtkSelection.h:57
Proxy object to connect input/output ports.
appends one or more selections together
int vtkTypeBool
Definition: vtkABI.h:69
static vtkSelectionAlgorithm * New()
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkSelection * GetInput()
Get any input of this filter.
Superclass for algorithms that produce only Selection as output.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
Store zero or more vtkInformation instances.
general representation of visualization data
Definition: vtkDataObject.h:59