VTK
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 ----------------------------------------------------------------------------*/
32 #ifndef vtkAppendSelection_h
33 #define vtkAppendSelection_h
34 
35 #include "vtkFiltersCoreModule.h" // For export macro
36 #include "vtkSelectionAlgorithm.h"
37 
38 class vtkSelection;
39 
40 class VTKFILTERSCORE_EXPORT vtkAppendSelection : public vtkSelectionAlgorithm
41 {
42 public:
43  static vtkAppendSelection *New();
44 
46  void PrintSelf(ostream& os, vtkIndent indent) override;
47 
49 
55  vtkSetMacro(UserManagedInputs,vtkTypeBool);
56  vtkGetMacro(UserManagedInputs,vtkTypeBool);
57  vtkBooleanMacro(UserManagedInputs,vtkTypeBool);
59 
64  void AddInputData(vtkSelection *);
65 
70  void RemoveInputData(vtkSelection *);
71 
73 
76  vtkSelection *GetInput(int idx);
77  vtkSelection *GetInput() { return this->GetInput( 0 ); };
79 
84  void SetNumberOfInputs(int num);
85 
86  // Set Nth input, should only be used when UserManagedInputs is true.
87  void SetInputConnectionByNumber(int num, vtkAlgorithmOutput *input);
88 
90 
98  vtkSetMacro(AppendByUnion, vtkTypeBool);
99  vtkGetMacro(AppendByUnion, vtkTypeBool);
100  vtkBooleanMacro(AppendByUnion, vtkTypeBool);
102 
103 protected:
105  ~vtkAppendSelection() override;
106 
107  // Usual data generation method
110  int FillInputPortInformation(int, vtkInformation *) override;
111 
112  private:
113  // hide the superclass' AddInput() from the user and the compiler
114  void AddInputData(vtkDataObject *)
115  { vtkErrorMacro( << "AddInput() must be called with a vtkSelection not a vtkDataObject."); };
116 
117  vtkTypeBool UserManagedInputs;
118  vtkTypeBool AppendByUnion;
119 private:
120  vtkAppendSelection(const vtkAppendSelection&) = delete;
121  void operator=(const vtkAppendSelection&) = delete;
122 };
123 
124 #endif
125 
126 
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:63
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:39
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:64